|
Boost : |
Subject: Re: [boost] Is Boost.Astronomy feasible?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-11-05 12:30:33
Mika Heiskanen wrote:
> I would like to think that it would be possible to create a
> library for common astronomical calculations, and I think boost
> might be the proper place to create one for the C++ community.
You might want to look into how it could integrate with geometry
libraries, if that is useful.
There has been much discussion about computational geometry libraries
candidates for Boost.
Of course integration with Boost.DateTime would be useful for all kinds
of date/time operations.
> However, there are some complications:
>
> o There are several ways to define twilight times, for example
> civil, nautical and astronomical.
Isn't that just a matter of units?
> o The sun may set/rise more than once during a day in polar regions,
> or it may do neither.
>
> o What is the definition for the length of the day if sunrise/sunset
> occurs more than once during a day?
To me, the length of the day doesn't depend on sunrise/sunset but on the
time the Earth takes to perform a rotation on its axis.
That is to say it doesn't vary. (or it varies but so slowly that we
don't care)
The duration of sunlight during the day or the time between a sunset and
its previous sunrise might also be interesting, but they're not really
days anymore, but rather durations of daylight.
> o Are separate methods needed for testing whether the given date
> is of type "polar day" or "polar night" or "midnight sun"?
> The definitions for the three seem to be a bit ambiguous. For
> example, it is perfectly possible for the sun to be up at midnight
> but still to set during the day, in which case you would have
> "midnight sun" but not necessarily a "polar day", when the sun
> shines 24h.
I have no idea what makes the most sense, I know nothing of astronomy.
In any case, all things should be clearly modelled and documented with
non-ambiguous definitions.
> o Would a boost::astronomy namespace as implied above be
> a good addition to boost?
I suppose any finely crafted C++ library with a liberal license and
which has its use has its place in boost.
As a side note, shouldn't an astronomy library take care of handling
celestial bodies in the universe, and thus model their physical
interactions with relativity theory?
Maybe an Earth-centric library should be given another more restricted
name, more tied to its scope.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk