Need help understanding U.S. Naval Observatory's messed up algorithm

In summary, an expert summarizer has identified that the following conversation is about trying to calculate the equation of time and the declination of the sun based on the U.S. Naval Observatory's algorithm, but that no one has been willing to help the person who is trying to do this. The summary also notes that the unladen swallow part wasn't the person's own work, and that the book "The Astronomical Almanac" could be helpful in understanding how the data used in the algorithm is obtained. Finally, the summary suggests that the algorithm be made even more accurate.
  • #1
dwaynie
9
0
Hello!

I'm trying to calculate the equation of time and the declination of the sun based on the U.S. Naval Observatory's algorithm:

http://aa.usno.navy.mil/faq/docs/SunApprox.php" [Broken]

But not the U.S. Naval Obseravtory, or any of the astronomers I've tried to contact, has been eager to help me identify what the numbers used in this algorithm actually represent.

Maybe someone here can help?

Here's what I got so far (I'm not sure what I've already identified is correct, astronomically or spelling-wise):

Code:
EPOCHS_JULIAN_DATE = 2451545.0
TROPICAL_YEAR_IN_DAYS = 365.2421897
EARTHS_ECCENTRICITY = 0.01671
EARTHS_ECLIPTIC_OBLIQUITY = 23.439
GEODETIC_PRECESSION = 1.915
UNLADEN_SWALLOW_IN_POUNDS = 0.020

UNKNOWN = 357.5291
UNKNOWN = 280.459
UNKNOWN = 0.98560028
UNKNOWN = 1.00014
UNKNOWN = 0.00014
UNKNOWN = 0.00000036

This is all part of a greater attempt to write this algorithm in a high-level programming language in the simplest, most descriptive and self-explanatory way possible.

https://gist.github.com/1278755" [Broken] (criticism welcome)

Many thanks!

--Dwayne
 
Last edited by a moderator:
Astronomy news on Phys.org
  • #2
Mean anomaly (on 1 Jan 2000 12:00Z) = 357.5291 degrees
Mean longitude of Sun (1 Jan 2000 12:00Z) = 280.459 degrees
Change in mean anomaly per day = 0.98560028

Average Radius of Earth in astronomical units* = 1.00014
*Obviously this can't possibly be true. However, your radius is using mean anomaly to calculate the radius, and mean anomaly is a location in time; not physical space. Since the Earth's orbit is elliptical instead of circular, using mean anomaly in the traditional trajectory equation would give you a wrong answer. This equation allows you to calculate the Earth's radius without first converting the mean anomaly to eccentric anomaly, the eccentric anomaly into true anomaly, and then finally using true anomaly in your standard trajectory equation. In other words, three equations** were blended together and solved as far as possible, given that the mean anomaly is unknown.

Likewise, your mystery parameter equalling 0.00014, which is the eccentricity of Earth's orbit squared and then divided by 2 (how could this not be intuitively obvious?). Notice that same amount wound up being added to the Earth's 'mean radius'.

rate of change in the obliquity of the ecliptic (the angle between the equator and the Earth's orbital plane) = 0.00000036

**Given that there is no analytical solution to convert mean anomaly to eccentric anomaly, the answer you get is an approximation that will degrade over time, but I believe the limitations are covered in the link you provided.

UNLADEN_SWALLOW_IN_POUNDS = 0.020
I'm impressed you were able to figure this one out. That was a stroke of insight that wouldn't have occurred to most people.:rofl:

Actually, the 1.915 and the 0.02 are just intermediate results stemming from combining multiple equations into one and solving that equation as far as possible, just like the 0.00014 was (it was just easier for me to see how those intermediate results were obtained for the radius - I'd have to actually draw everything out and figure out what went into the L equation to see where the 1.915 and 0.02 came from).
 
Last edited:
  • #3
Man! I can't believe you did it. Thanks a lot!

I was able to piece together this:

https://gist.github.com/1278755" [Broken]

I hope it's all correct?

The unladen swallow part wasn't me though :) It was my Japanese friend, much respect to him! And to you. You did something Navy.mil couldn't. That's pretty alright in my book.

--Dwayne
 
Last edited by a moderator:
  • #4
Try purchasing a copy of "The Astronomical Almanac". They come out once a year, but having even one gives you a lot of explanations for how they come up with the data in the book.

Considering it's published jointly by the US Naval Observatory and the UK's Hydrographic Office, you'd think someone at the US Naval Observatory would have read it.

And, to be technically complete, the .98560028 change in mean anomaly is based on an anomalistic year (which it has to be, since mean anomaly is measured from perigee to perigee). Just explains why 360/.98560028 doesn't equal either a tropical year or a sidereal year (just to make sure I'm not tossing in confusion, tropical year is the correct parameter for the mean longitude of the Sun - mean anomaly depends on anomalistic year and mean longitude depends on tropical year)

If you know the Earth is at perigee sometime during the first week of January, the starting mean anomaly makes sense.

And I'd make sure the label or comments for Earth's average radius made it clear that was an adjusted average radius, since it doesn't take too much digging for someone to figure out the actual average Earth radius is one astronimical unit by definition. It's been adjusted by the conversion from mean anomaly to eccentric anomaly to true anomaly.
 
Last edited:
  • #5
Much obliged!

Do you know of any example calculations of the equation of time and the declination of the sun? I got to test my code with some real results to make sure it's working right.

Also, is it possible to make this algorithm even more accurate? Maybe somebody's running some sort of live feed where one can obtain far more detailed and recent versions of these numbers? There's http://aa.usno.navy.mil/software/mica/micainfo.php" [Broken], but I'd rather make my script as open and universal as possible.

--Dwayne
 
Last edited by a moderator:
  • #8

1. What is the U.S. Naval Observatory's algorithm?

The U.S. Naval Observatory's algorithm is a complex set of mathematical equations and computer code used to calculate and predict the positions and movements of celestial bodies, such as the sun, moon, and stars.

2. Why is the algorithm considered "messed up"?

The algorithm has been deemed "messed up" because it has been found to produce inaccurate predictions and calculations in some cases, leading to confusion and frustration among users.

3. Who uses the U.S. Naval Observatory's algorithm?

The algorithm is primarily used by astronomers, navigators, and other scientists who require precise and reliable data on celestial objects for their research and calculations.

4. Can the algorithm be fixed or improved?

Yes, the algorithm can be improved and updated as needed. The U.S. Naval Observatory regularly reviews and updates their algorithms to ensure accuracy and reliability.

5. How can I better understand the U.S. Naval Observatory's algorithm?

To better understand the algorithm, it is recommended to have a strong background in mathematics and computer science. Additionally, reading through the documentation and resources provided by the U.S. Naval Observatory can also help in understanding the algorithm's complex calculations and processes.

Back
Top