# Which are the correct input parameters for NASA Horizons query to get the right Alt/Az data needed to plot analemmas for various planets?

I tried to replicate these analemmas, taken from a discussion of the equation of time in the following post: http://pbarbier.com/eqtime/eqtime.html:

I used "Quantity n.4" for Nasa Horizons (apparent Alt/Az from planet surface):

http://win98.altervista.org/space/exploration/NHUGUI.html

For Earth I get quite good results (at least, it's an 8-shaped curve...):

But look at what I get for other planets!

Mercury:

Mars:

Jupiter:

Possibly I should use proper STEP_SIZE input parameter for each planet, to get one result/line per each local day ("Sol" or wtahever), but trying 1477 and 1478 (*) for Mars gives two totally different plots, both different from "reference" plot above.

1477:

1478:

Possibly I should also specify proper year duration in the Horizon query (687 Earth days for Mars), but this shouldn't affect the shape of the plot, but just if the plot is complete or not.

(*) A Martian day lasts 88642.663 Earth seconds, i.e. 1.477,37771666 Earth minutes, but Horizons does not accept seconds as STEP_SIZE input, neither it accepts decimal values for minutes.

Further data:

Sidereal Day duration (not suitable for anelemma):

• Mercury: 1407.6 hours = 84456 min = 5067360 sec
• Venus: 5832.6 hours = 349956 min = 20997360 sec
• Mars: 24.6229 hours = 1477.374 min = 88642.44 sec
• Jupiter: 9.9250 hos = 595.5 min = 35730 sec
• Saturn: 10.656 hours = 639,36 min = 38361.6 min
• Uranus: 17.24 hours = 1034.4 min = 62064 min
• Neptun: 16.11 hours = 966,6 min = 57996 sec

Solar Day duration (sol):

(to be written)

• Mercury: 175.94 EarthDays = 4222.6 hours = 253356 min = 15201360 sec
• Venus: 116.75 EarthDays = 2802.0 hours = 168120 min = 10087200 sec
• Mars: 1.0274875 EarthDays = 24.6597 hours = 1479.528 min = 88774.92 sec
• Jupiter: 0.414 EarthDays = 9.9259 hours = 595.554 min = 35733.24 sec
• Saturn: 0.444 EarthDays = 10.656 hours = 639,36 min = 38361.6 min (same as sidereal ?!?)
• Uranus: 0.718 EarthDays = 17.24 hours = 1034.4 min = 62064 min (same as sidereal ?!?)
• Neptune: 0.671 EarthDays = 16.11 hours = 966,6 min = 57996 sec (same as sidereal ?!?)

Year duration in Earth days:

• Mercury: 88 days = 0.5 Sols
• Venus: 225 days = 1.927 Sols
• Mars: 687 days = 668.62 Sols
• Jupiter: 12 years = 4383 days = 10587 Sols
• Saturn: 29 years = 10592.25 days = 23857 Sols
• Uranus: 84 years = 30681 days = 42731 Sols
• Neptune: 165 years = 60266.25 days = 89816 Sols
• I had two more thoughts; 1) if you can post-process the Horizons data then you can interpolate the output to a grid of the planet's rotational period, 2) Horizons also allows you to upload discreet time lists. However when you click the link it only displays sixteen boxes, I don't know if there's a way to upload hundreds of discrete times: i.stack.imgur.com/FB8kB.png
– uhoh
Aug 19, 2020 at 17:37
• Answer received in another section of stackexchange, should I copy it also here? astronomy.stackexchange.com/questions/38556/… Aug 20, 2020 at 16:50
– uhoh
Aug 20, 2020 at 17:22
• Because if it doesn't (and I don't see how it could possibly) then you've got two problems. You should edit this question to just reflect the problem answered here. That way you have two very different questions, each answered.
– uhoh
Aug 20, 2020 at 17:25
• didn't test yet for Mercury. Tested for Venus: not working. Aug 20, 2020 at 17:46

note: based on comments below it's clear now that there are several problems, so this is currently a partial answer.

I think I have it (at least partly) figured out one problem with the current plots, but there is still a bug in your analysis because Earth's analemma as defined in your link should range between +/- 23.4 degrees and yours goes from -24 to -69, which has about the right range but is centered on about -46 degrees.

You haven't explained what you've done so it's impossible to debug it in an answer, but that's not declination. However it might be the elevation of the sun at midnight (rather than noon) from mid latitude!

The vertical axis of the analemma as defined in your link for each planet should be generated from the observed "declination" of the Sun based on each planet's axis. Horizons is giving you RA and DEC of the Sun using the standard Earth-based coordinates à la J2000.0 no matter from which planet you are observing it from.

If you go back and look at Mercury's analemma on your linked site you'll see that it only extends +/- 0.035 degrees which is the tiny angle between Mercury's orbital plane and its equator.

I'll bet that if you define a topocentric location on each planet at it's north pole and use the apparent elevation of the Sun above the horizon, you will get better looking plots. Try it for Earth first, it should make the familiar analemma pattern extending +/- 23.4 degrees above/below the horizon.

There are answers either here or in Astronomy SE explaining how to get alt/az from a topocentric location on another planet from Horizons. I'll look for some but I don't think it will be too hard to find.

• What I have done is "summarized" in the link "Link for Mars data: link" in the question. Replace "499" in the URL by the numbers of the other planets (Mercury = 199, Venus = 299,...). The output is Altitude and Azimuth of sun from location (0,0) on surface of the planet (SITE_COORD='0,0,0' - lon, lat, alt). I think the point is that i should set a different period for data rather than one Earth day. But which value?!? Aug 19, 2020 at 15:23
• @jumpjack there may be several things that need fixing, but certainly getting the vertical axis correct is one of them. Your plot for Mercury goes between +/-90 degrees and it should go between only +/-0.035 degrees. Changing the period won't affect the vertical range of your plots, (nor that Earth is always negative) but yes, you should certainly use the correct length of a day for each planet! So with both of those fixes, maybe it will start shaping up.
– uhoh
Aug 19, 2020 at 16:28
• @jumpjack btw it's always okay to post an answer to your own question if you solve the problem!
– uhoh
Aug 19, 2020 at 16:30
• problem is that day duration is not enough: the analemma covers a "local year"; Mars Sol duration is 24 h 37 m 22.663 s (88642.663 seconds), Mars year duration is 687 Earth days. But I don't know how to use these numbers to setup Horizons query. Aug 19, 2020 at 16:44
• @jumpjack Okay if that is your question, you should really go back and rewrite your question and explain it there! Most people will not scroll all the way down to these comments. Please simplify and clarify your question and describe exactly the problem you have mentioned in comments here.
– uhoh
Aug 19, 2020 at 17:10