<p>You did two things wrong, one minor, the other major. The minor thing that you did wrong was to chose the solar system barycenter as the target rather than the Sun. Use the Sun.</p>
<p>The major thing you did wrong was to use a step size of 1477 minutes. That is (to within a minute) the length of a Mars sidereal day. The Sun will march across the horizon if you use a sidereal day. What you want is a Mars solar day, which is 1479 minutes and 35 seconds long.</p>
<p>This presents a new problem. Ideally your step size should be 88775 seconds. But you cannot choose seconds as the unit of a step size. You're stuck with minutes, and that is suboptimal. There is another approach:</p>
<ul>
<li>Choose the &quot;equal intervals (unitless)&quot; option for the step size,</li>
<li>Make the time difference between the start and end time be an integral multiple of 88775 seconds, and</li>
<li>Specify the step size as the integral multiple chosen to determine the time span.</li>
</ul>
<p>For example, choosing 711 as the integral multiple and 2020-Aug-20 12:00:00 as the start time means the end time should be 2022-Aug-21 01:03:45. You might need to tweet the end time to get the analemma to close up properly.</p>
<hr />
<p><strong>Edit</strong><br />
I noticed that you used the center of Mars. You need a point on the surface to get a proper analemma. Horizons provides several predefined points. If you choose Viking 1 / Chryse @499, you'll have to modify the start and end times so that the Sun is above the horizon. Add 12 hours to the start and end times shown above appears to work very nicely for Viking 1's location.</p>
<p>Below is what I get plotting the Sun's elevation vs azimuth as seen from the Viking 1 / Chryse location, with 711 intervals (712 data points) sampled over the period 2020-Aug-21 00:00:00 to 2022-Aug-21 13:03:35 UT.</p>
<p><a href="https://i.sstatic.net/EQbzv.png" rel="noreferrer"><img src="https://i.sstatic.net/EQbzv.png" alt="Mars analemma using data retrieved from Horizons for the Viking 1 / Chryse location. The horizontal and vertical axes are azimuth and elevation, both in degrees" /></a></p>

CC BY-SA 4.0
2020-08-20T15:27:51.463Z
Thanks, it worked using 711 and suggested dates. I wanted to try that, but I was struggling in convincing Excel giving me the result of today+711 days... :-) But please note that Mars location was already right: I specified "CENTER='coord@499'" and used the triplet "0,51.48,0" (lon, lat, altitude) (SITE_COORD='0,51.48,0'). You can also check it in the output: Center geodetic : 360.000000,51.4800000,-8.38E-13 {W-lon(deg),Lat(deg),Alt(km)}   Playing with Horizons urls and/or site is a mess, that's why I set up my own GUI: http://win98.altervista.org/space/exploration/NHUGUI.html
jumpjack
CC BY-SA 4.0
2020-08-20T17:08:54.487Z
I did a test with martian year duration in sols (668) and it works fine too. Unfortunately I didn't have same luck with Venus, which has very peculiar data: 1,92 sols in a Venus year, 116 days in a sol. I tried with 2020/08/20 12:00 , 2082/02/21 12:00 and 192 steps but it does not work.
jumpjack
CC BY-SA 4.0
2020-08-20T22:58:04.003Z
@jumpjack -- The concept of an analemma implicitly assumes a body that rotates about its own axis much more quickly than it orbits the Sun. For a body that does rotate quickly, the position of the Sun in the sky will be but slightly different than it was exactly one solar day earlier. The progression over the course of one orbit will result in a large number of points that form a nice curve that is easily discernible to the eye. But if the planet rotates very slowly, the jump from one day to the next will be large and you will not get this nice, easily-discernible curve.
David Hammen
CC BY-SA 4.0
2020-08-21T08:14:16.770Z
Yes but this site provides analemmas for all planets: http://pbarbier.com/eqtime/eqtime.html
jumpjack
CC BY-SA 4.0
2020-08-20T12:50:15.790Z
2020-08-20T15:43:54.020Z
2020-08-20T15:43:54.020Z
David Hammen
<p>Thanks to the help from @DavidHammen, here it is an example of <a href="https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&amp;COMMAND=%2710%27&amp;CENTER=%27coord@499%27&amp;OBJ_DATA=%27yes%27&amp;MAKE_EPHEM=%27yes%27&amp;TABLE_TYPE=%27OBSERVER%27&amp;REF_PLANE=%27ECLIPTIC%27&amp;COORD_TYPE=%27GEODETIC%27&amp;SITE_COORD=%270,90,0%27&amp;START_TIME=%272020-Aug-20%2012:00:00%27&amp;STOP_TIME=%272022-Aug-21%2001:03:45%27&amp;STEP_SIZE=%27711%27&amp;QUANTITIES=%274%27&amp;FIXED_QUANTITIES=%27Custom%27&amp;REF_SYSTEM=%27J2000%27&amp;OUT_UNITS=%27KM-S%27&amp;VECT_TABLE=%273%27&amp;VECT_CORR=%27NONE%27&amp;CAL_FORMAT=%27CAL%27&amp;ANG_FORMAT=%27HMS%27&amp;APPARENT=%27AIRLESS%27&amp;TIME_TYPE=%27UTC%27&amp;TIME_DIGITS=%27MINUTES%27&amp;RANGE_UNITS=%27AU%27&amp;SUPPRESS_RANGE_RATE=%27no%27&amp;SKIP_DAYLT=%27no%27&amp;EXTRA_PREC=%27yes%27&amp;CSV_FORMAT=%27yes%27&amp;VEC_LABELS=%27yes%27&amp;ELM_LABELS=%27yes%27&amp;TP_TYPE=%27ABSOLUTE%27&amp;R_T_S_ONLY=%27NO%27&amp;CA_TABLE_TYPE=%27STANDARD%27" rel="nofollow noreferrer">correct URL/query</a> to get Mars analemma.</p>
<p>In readable format:</p>
<ul>
<li><a href="https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1" rel="nofollow noreferrer">https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1</a></li>
<li><strong>COMMAND='10'</strong>  (Target = Sun; do not confuse with &quot;0&quot;, Solar System baricenter)</li>
<li><strong>CENTER='coord@499'</strong> (Observer on Mars surface)</li>
<li>OBJ_DATA='yes'</li>
<li>MAKE_EPHEM='yes'</li>
<li>TABLE_TYPE='OBSERVER'</li>
<li>REF_PLANE='ECLIPTIC'</li>
<li>COORD_TYPE='GEODETIC'</li>
<li><strong>SITE_COORD='0,90,0'</strong> (Mars location on surface; Longitude, Latitude, Altitude)</li>
<li><strong>START_TIME='2020-08-20 12:00:00'</strong></li>
<li><strong>STEP_SIZE='668'</strong> (Number of segments the start-stop interval is split into. This number determines the length of the day; the martian solar day (*) lasts 88775 seconds, or 1479 minutes and 35 seconds, but Horizons does not allow specifying step in seconds neither in fractional minutes. And specifying 1479 or 1480 would result in a wrong analemma curve. But Horizons accepts a dimensionless parameter, which means &quot;number of steps between given dates&quot;.  Hence, you will put here the number of Sols between start and stop date. One martian year last 668.6 sols. Both 668 or 669 will give right results, just a shorter or longer curve, as long as same value is used to calculate STOP_TIME.)</li>
<li><strong>STOP_TIME='2022-07-07 20:44'</strong> (&quot;Stop time&quot; minus &quot;start time&quot;, expressed in seconds, must be multiple of 88775 seconds, the duration of Martian <strong>solar</strong> day (*). In a spreadhseet, you would add to the start date: (88775 * NumberOfSols) / 86400  )</li>
<li><strong>QUANTITIES='4'</strong> (Output=Altitude/Azimuth)</li>
<li>FIXED_QUANTITIES='Custom'</li>
<li>REF_SYSTEM='J2000'</li>
<li>OUT_UNITS='KM-S'</li>
<li>VECT_TABLE='3'</li>
<li>VECT_CORR='NONE'</li>
<li>CAL_FORMAT='CAL'</li>
<li>ANG_FORMAT='HMS'</li>
<li>APPARENT='AIRLESS'</li>
<li>TIME_TYPE='UTC'</li>
<li>TIME_DIGITS='MINUTES'</li>
<li>RANGE_UNITS='AU'</li>
<li>SUPPRESS_RANGE_RATE='no'</li>
<li>SKIP_DAYLT='no'</li>
<li>EXTRA_PREC='yes'</li>
<li>CSV_FORMAT='yes'</li>
<li>VEC_LABELS='yes'</li>
<li>ELM_LABELS='yes'</li>
<li>TP_TYPE='ABSOLUTE'</li>
<li>R_T_S_ONLY='NO'</li>
<li>CA_TABLE_TYPE='STANDARD'</li>
</ul>
<p>Possibly not all parameters are mandatory, this URl is automatically generated by <a href="http://win98.altervista.org/space/exploration/NHUGUI.html" rel="nofollow noreferrer">NHUGUI</a>.</p>
<p>Highlighted are the parameters specific for the analemma.</p>
<p>Picture below show analemmas generated for Time 12:00 at longitude 0° and latitudes 0°, 45° and 90°.</p>
<p><a href="https://i.sstatic.net/eFcwD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eFcwD.png" alt="Mars analemmas" /></a></p>
<p>This image shows how to setup a spreadsheet to automatically calculate stop date, given start date, year duration in sols and sol duration in earth-seconds:
<a href="https://i.sstatic.net/iAnnM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/iAnnM.png" alt="Spreadhseet setup" /></a></p>
<p>(*) NOT sidereal day; by definition, solar day is relative to Sun rather than stars, and analemma is a curve relative to Sun. A Mars solar day is named &quot;Sol&quot; and lasts 88775.245 Earth-seconds</p>

CC BY-SA 4.0
2020-08-20T16:32:38.107Z
2020-08-25T07:16:17.580Z
2020-08-25T07:16:17.580Z
jumpjack
<p>I posted such a question in space.stackexchange ( <a href="https://space.stackexchange.com/questions/46077/which-are-the-correct-input-parameters-for-nasa-horizons-query-to-get-the-right?noredirect=1#comment150190_46077">https://space.stackexchange.com/questions/46077/which-are-the-correct-input-parameters-for-nasa-horizons-query-to-get-the-right?noredirect=1#comment150190_46077</a> ), but probably it fits better here, being it a &quot;topocentric problem&quot;, although for other planets than Earth; we could call it &quot;eso-astronomy&quot; ;-)</p>
<p>I am trying to figure out how to retrieve the right data from Nasa Horizons to plot sun analemmas as seen from other worlds; I found a query which works fine for Earth, but upon changing the observer location from Earth to other planets, things get weird, and I get wrong curves w.r.t &quot;official&quot; curves (although there is not a single analemma curve for each planet, but different curves for different times).</p>
<p><a href="https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&amp;COMMAND=%270%27&amp;CENTER=%27coord@399%27&amp;OBJ_DATA=%27yes%27&amp;MAKE_EPHEM=%27yes%27&amp;TABLE_TYPE=%27OBSERVER%27&amp;REF_PLANE=%27ECLIPTIC%27&amp;COORD_TYPE=%27GEODETIC%27&amp;SITE_COORD=%270,51.48,0%27&amp;START_TIME=%272020/8/20%2012:00%27&amp;STOP_TIME=%272021/8/20%2012:00%27&amp;STEP_SIZE=%271d%27&amp;QUANTITIES=%274%27&amp;FIXED_QUANTITIES=%27Custom%27&amp;REF_SYSTEM=%27J2000%27&amp;OUT_UNITS=%27KM-S%27&amp;VECT_TABLE=%273%27&amp;VECT_CORR=%27NONE%27&amp;CAL_FORMAT=%27CAL%27&amp;ANG_FORMAT=%27HMS%27&amp;APPARENT=%27AIRLESS%27&amp;TIME_TYPE=%27UTC%27&amp;TIME_DIGITS=%27MINUTES%27&amp;RANGE_UNITS=%27AU%27&amp;SUPPRESS_RANGE_RATE=%27no%27&amp;SKIP_DAYLT=%27no%27&amp;EXTRA_PREC=%27yes%27&amp;CSV_FORMAT=%27yes%27&amp;VEC_LABELS=%27yes%27&amp;ELM_LABELS=%27yes%27&amp;TP_TYPE=%27ABSOLUTE%27&amp;R_T_S_ONLY=%27NO%27&amp;CA_TABLE_TYPE=%27STANDARD%27" rel="nofollow noreferrer">This</a> is the query I am using for Earth analemma centered on Greenwich at 12.00:</p>
<p>Result:
<a href="https://i.sstatic.net/unSvO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/unSvO.png" alt="Greenwich analemma 12:00" /></a></p>
<p>Using same coordinates on mars, a longer period, and 1477 minutes as interval (martian day length), I don't get the right plot (<a href="https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&amp;COMMAND=%270%27&amp;CENTER=%27coord@499%27&amp;OBJ_DATA=%27yes%27&amp;MAKE_EPHEM=%27yes%27&amp;TABLE_TYPE=%27OBSERVER%27&amp;REF_PLANE=%27ECLIPTIC%27&amp;COORD_TYPE=%27GEODETIC%27&amp;SITE_COORD=%270,51.48,0%27&amp;START_TIME=%272020/8/20%2012:00%27&amp;STOP_TIME=%272022/8/20%2012:00%27&amp;STEP_SIZE=%271477m%27&amp;QUANTITIES=%274%27&amp;FIXED_QUANTITIES=%27Custom%27&amp;REF_SYSTEM=%27J2000%27&amp;OUT_UNITS=%27KM-S%27&amp;VECT_TABLE=%273%27&amp;VECT_CORR=%27NONE%27&amp;CAL_FORMAT=%27CAL%27&amp;ANG_FORMAT=%27HMS%27&amp;APPARENT=%27AIRLESS%27&amp;TIME_TYPE=%27UTC%27&amp;TIME_DIGITS=%27MINUTES%27&amp;RANGE_UNITS=%27AU%27&amp;SUPPRESS_RANGE_RATE=%27no%27&amp;SKIP_DAYLT=%27no%27&amp;EXTRA_PREC=%27yes%27&amp;CSV_FORMAT=%27yes%27&amp;VEC_LABELS=%27yes%27&amp;ELM_LABELS=%27yes%27&amp;TP_TYPE=%27ABSOLUTE%27&amp;R_T_S_ONLY=%27NO%27&amp;CA_TABLE_TYPE=%27STANDARD%27" rel="nofollow noreferrer">link</a>):</p>
<p><a href="https://i.sstatic.net/cOLCK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cOLCK.png" alt="Mar analemma 12:00 at &quot;Greenwich&quot; (latitude 51.48)" /></a></p>
<p>The right analemma on Mars is this:</p>
<p><a href="https://i.sstatic.net/37VN9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/37VN9.png" alt="Mars real analemma" /></a></p>
<p>I noticed that Earth analemmas are plotted against Azimuth, but Mars analemmas are plotted against Equation of Time. Why? And how can I do by myself such a plot in Excel?</p>

<the-sun><mars>
How to retrieve from NASA Horizons site the needed data to plot analemmas for other planets?
jumpjack
# How to retrieve from NASA Horizons site the needed data to plot analemmas for other planets?

(Asked by: username_0 on 2020-08-20)

I posted such a question in space.stackexchange ( <https://space.stackexchange.com/questions/46077/which-are-the-correct-input-parameters-for-nasa-horizons-query-to-get-the-right?noredirect=1#comment150190_46077> ), but probably it fits better here, being it a "topocentric problem", although for other planets than Earth; we could call it "eso-astronomy" ;-)

I am trying to figure out how to retrieve the right data from Nasa Horizons to plot sun analemmas as seen from other worlds; I found a query which works fine for Earth, but upon changing the observer location from Earth to other planets, things get weird, and I get wrong curves w.r.t "official" curves (although there is not a single analemma curve for each planet, but different curves for different times).

[This](https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&COMMAND=%270%27&CENTER=%27coord@399%27&OBJ_DATA=%27yes%27&MAKE_EPHEM=%27yes%27&TABLE_TYPE=%27OBSERVER%27&REF_PLANE=%27ECLIPTIC%27&COORD_TYPE=%27GEODETIC%27&SITE_COORD=%270,51.48,0%27&START_TIME=%272020/8/20%2012:00%27&STOP_TIME=%272021/8/20%2012:00%27&STEP_SIZE=%271d%27&QUANTITIES=%274%27&FIXED_QUANTITIES=%27Custom%27&REF_SYSTEM=%27J2000%27&OUT_UNITS=%27KM-S%27&VECT_TABLE=%273%27&VECT_CORR=%27NONE%27&CAL_FORMAT=%27CAL%27&ANG_FORMAT=%27HMS%27&APPARENT=%27AIRLESS%27&TIME_TYPE=%27UTC%27&TIME_DIGITS=%27MINUTES%27&RANGE_UNITS=%27AU%27&SUPPRESS_RANGE_RATE=%27no%27&SKIP_DAYLT=%27no%27&EXTRA_PREC=%27yes%27&CSV_FORMAT=%27yes%27&VEC_LABELS=%27yes%27&ELM_LABELS=%27yes%27&TP_TYPE=%27ABSOLUTE%27&R_T_S_ONLY=%27NO%27&CA_TABLE_TYPE=%27STANDARD%27) is the query I am using for Earth analemma centered on Greenwich at 12.00:

Result:
[![Greenwich analemma 12:00](https://i.sstatic.net/unSvO.png)](https://i.sstatic.net/unSvO.png)

Using same coordinates on mars, a longer period, and 1477 minutes as interval (martian day length), I don't get the right plot ([link](https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&COMMAND=%270%27&CENTER=%27coord@499%27&OBJ_DATA=%27yes%27&MAKE_EPHEM=%27yes%27&TABLE_TYPE=%27OBSERVER%27&REF_PLANE=%27ECLIPTIC%27&COORD_TYPE=%27GEODETIC%27&SITE_COORD=%270,51.48,0%27&START_TIME=%272020/8/20%2012:00%27&STOP_TIME=%272022/8/20%2012:00%27&STEP_SIZE=%271477m%27&QUANTITIES=%274%27&FIXED_QUANTITIES=%27Custom%27&REF_SYSTEM=%27J2000%27&OUT_UNITS=%27KM-S%27&VECT_TABLE=%273%27&VECT_CORR=%27NONE%27&CAL_FORMAT=%27CAL%27&ANG_FORMAT=%27HMS%27&APPARENT=%27AIRLESS%27&TIME_TYPE=%27UTC%27&TIME_DIGITS=%27MINUTES%27&RANGE_UNITS=%27AU%27&SUPPRESS_RANGE_RATE=%27no%27&SKIP_DAYLT=%27no%27&EXTRA_PREC=%27yes%27&CSV_FORMAT=%27yes%27&VEC_LABELS=%27yes%27&ELM_LABELS=%27yes%27&TP_TYPE=%27ABSOLUTE%27&R_T_S_ONLY=%27NO%27&CA_TABLE_TYPE=%27STANDARD%27)):

[![Mar analemma 12:00 at "Greenwich" (latitude 51.48)](https://i.sstatic.net/cOLCK.png)](https://i.sstatic.net/cOLCK.png)

The right analemma on Mars is this:

[![Mars real analemma](https://i.sstatic.net/37VN9.png)](https://i.sstatic.net/37VN9.png)

I noticed that Earth analemmas are plotted against Azimuth, but Mars analemmas are plotted against Equation of Time. Why? And how can I do by myself such a plot in Excel?

**Tags:** the-sun, mars


---

## 2 answers

### Answer by username_1 on 2020-08-20. Score: 7

You did two things wrong, one minor, the other major. The minor thing that you did wrong was to chose the solar system barycenter as the target rather than the Sun. Use the Sun.

The major thing you did wrong was to use a step size of 1477 minutes. That is (to within a minute) the length of a Mars sidereal day. The Sun will march across the horizon if you use a sidereal day. What you want is a Mars solar day, which is 1479 minutes and 35 seconds long.

This presents a new problem. Ideally your step size should be 88775 seconds. But you cannot choose seconds as the unit of a step size. You're stuck with minutes, and that is suboptimal. There is another approach:

* Choose the "equal intervals (unitless)" option for the step size,
* Make the time difference between the start and end time be an integral multiple of 88775 seconds, and
* Specify the step size as the integral multiple chosen to determine the time span.

For example, choosing 711 as the integral multiple and 2020-Aug-20 12:00:00 as the start time means the end time should be 2022-Aug-21 01:03:45. You might need to tweet the end time to get the analemma to close up properly.

---

**Edit**  
I noticed that you used the center of Mars. You need a point on the surface to get a proper analemma. Horizons provides several predefined points. If you choose Viking 1 / Chryse @499, you'll have to modify the start and end times so that the Sun is above the horizon. Add 12 hours to the start and end times shown above appears to work very nicely for Viking 1's location.

Below is what I get plotting the Sun's elevation vs azimuth as seen from the Viking 1 / Chryse location, with 711 intervals (712 data points) sampled over the period 2020-Aug-21 00:00:00 to 2022-Aug-21 13:03:35 UT.

[![Mars analemma using data retrieved from Horizons for the Viking 1 / Chryse location. The horizontal and vertical axes are azimuth and elevation, both in degrees](https://i.sstatic.net/EQbzv.png)](https://i.sstatic.net/EQbzv.png)

> **Comments:**
> **username_0**: Thanks, it worked using 711 and suggested dates. I wanted to try that, but I was struggling in convincing Excel giving me the result of today+711 days... :-) But please note that Mars location was already right: I specified "CENTER='coord@499'" and used the triplet "0,51.48,0" (lon, lat, altitude) (SITE_COORD='0,51.48,0'). You can also check it in the output: Center geodetic : 360.000000,51.4800000,-8.38E-13 {W-lon(deg),Lat(deg),Alt(km)}   Playing with Horizons urls and/or site is a mess, that's why I set up my own GUI: http://win98.altervista.org/space/exploration/NHUGUI.html  
> **username_0**: I did a test with martian year duration in sols (668) and it works fine too. Unfortunately I didn't have same luck with Venus, which has very peculiar data: 1,92 sols in a Venus year, 116 days in a sol. I tried with 2020/08/20 12:00 , 2082/02/21 12:00 and 192 steps but it does not work.  
> **username_1**: @username_0 -- The concept of an analemma implicitly assumes a body that rotates about its own axis much more quickly than it orbits the Sun. For a body that does rotate quickly, the position of the Sun in the sky will be but slightly different than it was exactly one solar day earlier. The progression over the course of one orbit will result in a large number of points that form a nice curve that is easily discernible to the eye. But if the planet rotates very slowly, the jump from one day to the next will be large and you will not get this nice, easily-discernible curve.  
> **username_0**: Yes but this site provides analemmas for all planets: http://pbarbier.com/eqtime/eqtime.html  

---

### Answer by username_0 on 2020-08-20. Score: 3

Thanks to the help from @username_1, here it is an example of [correct URL/query](https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1&COMMAND=%2710%27&CENTER=%27coord@499%27&OBJ_DATA=%27yes%27&MAKE_EPHEM=%27yes%27&TABLE_TYPE=%27OBSERVER%27&REF_PLANE=%27ECLIPTIC%27&COORD_TYPE=%27GEODETIC%27&SITE_COORD=%270,90,0%27&START_TIME=%272020-Aug-20%2012:00:00%27&STOP_TIME=%272022-Aug-21%2001:03:45%27&STEP_SIZE=%27711%27&QUANTITIES=%274%27&FIXED_QUANTITIES=%27Custom%27&REF_SYSTEM=%27J2000%27&OUT_UNITS=%27KM-S%27&VECT_TABLE=%273%27&VECT_CORR=%27NONE%27&CAL_FORMAT=%27CAL%27&ANG_FORMAT=%27HMS%27&APPARENT=%27AIRLESS%27&TIME_TYPE=%27UTC%27&TIME_DIGITS=%27MINUTES%27&RANGE_UNITS=%27AU%27&SUPPRESS_RANGE_RATE=%27no%27&SKIP_DAYLT=%27no%27&EXTRA_PREC=%27yes%27&CSV_FORMAT=%27yes%27&VEC_LABELS=%27yes%27&ELM_LABELS=%27yes%27&TP_TYPE=%27ABSOLUTE%27&R_T_S_ONLY=%27NO%27&CA_TABLE_TYPE=%27STANDARD%27) to get Mars analemma.

In readable format:

* <https://ssd.jpl.nasa.gov/horizons_batch.cgi?batch=1>
* **COMMAND='10'** (Target = Sun; do not confuse with "0", Solar System baricenter)
* **CENTER='coord@499'** (Observer on Mars surface)
* OBJ\_DATA='yes'
* MAKE\_EPHEM='yes'
* TABLE\_TYPE='OBSERVER'
* REF\_PLANE='ECLIPTIC'
* COORD\_TYPE='GEODETIC'
* **SITE\_COORD='0,90,0'** (Mars location on surface; Longitude, Latitude, Altitude)
* **START\_TIME='2020-08-20 12:00:00'**
* **STEP\_SIZE='668'** (Number of segments the start-stop interval is split into. This number determines the length of the day; the martian solar day (\*) lasts 88775 seconds, or 1479 minutes and 35 seconds, but Horizons does not allow specifying step in seconds neither in fractional minutes. And specifying 1479 or 1480 would result in a wrong analemma curve. But Horizons accepts a dimensionless parameter, which means "number of steps between given dates". Hence, you will put here the number of Sols between start and stop date. One martian year last 668.6 sols. Both 668 or 669 will give right results, just a shorter or longer curve, as long as same value is used to calculate STOP\_TIME.)
* **STOP\_TIME='2022-07-07 20:44'** ("Stop time" minus "start time", expressed in seconds, must be multiple of 88775 seconds, the duration of Martian **solar** day (\*). In a spreadhseet, you would add to the start date: (88775 \* NumberOfSols) / 86400 )
* **QUANTITIES='4'** (Output=Altitude/Azimuth)
* FIXED\_QUANTITIES='Custom'
* REF\_SYSTEM='J2000'
* OUT\_UNITS='KM-S'
* VECT\_TABLE='3'
* VECT\_CORR='NONE'
* CAL\_FORMAT='CAL'
* ANG\_FORMAT='HMS'
* APPARENT='AIRLESS'
* TIME\_TYPE='UTC'
* TIME\_DIGITS='MINUTES'
* RANGE\_UNITS='AU'
* SUPPRESS\_RANGE\_RATE='no'
* SKIP\_DAYLT='no'
* EXTRA\_PREC='yes'
* CSV\_FORMAT='yes'
* VEC\_LABELS='yes'
* ELM\_LABELS='yes'
* TP\_TYPE='ABSOLUTE'
* R\_T\_S\_ONLY='NO'
* CA\_TABLE\_TYPE='STANDARD'

Possibly not all parameters are mandatory, this URl is automatically generated by [NHUGUI](http://win98.altervista.org/space/exploration/NHUGUI.html).

Highlighted are the parameters specific for the analemma.

Picture below show analemmas generated for Time 12:00 at longitude 0° and latitudes 0°, 45° and 90°.

[![Mars analemmas](https://i.sstatic.net/eFcwD.png)](https://i.sstatic.net/eFcwD.png)

This image shows how to setup a spreadsheet to automatically calculate stop date, given start date, year duration in sols and sol duration in earth-seconds:
[![Spreadhseet setup](https://i.sstatic.net/iAnnM.png)](https://i.sstatic.net/iAnnM.png)

(\*) NOT sidereal day; by definition, solar day is relative to Sun rather than stars, and analemma is a curve relative to Sun. A Mars solar day is named "Sol" and lasts 88775.245 Earth-seconds


---

