
AA+ v1.54 A class framework for Computational
Astronomy
AA+ is a C++ implementation for the algorithms as presented in the book "Astronomical
Algorithms" by Jean Meeus. Source code is provided with the book, but it includes
(IMHO) a restrictive license, as well as not having been updated for the 2nd revision
of the book which includes new and interesting chapters, on areas such as the Moons
of Saturn and the Moslem and Jewish Calendars. To make the most of my code, you
will really need a copy of the book. This can be purchased from
Amazon or directly from the publishers
Willman-Bell.
Example areas covered include the positions of the planets, comets, minor planets
and the Moon, calculation of times of Rising, Setting and Transit, calculation of
times of Equinoxes and Solstices plus calculation of the positions of the moons
of Jupiter and Saturn as well as many other algorithms presented in the book. This
is one of the biggest frameworks I have ever developed and includes c. 18 thousand
lines of code which I have been working on for over a year!.
Copyright
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
Updates
v1.0 (6 February 2004)
V1.01 (9 February 2004)
- Updated the values used in the calculation of the a1 and a2 constants for
Saturn's moon Rhea (satellite V) following an email from Jean Meeus confirming
that these constants are indeed incorrect as published in the book.
V1.02 (9 February 2004)
- Replaced all calls to the macro "INT" with the function CAADate::INT which
is what they should have been. The only affected class for this was CAAMoslemCalendar.
- Fixed a number of level 4 warnings in the CAAStellarMagnitudes class when
the code is compiled in VC.Net 2003.
V1.03 (14 February 2004)
- Fixed a "minus zero" bug in the function CAACoordinateTransformation::DMSToDegrees.
The sign of the value is now taken explicitly from the new bPositive boolean
parameter. Thanks to Patrick Wallace for reporting this problem.
V1.04 (21 February 2004)
- The optical libration in longitude for the moon is now returned in the range
-180 - 180 degrees
V1.05 (22 February 2004)
- Fixed a bug in the calculation of the phase type from the k value in CAAMoonPhases::TruePhase.
V1.06 (22 February 2004)
- Calculation of semi durations for eclipses in CAAEclipses is now calculated
only when required
27 April 2004
- Minor update to the documentation describing CAAElliptical::MeanMotionFromSemiMajorAxis
v1.07 (24 May 2004)
- Fixed a missing break statement in CAAElliptical::Calculate. Thanks to Carsten
A. Arnholm for reporting this bug.
- Also fixed an issue with the calculation of the apparent distance to the
Sun.
v1.08 (31 May 2004)
- Added a missing coefficient to g_L1JupiterCoefficients arrau as used by
CAAJupiter::EclipticLongitude. Thanks to Brian Orme for reporting this problem.
- Added missing g_B5JupiterCoefficients[] in CAAJupiter::EclipticLatitude.
Again thanks to Brian Orme for reporting this problem.
- In CAASaturn::EclipticLongitude the g_L5SaturnCoefficients[] were not included.
Thanks to Brian Orme for reporting this problem.
- In CAASaturn::EclipticLatitude the g_B5SaturnCoefficients[] were not included.
Thanks to Brian Orme for reporting this problem.
- In CAASaturn::RadiusVector the g_R5SaturnCoefficients[] were not included.
Thanks to Brian Orme for reporting this problem.
v1.09 (15 June 2004)
- Fixed a typo in the calculation of SunLongDash in CAAPhysicalSun::Calculate.
Thanks to Brian Orme for spotting this problem.
6 September 2004
- Minor update to the documentation plus a full spell check!!
6 September 2004
- Minor update to the documentation.
v1.10 (17 September 2004)
- Fixed a number of warnings in the code when compiled in VC .Net 2003 with
the "Force conformance in For Loop Scope" compiler option is set.
v1.11 (15 October 2004)
- bValid variable is now correctly set in CAARiseTransitSet::Rise if the objects
does actually rise and sets.
v1.12 (10 November 2004)
- Fix for CAADate::Get so that it works correctly for propalactive calendar
dates. The Meeus implementation automatically assumes the Gregorian Calendar
came into effect on 15 October 1582 (JD: 2299161), while the CAADate implementation
has a "m_bGregorianCalendar" value to decide if the date was specified in the
Gregorian or Julian Calendars. This difference means in effect that CAADate
fully supports propalactive versions of both calendar systems. This problem
was discovered when testing the Moslem calendar code which involves a round
trip between Moslem -> Julian -> Gregorian calendars.
v1.13 (31 December 2004)
- Fix for CAAElliptical::MinorPlanetMagnitude where the phase angle was being
incorrectly converted from Radians to Degress when it was already in degrees.
Thanks to Martin Burri for reporting this problem.
v1.14 (21 January 2005)
- Fixed a small but important error in the function PhaseAngle(r, R, Delta).
The code was producing incorrect results and raises acos DOMAIN errors and floating
point exceptions when calculating phase angles for the inner planets. Thanks
to MICHAEL R. MEYER for reporting this problem.
v1.15 (30 January 2005)
- Replaced all usage of BOOL with bool to aid in cross compiler compatibility.
This also means that all occurences of TRUE and FALSE are replaced with true
and false respectively. Thanks to Mika Heiskanen for reporting this issue.
- cmath header file is now used rather than math.h. Also if now does not use
the #pragma message text based on a define which is MS C specific. Again thanks
to Mika Heiskanen for reporting this issue.
- Now uses asssert instead of the MFC specific ASSERT. Again thanks to Mika
Heiskanen for reporting this issue.
- Addition of a new global header file "AA+.h" which allows you to include
all of the AA+ framework through one header.
- Code now use static_cast's rather than old C-style casts. Again thanks to
Mika Heiskanen for reporting this issue.
- Optimized some of the code in assert's which avoid unitialized variables
when build in release mode. Again thanks to Mika Heiskanen for reporting this
issue.
v1.16 (31 January 2005)
- Fixed a bug in CAAParabolic::Calculate where the JD value was being used
incorrectly in the loop. Thanks to Mika Heiskanen for reporting this problem.
- Fixed a GCC warning in CAADynamicalTime::DeltaT. Thanks to Mika Heiskanen
for reporting this problem.
- Fixed a GCC compiler error related to missing include for memset in AAEclipses.cpp.
Thanks to Mika Heiskanen for reporting this problem.
v1.17 (1 February 2005)
- Fixed a case sensitivity problem (at least on Unix systems) related to the
stdafx.h/cpp files. Now filename is all lowercase. Thanks to Mika Heiskanen
for reporting this problem.
- Change the ordering of items in stdafx.h so that you get a clean compile
on gcc. Thanks to Mika Heiskanen for reporting this problem.
- Fixed a problem with the declaration of the variable "Index" in the function
CAADynamicalTime::DeltaT. Thanks to Mika Heiskanen for reporting this problem.
- Removed usage of MFC from sample app as it is not required.
- Verfied the building of the code on GCC thro the use of Cygwin's port of
GCC.
v1.18 (21 April 2005)
- Renamed "AAAberation.cpp" to "AAAberration.cpp" so that all source code
filenames match their corresponding header files. Thanks to J�rgen Schuck for
suggesting this update.
v1.19 (13 May 2005)
- Fix for CAADate::Set(double JD, bool bGregorianCalendar) not setting the
m_bGregorianCalendar member variable correctly.
v1.20 (2 June 2005)
- Seems the case sensitivity issue fixed in v1.17 was not fixed because I
forgot to update the files in the zip download. Thanks to Andrew Maclean for
reporting this issue.
- A "CMakeLists.txt" file is now included in the download. This file is used
by CMake (http://www.cmake.org/HTML/Index.html) which is a cross-platform makefile generator. This allows the AA+ code to
be easily compiled on Cygwin, Linux and the usual MSVC compilers. Thanks to
Andrew Maclean for this nice addition.
- Some of the functions in the class "CAACoordinateTransformation" have been
made inline to improve performance.
- Made all structures used by AA+ classes. This is a minor tidy up issue more
than anything. Also ensured all class members are initialized to sane defaults.
v1.21 (3 June 2005)
- Minor update to "CMakeLists.txt" file to fix a case sensitivity issue. Thanks
to Andrew Maclean for reporting this issue.
v1.22 (5 July 2005)
- Fix for a bug to ensure that values returned from CAAEquationOfTime::Calculate
does not return discontinuities. Instead it now returns negative values when
required.
v1.23 (16 November 2005)
- Fixed a transcription error in the second coefficient used to calculate
the longitude of Mercury. Thanks to "Maurizio" for reporting this bug.
1 May 2006
- While testing v3.01 of DTime+ I discovered
some bugs in the CAAMoslemCalendar class. Specifically testing some dates by
creating a Moslem date, then converting to a Julian date and then converting
back to the Moslem calendar highlighted some dates which fail this roundtrip
test. If you are serious about developing for the Moslem calendar, then please
use the Moslem calendar support in DTime+ which
uses an independent algorithm for the Moslem calendar which does not have this
problem. I will report this issue to Jean Meeus and possibly have a fix for
it in the next update to AA+.
v1.24 (12 May 2006)
- Updated the documentation to use the same style as the web site.
- Fixed a transcription error in the third coefficient used to calculate the
R0 term for the radius vector of Mercury. Thanks to John Kruso for reporting
this issue.
- Fixed a transcription error in the third coefficient used to calculate the
R1 term for the radius vector of Mercury. Thanks to John Kruso for reporting
this issue.
- Updated copyright details.
18 May 2006
- Jean Meeus has confirmed that there is definitely a bug in the Moslem calendar
algorithms which make up the CAAMoslemCalendar class. He is not the original
author of these algorithms, so he was unable to explain why they fail for some
dates. As previously mentioned please use the DTime+
classes to avoid this issue.
v1.25 (5 June 2006)
- Fixed a bug in CAAElliptical::Calculate(double JD, EllipticalObject
object) where the correction for nutation was incorrectly using the Mean
obliquity of the ecliptic instead of the true value. The results from the
test program now agree much more closely with the example Meeus provides
which is the position of Venus on 1992 Dec. 20 at 0h Dynamical Time. I've
also checked the positions against the JPL Horizons web site and the
agreement is much better. Because the True obliquity of the Ecliptic is
defined as the mean obliquity of the ecliptic plus the nutation in
obliquity, it is relatively easy to determine the magnitude of error this
was causing. From the chapter on Nutation in the book, and specifically the
table which gives the cosine coefficients for nutation in obliquity you can
see that the absolute worst case error would be the sum of the absolute
values of all of the coefficients and would have been c. 10 arc seconds of
degree, which is not a small amount!. This value would be an absolute worst
case and I would expect the average error value to be much much smaller
(probably much less than an arc second). Anyway the bug has now been fixed.
Thanks to Patrick Wong for pointing out this rather significant bug.
23 October 2006
- Minor update to fix some incorrect book mark links in the documentation.
v1.26 (29 November 2006)
- Fixed a bug where CAAEclipticalElements::Calculate and
CAAEclipticalElements::FK4B1950ToFK5J2000 would return the incorrect value
for the reduced inclination when the initial inclination value was > 90
degrees.
- Addition of a new module called CAANearParabolic. This new class
provides functionality for orbits which can be best modeled as near
parabolic i.e. where the eccentricity is between 0.98 and 1.02. Chapter 35
in the book includes support for calculating Near-parabolic orbits, but the
code is provided in BASIC and the algorithm as presented has problems
converging when the eccentricity is close to 1. Instead the algorithms used
in this new module are based upon the worked examples which Paul Schlyter
has provided at
http://stjarnhimlen.se/comp/tutorial.html#16.
v1.27 (17 January 2007)
- Updated copyright details.
- Addition of a AAPLUS_EXT_CLASS preprocessor macro to allow the code to
be more easily added to an extension DLL. Thanks to Mathieu Peyr�ga for
suggesting this update.
- Changed name of CAASun::ApparentEclipticLongtitude to
CAASun::ApparentEclipticLongitude. Thanks to Mathieu Peyr�ga for reporting
this typo!.
v1.28 (25 January 2007)
- Fixed a minor compliance issue with GCC in the
AACoordinateTransformation.h to do with the declaration of various methods.
Thanks to Mathieu Peyr�ga for reporting this issue.
v1.29 (26 January 2007)
- After a bug report from Ing. Taras Kapuszczak that a round trip of the
date 25 January 100 as specified in the Gregorian calendar to the Julian day
number and then back again produces the incorrect date 26 January 100, I've
spent some time looking into the 2 key Meeus Julian Day algorithms. It seems
that the algorithms which converts from a Calendar date to JD works ok for
propalactive dates, but the reverse algorithm which converts from a JD to a
Calendar date does not. Since I made the change in behaviour to support
propalactive Gregorian dates to address issues with the Moslem calendar (and
since then I have discovered further unresolved bugs in the Moslem calendar
algorithms and advised people to check out my
DTime+ library
instead), I am now reverting these changes so that the date algorithms are
now as presented in Meeus's book. This means that dates after 15 October
1582 are assumed to be in the Gregorian calendar and dates before are
assumed to be in the Julian calendar. This change also means that some of
the CAADate class methods no longer require the now defunct "bool" parameter
to specify which calendar the date represents. As part of the testing for
this release verification code has been added to AATest.cpp to test all the
dates from JD 0 (i.e. 1 January -4712) to a date long in the future.
Hopefully with this verification code, we should have no more reported
issues with the class CAADate. Again if you would prefer a much more robust
and comprehensive Date time class framework, don't forget to check out the
authors
DTime+ library.
- Optimized CAADate constructor code
- Provided a static version of CAADate::DaysInMonth() method
- Discovered an issue in CAADate::JulianToGregorian. It seems the
algorithm presented in the book to do conversion from the Julian to
Gregorian calendar fails for Julian dates before the Gregorian calendar
reform in 1582. I have sent an email to Jean Meeus to find out if this is a
bug in my code or a deficiency in the algorithm presented. Currently the
code will assert in this function if it is called for a date before the
Gregorian reform.
- Changed name of CAAMoonIlluminatedFraction::IluminatedFraction to
CAAMoonIlluminatedFraction::IlluminatedFraction. Thanks to Ing. Taras
Kapuszczak for reporting this typo!.
v1.30 (29 January 2007)
- The static version of the CAADate::Set method has been renamed to
DateToJD to avoid any confusion with the other Set methods. Thanks to Ing.
Taras Kapuszczak for reporting this issue.
- The method CAADate::InGregorianCalendar has now also been renamed to the
more appropriate CAADate::AfterPapalReform.
- Reinstated the bGregorianCalendar parameter for the CAADate constructors
and Set methods.
- Changed the parameter layout for the static version of
CAADate::DaysInMonth
- Addition of a CAADate::InGregorianCalendar method.
- Addition of a CAADate::SetInGregorianCalendar method.
- Reworked implementation of GregorianToJulian method.
- Reworked implementation of JulianToGregorian method.
v1.31 (26 July 2008)
- Changed name of CAASun::EclipticRectangularCoordinatesMeanEquinox to
CAASun::EquatorialRectangularCoordinatesMeanEquinox to refer to the fact
that it returns equatorial coordinates instead of ecliptic coordinates.
Thanks to Frank Trautmann for reporting this issue
- Updated copyright details.
- zip file now ships with a VC 2005 solution instead of a VC 6 solution
file.
- Code now compiles cleanly using Code Analysis (/analyze)
v1.32 (11 November 2008)
- Fixed a bug in CAAElliptical::Calculate(double JD, const
CAAEllipticalObjectElements& elements) in the calculation of the
heliocentric rectangular ecliptical, the heliocentric ecliptical latitude
and the heliocentric ecliptical longitude coordinates. The code incorrectly
used the value "omega" instead of "w" in its calculation of the value "u".
Unfortunately there is no worked examples in Jean Meeus's book for these
particular values, hence resulting in my coding errors. Thanks to Carsten A.
Arnholm for reporting this bug.
v1.33 (7 February 2009)
- Fixed a seemingly copy and paste bug in
CAAMoonPerigeeApogee::TruePerigee. The layout of the code to accumulate the
"Sigma" value was incorrect. The terms involving T (e.g. +0.00019*T,
-0.00013*T etc were adding these terms to the argument of the sin incorrectly.
With the bug fixed the worked example 50.a from the book gives:
2447442.3543003569 JDE or 1988 October 7 at 20h:30m:11.5 seconds. The
previous buggy code was giving the same value of 2447442.3543003569, but
this would be the case because T was a small value in the example. You would
expect the error in the calculated to be bigger as the date departs from the
Epoch 2000.0. Thanks to Neoklis Kyriazis for reporting this bug.
- Optimized the layout of the MoonCoefficient1 structure in the AAMoon.cpp
module by making all elements integers instead of doubles.
- Optimized the layout of the PlutoCoefficient1 structure in the
AAPluto.cpp module by making all elements integers instead of doubles.
- Updated the static version of CAADate::DaysInMonth to compile cleanly
using code analysis.
- Updated copyright details.
v1.34 (12 February 2009)
- Fixed a seemingly copy and paste bug in CAAMoon::EclipticLongitude. The
layout of the code to calculate the "ThisSigma" value was incorrect. The
terms involving any value of M was being multiplied by E. This was incorrect
as documented at the bottom of page 338 from the second edition of Meeus's
book. The correct logic is to multiple only terms which involve +1M or -1M
by E and to multiple any terms which involved 2M or -2M by E*E. With the bug
fixed the worked example 47.a from the book now gives: 133.16726428105474
degrees. This is a much closer result to the value as reported in the book
which is 133.167265. The previous buggy code was giving the value of
133.16726382897039 degrees for the Moons apparent Longitude. The error in
this example is 0.001627 arc seconds of a degree. This error value is well
within the actual reported accuracy of 10 arc seconds for the code, but you
would expect this error to increase as the eccentricity of earths orbit
increases. Thanks to Neoklis Kyriazis for reporting this bug.
v1.35 (16 March 2009)
- Fixed a bug in CAAParabolic::Calculate(double JD, const
CAAParabolicObjectElements& elements) in the calculation of the heliocentric
rectangular ecliptical, the heliocentric ecliptical latitude and the
heliocentric ecliptical longitude coordinates. The code incorrectly used the
value "omega" instead of "w" in its calculation of the value "u".
Unfortunately there is no worked examples in Jean Meeus's book for these
particular values, hence resulting in my coding errors. Thanks to Jay
Borseth for reporting this bug.
- Fixed a bug in CAANearParabolic::Calculate(double JD, const
CAANearParabolicObjectElements& elements) in the calculation of the
heliocentric rectangular ecliptical, the heliocentric ecliptical latitude
and the heliocentric ecliptical longitude coordinates. The code incorrectly
used the value "omega" instead of "w" in its calculation of the value "u".
Unfortunately there is no worked examples in Jean Meeus's book for these
particular values, hence resulting in my coding errors. Thanks to Jay
Borseth for reporting this bug.
v1.36 (28 March 2009)
- Fixed a bug in CAARiseTransitSet::Rise where the cyclical nature of a RA
value was not taken into account during the interpolation. In fact Meeus in
the book even refers to this issue as "Important remarks, 2." on page 30 of
the second edition. Basically when interpolating RA, we need to be careful
that the 3 values are consistent with respect to each other when any one of
them wraps around from 23H 59M 59S around to 0H 0M 0S. In this case, the RA
has increased by 0H 0M 1S of RA instead of decreasing by 23H 59M 59S. Thanks
to Corky Corcoran and Danny Flippo for both reporting this issue.
- Fixed a bug in the calculation of the parameter "H" in
CAARiseTransitSet::Rise when calculating the local hour angle of the body
for the time of transit.
v1.37 (30 April 2009)
- Fixed a bug where the M values in CAARiseTransitSet::Rise were not being constrained to between 0
and 1. Thanks to Matthew Yager for reporting this issue.
v1.38 (3 October 2009)
- Fixed a copy and paste gremlin in the CAAEarth::EclipticLatitude method
where it incorrectly used B2, B3 & B4 coefficient terms for Venus. Due to
how this bug occurred, the magnitude of the error from it would increase as
the date deviated from the year 2000. Thanks to Isaac Salzman for reporting
this bug.
v1.39 (24 November 2009)
- Updated the sample app and documentation to provide better guidance on
how to calculate the times of Moon rise, transit and set. Thanks to Mehmet
Rauf Geden for reporting this bug.
v1.40 (30 December 2009)
- Updated the sample app to pull in cstdio instead of cstdio.h. Thanks to
Hugo Mildenberger for suggesting this update.
- Fixed a number of GCC compiler warnings in AATest.cpp. Thanks to Hugo
Mildenberger for suggesting this update.
- The CMake file "CMakeLists.txt" included in the download has been
updated to work correctly on Gentoo Linux. Again thanks to Hugo Mildenberger
for this update.
v1.41 (10 May 2010)
- Updated copyright details.
- Minor update to CAAPhysicalMoon::CalculateTopocentric to put a value in a
variable for easier debugging
- Fixed up unused variable warnings in AATest.cpp
- Fixed spelling mistakes in AATest.cpp for "Palomor Observatory"
- The CAAEllipticalObjectDetails::AstrometricGeocenticRA value is now known
as AstrometricGeocentricRA. Thanks to Scott Marley for reporting this spelling
mistake
- The CAANearParabolicObjectDetails::AstrometricGeocenticRA value is now
known as AstrometricGeocentricRA. Thanks to Scott Marley for reporting this
spelling mistake
- Removed the unused Delta parameter from the CAANutation::NutationInDeclination
method. Thanks to Thomas Meyer for reporting this issue.
v1.42 (21 May 2010)
- Fixed spelling mistakes in AATest.cpp for "Palomar Observatory".
Thanks to Leighton Paul for reporting the fact that the change for v1.41 was
still spelt incorrectly.
v1.43 (3 July 2010)
- Fixed a bug in the g_MoonPerigeeApogeeCoefficients3 table. The "+0.013*cos(4D -
2F)" term was incorrectly using "+0.013*cos(4D - 20F)". The error in the lunar
distance because of this coding error is of the order of 1 to 2 KM. Thanks to
Thomas Meyer for reporting this bug.
- Fixed a bug in the g_MoonPerigeeApogeeCoefficients1 table. The "D+2M-0.0010"
term was incorrectly using "D+2M-0.0011". Thanks to Thomas Meyer for reporting
this bug.
v1.44 (4 July 2010)
- Fixed various compiler warnings and errors when the code is compiled
using C++ Builder. Thanks to Neil Bingham for reporting these issues.
- Removed unnecessary "Longitude" parameter from method
CAAParallax::Ecliptic2Topocentric.
v1.45 (26 November 2010)
- CAARefraction::RefractionFromApparent now returns a constant
refraction value for all altitudes below a certain limit. Thanks to mehrzad
khoddam for prompting this update.
- CAARefraction::RefractionFromTrue now returns a constant
refraction value for all altitudes below a certain limit. Thanks to mehrzad
khoddam for prompting this update.
v1.46 (8 May 2011)
- Updated copyright details.
- Fixed a compilation issue on GCC where size_t was undefined in
various methods. Thanks to Carsten A. Arnholm and Andrew Hammond for
reporting this bug.
- Updated CAARiseTransitSet::Rise method to return information for
circumpolar object rather than returning bValid = false for this type of
object. In the case of a circumpolar object, the object does not rise or set
on the day in question but will of course transit at a specific time. This
change means that you do not need to recall the method with a declination
value to get the transit time. In addition if an object never rises or sets,
the method will still return the transit time even though it occurs below
the horizon by setting the bTransitAboveHorizon value to false. Note that
this means that the "Transit" value will now always include a valid value.
Also the method has been renamed to Calculate. Thanks to Andrew Hood for
prompting this update
- Fixed a bug in CAAGalileanMoons::CalculateHelper where the periodic
terms in longitude for the four satellites (Sigma1 to Sigma4) were not being
converted to radians prior to some trigonometric calculations. Thanks to
Thomas Meyer for reporting this bug.
v1.47 (10 September 2011)
- Fixed a bug in the calculation of the "F" local variable which
represents the Moon's argument of latitude in the CAAMoonPhases::TruePhase
method. Thanks to Andrew Hammond for reporting this bug.
v1.48 (18 March 2012)
- Updated copyright details.
- All global "g_*" tables are now const. Thanks to Roger Dahl for
reporting this issue when compiling AA+ on ARM.
v1.49 (1 May 2012)
v1.50 (2 May 2012)
- To further improve the accuracy of the CAADynamicalTime::DeltaT method,
the code now uses a lookup table between the dates of 1 February 1973 to 1
April 2012 (for observed values) and predicted values from April 2012 till
April 2015. These values are as provided by IERS Rapid Service/Prediction
Center at
http://maia.usno.navy.mil/ser7/deltat.data and
http://maia.usno.navy.mil/ser7/deltat.preds. This lookup table will of
course need to be kept up to date as IERS update this information. As
currently coded there is a single discontinuity of c. one second in early
April 2015. At this point
http://maia.usno.navy.mil/ser7/deltat.preds indicates an error value for
DeltaT of about 0.9 seconds anyway.
- A new CAADynamicalTime::CumulativeLeapSeconds has been provided. This
method takes as input the Julian Day value and returns the cumulative total
of Leap seconds which have been applied to this point. For more information
about leap seconds please see
http://en.wikipedia.org/wiki/Leap_second. Using this method you can now
implement code which converts from Terrestial Time to Coordinated Universal
time as follows:
double TerrestialTime = some calculation using AA+
algorithms(JD);
double DeltaT = CAADynamicalTime::DeltaT(JD);
double
UniversalTime1 = TerrestialTime - DeltaT/86400.0; //The time of the event
using the UT1 time scale
double TerrestialAtomicTime = TerrestialTime -
(32.184/86400.0); //The time of the event using the TAI time scale
double CumulativeLeapSeconds = CAADynamicalTime::CumulativeLeapSeconds(JD);
double CoordinatedUniversalTime = (DeltaT - CumulativeLeapSeconds -
32.184)/86400.0 + UniversalTime1; //The time of the event using the UTC time
scale
v1.51 (5 May 2012)
- Updated the sample app to print out the rise transit and set times for
the Moon and Sun as well as a ASCII graphic of the moon phase for the month
of April 2012 for the location of Wexford, Ireland. Thanks to Roger Dahl for
providing this nice addition to AA+.
v1.52 (12 October 2012)
- Refactored the code in CAARiseTransitSet::Calculate.
- Added comments to the documentation for CAARiseTransitSet::Calculate on
the potential for returning times outside of the UTC date requested. Thanks
to Rob Phillips for reporting this issue.
v1.53 (13 October 2012)
- Updated the sample app to show the rise, transit and set details
for the Moon and Sun at the North Pole for 31 October 2012. This shows that
the Sun does not rise or set on that day and transits below the horizon at
11:43:36 UTC and the Moon also does not rise or set and transits above the
horizon at 00:35:12 UTC. Thanks to Michael Iverson for prompting this check.
- Removed need for std::string class from AATest.cpp module.
- Fixed a small typo in the AARiseTransitSet.cpp history comments. Thanks
to Michael Iverson for reporting this issue.
- Fixed a typo in the spelling of Coefficient throughout the
AADynamicalTime.cpp module. Thanks to Michael Iverson for reporting this
issue.
v1.54 (27 October 2012)
- Fixed a buffer initialization bug in PrintMoonPhase function in
AAAtest.cpp. This was resulting in the moon phase ASCII diagrams to not show
correctly on Unix terminals.
- I now have a Ubuntu 12.10 VM setup which allows the code to be fully
tested on a Unix OS going forward. I am using the Code::Blocks IDE to
provide a familiar development experience for this Visual Studio veteran!
- Fixed a transcription bug in CAAElementsPlanetaryOrbit::SaturnLongitudePerihelion.
The correct coefficient for multiplying by T should have been 1.9637613
instead of 1.19637613. In the worked example of 31.a from Meeus's book, he
uses the date June 24 2065. With this bug now eliminated the value returned
is now 94.34 degrees instead of 93.84 degrees for this date. Basically the
incorrect coefficient would have returned a value too small by 0.77 degrees
for every Julian century after the epoch J2000.0 = 2000 January 1.5 TD = JDE
2451545.0. Thanks to Sudhakar Gumparthi for reporting this bug.