Handling of Solar Longitude #755
-
Hi! I'm working on a project where I want to find the Solar Longitude at any given time. As described at https://en.wikipedia.org/wiki/Solar_longitude, this number describes where the sun is along the ecliptic. It is zero on the Vernal Equinox. Because it completes a full cycle once a year, and with 365 days in a year, this value, as observed from Earth, increases approximately one degree per day. Resources for Solar Longitude are hard to find, but given that it describes the sun's movement along the ecliptic, we should be able to make it work in Skyfield. I stumbled across a promising opportunity while looking at the Skyfield Examples, where it describes getting the Moon's phase by computing the Ecliptic Longitude of the moon and sun - this sounds like what I'm looking for! In order to evaluate whether I can calculate Ecliptic Longitudes, I figured the best way to validate the robustness of my solution is to find Ecliptic Longitude as viewed from Mars, given that I have convenient tables available of known values. Wikipedia offers its small table, pulled from the Planetary Society's Mars Calendar, itself coming from a 2010 research paper, which finally sources itself with "Obtained from US Naval Observatory Multiyear Interactive Computer Almanac, 1800–2050." I don't have access to this almanac, so this will be the end of my ability to validate a primary source for this data. From the Planetary Society page, I chose Spring Equinox 25, which apparently occurred on May 31, 2000. Given that it's a Martian Spring Equinox, the Solar Longitude on that day was zero. I then put together this Skyfield script.
When I run this, I get a latitude near zero (which is good, the Sun shouldn't stray far from 0 ecliptic latitude), but the longitude is 264 degrees - not the zero degrees I expected on the Martian Spring Equinox. The full output is: I assume I'm misusing some of the Skyfield utilities, but I'm not sure how. Why do I find a Martian Solar Longitude which is so different from the known values I expect? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Happily, there are lots of tools that provide heliocentric longitude numbers that you can check a Python script against if you want to verify that you are getting the right number. For example, the web-based NASA HORIZONS system has a table field "Observer ecliptic lon. & lat." you can turn on when generating an ephemeris for an object—look under item 5, "Table settings": https://ssd.jpl.nasa.gov/horizons/app.html#/ You could also try the Stellarium interactive planetarium program; if you click on a star or planet, the ecliptic coordinates should be displayed. My guess is that the reason that you are getting 264° is that the Martian seasons, its equinoxes and solstices, are determined by where its axis points in space, not where Earth's axis points in space—so the poles of the Martian celestial sphere point somewhere different than ours do, which means its equator intersects the ecliptic somewhere different. The Skyfield |
Beta Was this translation helpful? Give feedback.
Happily, there are lots of tools that provide heliocentric longitude numbers that you can check a Python script against if you want to verify that you are getting the right number. For example, the web-based NASA HORIZONS system has a table field "Observer ecliptic lon. & lat." you can turn on when generating an ephemeris for an object—look under item 5, "Table settings":
https://ssd.jpl.nasa.gov/horizons/app.html#/
You could also try the Stellarium interactive planetarium program; if you click on a star or planet, the ecliptic coordinates should be displayed.
My guess is that the reason that you are getting 264° is that the Martian seasons, its equinoxes and solstices, are determined by …