|
Boost : |
Subject: [boost] Is Boost.Astronomy feasible?
From: Mika Heiskanen (mika.heiskanen_at_[hidden])
Date: 2008-11-05 10:47:26
Hello,
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.
First a definition: by common calculations I mean those most
relevant to every dat life. For normal people this would pretty
much exclude most astronomical calculations except those
concerning the sun and the moon.
Some examples on what calculations I think would be common are:
o sunrise, sunset, noon
o sun elevation, azimuth, declination
o length of the day
o phase of the moon, and whether the visible fraction is
increasing or not
However, there are some complications:
o There are several ways to define twilight times, for example
civil, nautical and astronomical.
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?
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.
o Most calculations are intimately tied to the local time, so
the API should rely on Boost.Date_time.
Many places refer to Meeus's work for the most accurate
calculations. The formulas have been ported to C++ in the form
of the AA++ (astronomical algorithms) library. However, the
library seems to be aimed for experts and there are no easy
recipies for solving the common problems mentioned above.
The questions I would like to pose are then:
o Would a boost::astronomy namespace as implied above be
a good addition to boost?
o Are there any experts out there who understand the subject
matter well enough to provide a robust implementation or
atleast guidance on the matter?
For example, NOAA provides web based solar position and sunrise
calculators. According to the documentation the calculators
are based on the work of Meeus. However, there are some clear
design issues on how things should be handled in C++ versus
the JavaScript embedded into the NOAA pages.
Any thoughts on the matter?
Regards,
--> Mika Heiskanen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk