Boost logo

Boost :

Subject: Re: [boost] Regarding Boost.Astronomy GSoC19
From: Ruchika Joshi (ruchikajoshi266_at_[hidden])
Date: 2019-04-04 18:20:48

On Thu, Apr 4, 2019 at 7:45 PM sarthak2007 via Boost <boost_at_[hidden]>

> One way it can be done is that whenever we use functions for dot product,
> cross product, etc. directly from boost::geometry then we just pass the
> values of coordinates in them instead of units.

Yes, this is how it will be done.

> There will be no problem
> considering units in calculations as boost::units convert the values stored
> into SI units so all the calculations will be involving coordinates with SI
> units. But then we will have to change the way of storage of coordinates as
> boost::geometry can't be used to store coordinates(with units) as it does
> not support units. Is it the right approach or there is some nicer way to
> implement this?
It is not as simple as it sounds. Most of the times astronomical systems
does not use metric units but units like Astronomical unit, Light-year,
and Parsec so you'll be not able to use units prefix directly. Storing it
in SI and every time converting when data is requested would be

Solution to this would be using TMP but it will require many compile-time
checkings for units. There are other challenges like spherical coordinate
system would require handling for multiple units because two coordinates
will be angle while one coordinate will be the length. It sounds simple but
when you implement it is complicated and requires too much testing as it
uses TMP.

Thank you,
Ruchika Joshi

Boost list run by bdawes at, gregod at, cpdaniel at, john at