Skip to content

Commit 67cd326

Browse files
authored
add util to fetch new orbit data elemets from JPL for ssystem_major, refs #4894 (#4908)
1 parent 14da6c6 commit 67cd326

4 files changed

Lines changed: 1572 additions & 90 deletions

File tree

data/ssystem_major.ini

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ absolute_magnitude=12.2
106106
albedo=0.04
107107
color=1., 0.9, 0.75
108108
name=Ananke
109-
orbit_AscendingNode=44.39093600694746
110-
orbit_Eccentricity=0.2167681894364261
111-
orbit_Epoch=2454619.50000
112-
orbit_Inclination=148.5711484137670
113-
orbit_LongOfPericenter=140.3109688567360000
114-
orbit_MeanLongitude=14.7478795145449000
115-
orbit_Period=648.6406641467003
116-
orbit_SemiMajorAxis=21600750.92227203
109+
orbit_AscendingNode=104.636845425029
110+
orbit_Eccentricity=0.1624347341275647
111+
orbit_Epoch=2461172.5
112+
orbit_Inclination=150.44203958061
113+
orbit_LongOfPericenter=243.558170159683
114+
orbit_MeanLongitude=281.155362754205
115+
orbit_Period=635.251164197496
116+
orbit_SemiMajorAxis=21302457.6999738
117117
parent=Jupiter
118118
radius=10
119119
rot_equator_ascending_node=213.7
@@ -236,14 +236,14 @@ color=1., 0.9, 0.75
236236
# source: https://arxiv.org/pdf/1803.01907.pdf
237237
color_index_bv=0.76
238238
name=Carme
239-
orbit_AscendingNode=157.3089190745055
240-
orbit_Eccentricity=0.2602970868062183
241-
orbit_Epoch=2454619.50000
242-
orbit_Inclination=168.2000198365060
243-
orbit_LongOfPericenter=249.8596440195790000
244-
orbit_MeanLongitude=168.7753954572220000
245-
orbit_Period=691.6548924754876
246-
orbit_SemiMajorAxis=22545456.68297467
239+
orbit_AscendingNode=238.134972157211
240+
orbit_Eccentricity=0.2821422476118344
241+
orbit_Epoch=2461172.5
242+
orbit_Inclination=162.576791273225
243+
orbit_LongOfPericenter=53.972102169784
244+
orbit_MeanLongitude=300.362104158294
245+
orbit_Period=686.257439040126
246+
orbit_SemiMajorAxis=22428011.7701687
247247
parent=Jupiter
248248
radius=15
249249
rot_equator_ascending_node=213.7
@@ -487,14 +487,14 @@ absolute_magnitude=10.0
487487
albedo=0.04
488488
color=1., 0.9, 0.75
489489
name=Elara
490-
orbit_Ascendingnode=108.1879658680286
491-
orbit_Eccentricity=0.1961747274882456
492-
orbit_Epoch=2454619.50000
493-
orbit_Inclination=31.98511468770062
494-
orbit_LongOfPericenter=271.5797601368340000
495-
orbit_MeanLongitude=172.2385623581720000
496-
orbit_Period=258.8836449322499
497-
orbit_SemiMajorAxis=11709431.51919092
490+
orbit_AscendingNode=88.7152914472438
491+
orbit_Eccentricity=0.2283970016050724
492+
orbit_Epoch=2461172.5
493+
orbit_Inclination=30.4070065552925
494+
orbit_LongOfPericenter=306.450259326176
495+
orbit_MeanLongitude=258.826150945454
496+
orbit_Period=257.465242197417
497+
orbit_SemiMajorAxis=11666622.2688306
498498
parent=Jupiter
499499
radius=40
500500
rot_equator_ascending_node=213.7
@@ -983,14 +983,14 @@ color=1., 0.9, 0.75
983983
# source: https://arxiv.org/pdf/1803.01907.pdf
984984
color_index_bv=0.69
985985
name=Leda
986-
orbit_AscendingNode=205.5729208452909
987-
orbit_Eccentricity=0.1849972068029340
988-
orbit_Epoch=2454619.50000
989-
orbit_Inclination=28.26096889279179
990-
orbit_LongOfPericenter=133.1912542293990000
991-
orbit_MeanLongitude=276.4502233853120000
992-
orbit_Period=242.2566769525344
993-
orbit_SemiMajorAxis=11202541.76637748
986+
orbit_AscendingNode=183.353312232593
987+
orbit_Eccentricity=0.1505902339706631
988+
orbit_Epoch=2461172.5
989+
orbit_Inclination=30.1126873203495
990+
orbit_LongOfPericenter=154.396551029794
991+
orbit_MeanLongitude=347.072484866374
992+
orbit_Period=240.938361260402
993+
orbit_SemiMajorAxis=11161863.3148253
994994
parent=Jupiter
995995
radius=5
996996
rot_equator_ascending_node=213.7
@@ -1010,14 +1010,14 @@ color=1., 0.9, 0.75
10101010
# source: https://arxiv.org/pdf/1803.01907.pdf
10111011
color_index_bv=0.72
10121012
name=Lysithea
1013-
orbit_AscendingNode=0.2875682490706584
1014-
orbit_Eccentricity=0.1281232102397132
1015-
orbit_Epoch=2454619.50000
1016-
orbit_Inclination=24.59040357245339
1017-
orbit_LongOfPericenter=78.9389828310578000
1018-
orbit_MeanLongitude=337.5492383800380000
1019-
orbit_Period=259.0469768771512
1020-
orbit_SemiMajorAxis=11714356.05630203
1013+
orbit_AscendingNode=333.985216226968
1014+
orbit_Eccentricity=0.1316018764809
1015+
orbit_Epoch=2461172.5
1016+
orbit_Inclination=24.7730747960696
1017+
orbit_LongOfPericenter=97.7161066412075
1018+
orbit_MeanLongitude=79.1794111007221
1019+
orbit_Period=258.379816351343
1020+
orbit_SemiMajorAxis=11694234.2395946
10211021
parent=Jupiter
10221022
radius=12
10231023
rot_equator_ascending_node=213.7
@@ -1268,14 +1268,14 @@ iau_moon_number=NXIII
12681268
albedo=0.06
12691269
color=1., 0.9, 0.75
12701270
name=Neso
1271-
orbit_AscendingNode=23.02370632501001
1272-
orbit_Eccentricity=0.6299942939512408
1273-
orbit_Epoch=2454619.50000
1274-
orbit_Inclination=111.8841686447457
1275-
orbit_LongOfPericenter=107.4960759
1276-
orbit_MeanLongitude=74.4524916
1277-
orbit_Period=9358.591084432848
1278-
orbit_SemiMajorAxis=48373926.07254116
1271+
orbit_AscendingNode=39.9455813464827
1272+
orbit_Eccentricity=0.7252258986297754
1273+
orbit_Epoch=2461172.5
1274+
orbit_Inclination=116.440962661999
1275+
orbit_LongOfPericenter=136.810916424016
1276+
orbit_MeanLongitude=328.160131962877
1277+
orbit_Period=9722.55212952078
1278+
orbit_SemiMajorAxis=49620118.1353897
12791279
parent=Neptune
12801280
radius=60
12811281
rot_equator_ascending_node=213.7
@@ -1431,14 +1431,14 @@ absolute_magnitude=10.33
14311431
albedo=0.04
14321432
color=1., 0.9, 0.75
14331433
name=Pasiphae
1434-
orbit_AscendingNode=345.6392561172470
1435-
orbit_Eccentricity=0.2932152942598935
1436-
orbit_Epoch=2454619.50000
1437-
orbit_Inclination=142.0571683364765
1438-
orbit_LongOfPericenter=185.9358722739560000
1439-
orbit_MeanLongitude=155.7385593991940000
1440-
orbit_Period=709.0532625178348
1441-
orbit_SemiMajorAxis=22921971.82698924
1434+
orbit_AscendingNode=75.0892735463153
1435+
orbit_Eccentricity=0.4080362053444755
1436+
orbit_Epoch=2461172.5
1437+
orbit_Inclination=154.372463471177
1438+
orbit_LongOfPericenter=343.958559279333
1439+
orbit_MeanLongitude=261.997808682125
1440+
orbit_Period=779.532806335631
1441+
orbit_SemiMajorAxis=24416814.0924104
14421442
parent=Jupiter
14431443
radius=18
14441444
rot_equator_ascending_node=213.7
@@ -1486,14 +1486,14 @@ color=1., 0.9, 0.75
14861486
color_index_bv=0.58
14871487
name=Phoebe
14881488
# Osculating orbital elements from Horizons
1489-
orbit_AscendingNode=5.471174052957098E+01
1490-
orbit_Eccentricity=1.504428756770607E-01
1491-
orbit_Epoch=2457939.5
1492-
orbit_Inclination=1.522360480930054E+02
1493-
orbit_LongOfPericenter=340.857346218
1494-
orbit_MeanLongitude=249.190845435
1495-
orbit_Period=5.472983303386385E+02
1496-
orbit_SemiMajorAxis=1.290340171828820E+07
1489+
orbit_AscendingNode=55.3384193424451
1490+
orbit_Eccentricity=0.1771141903802747
1491+
orbit_Epoch=2461172.5
1492+
orbit_Inclination=152.538033465177
1493+
orbit_LongOfPericenter=337.616767756425
1494+
orbit_MeanLongitude=206.818716734368
1495+
orbit_Period=549.475194535135
1496+
orbit_SemiMajorAxis=12937594.3623976
14971497
parent=Saturn
14981498
radius=106.5
14991499
rot_equator_ascending_node=0
@@ -1598,14 +1598,14 @@ iau_moon_number=NX
15981598
albedo=0.06
15991599
color=1., 0.9, 0.75
16001600
name=Psamathe
1601-
orbit_AscendingNode=312.6542992791928
1602-
orbit_Eccentricity=0.2226171984343604
1603-
orbit_Epoch=2454619.50000
1604-
orbit_Inclination=119.8213439712103
1605-
orbit_LongOfPericenter=122.424815
1606-
orbit_MeanLongitude=45.2205867
1607-
orbit_Period=9130.624091904599
1608-
orbit_SemiMajorAxis=47585137.76667986
1601+
orbit_AscendingNode=313.212243486427
1602+
orbit_Eccentricity=0.1729056858523589
1603+
orbit_Epoch=2461172.5
1604+
orbit_Inclination=117.298311935016
1605+
orbit_LongOfPericenter=129.308745302416
1606+
orbit_MeanLongitude=306.354354984734
1607+
orbit_Period=9487.57921657462
1608+
orbit_SemiMajorAxis=48817389.3269963
16091609
parent=Neptune
16101610
radius=40
16111611
rot_equator_ascending_node=213.7
@@ -1733,14 +1733,14 @@ color=1., 0.9, 0.75
17331733
# source: https://arxiv.org/pdf/1803.01907.pdf
17341734
color_index_bv=0.77
17351735
name=Sinope
1736-
orbit_AscendingNode=337.3608948461959
1737-
orbit_Eccentricity=0.1823445283881716
1738-
orbit_Epoch=2454619.50000
1739-
orbit_Inclination=153.0924984377859
1740-
orbit_LongOfPericenter=334.0923761708530000
1741-
orbit_MeanLongitude=187.6932736301600000
1742-
orbit_Period=778.6442493765837
1743-
orbit_SemiMajorAxis=24398256.25007371
1736+
orbit_AscendingNode=45.8202859933618
1737+
orbit_Eccentricity=0.2831132988165712
1738+
orbit_Epoch=2461172.5
1739+
orbit_Inclination=157.901094053687
1740+
orbit_LongOfPericenter=111.502754296059
1741+
orbit_MeanLongitude=183.598166979196
1742+
orbit_Period=722.514661081154
1743+
orbit_SemiMajorAxis=23211177.6000168
17441744
parent=Jupiter
17451745
radius=14
17461746
rot_equator_ascending_node=213.7
@@ -1881,14 +1881,14 @@ absolute_magnitude=9.0
18811881
albedo=0.047
18821882
color=1., 0.9, 0.75
18831883
name=Thebe
1884-
orbit_AscendingNode=138.9957928276344
1885-
orbit_Eccentricity=0.01927638586266499
1886-
orbit_Epoch=2454619.50000
1887-
orbit_Inclination=1.088672216784552
1888-
orbit_LongOfPericenter=210.7720658394820000
1889-
orbit_MeanLongitude=170.4877537965110000
1890-
orbit_Period=0.6777043648601361
1891-
orbit_SemiMajorAxis=222412.7038632125
1884+
orbit_AscendingNode=317.707436988255
1885+
orbit_Eccentricity=0.01879753794359612
1886+
orbit_Epoch=2461172.5
1887+
orbit_Inclination=1.06731913786618
1888+
orbit_LongOfPericenter=57.2852110786399
1889+
orbit_MeanLongitude=108.467254294058
1890+
orbit_Period=0.677680577823304
1891+
orbit_SemiMajorAxis=222407.498047356
18921892
parent=Jupiter
18931893
radius=49.3
18941894
rot_equator_ascending_node=213.7

guide/app_ssystem_ini.tex

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,122 @@ \subsubsection{How to manually look up a body}
722722
\noindent The displayed trajectory should start at Voyager~2's encounter with Neptune on August 18, 1989 (JD 2447757.5).
723723
The value of \texttt{orbit\_good=} ($2460554.5-2447757.5 = $) \texttt{12797} fulfills this idea.
724724

725+
\subsubsection{How to check and update moons orbital elements}
726+
\label{sec:ssystem.ini:MoonsOrbitalElements}
727+
\sectionauthor*{Stefan Schöfegger}
728+
729+
If not handled by dedicated orbital functions, moons orbiting planets are modelled in Stellarium using Keplerian orbits. While this
730+
approach is computationally efficient, it does not account for gravitational perturbations
731+
caused by other planets and the Sun. Over longer time spans these perturbations cause the
732+
predicted positions to drift noticeably from the true positions, so the orbital elements
733+
need to be refreshed periodically.
734+
735+
Two Python scripts are provided to support this process. Both scripts require as their first
736+
argument the path to \texttt{ssystem\_major.ini}.
737+
738+
The scripts require the Python libraries \texttt{requests} and \texttt{matplotlib}, which
739+
can be installed via:
740+
\begin{commands}
741+
pip3 install requests matplotlib
742+
\end{commands}
743+
744+
\paragraph{Comparing positions against JPL Horizons}
745+
746+
747+
\texttt{compare\_ssystem\_major\_JPL.py} queries the JPL Horizons system for reference
748+
positions and compares them with the positions currently computed by Stellarium. It
749+
produces a PDF report containing one angular-error plot per object as well as a summary
750+
on the last pages. In addition, a CSV-formatted summary is printed to the console.
751+
752+
\texttt{compare\_ssystem\_major\_JPL.py} requires a running instance of Stellarium with
753+
the \textbf{Remote Control Plugin} enabled and active.
754+
755+
For maximum positional accuracy when comparing, the following options can be set in
756+
Stellarium before running the script:
757+
\begin{itemize}
758+
\item Geocentric coordinates: \textit{Tools:} uncheck \textit{Topocentric coordinates}
759+
\item Apparent coordinates (equinox of date)
760+
\item TT timescale: \textit{Time:} \textit{Time correction} $\rightarrow$ \textit{Without correction}
761+
\end{itemize}
762+
However, for the sole purpose of assessing moon orbital parameters -- for example with a
763+
maximum allowed error of 2\,arcmin -- these settings are not required.
764+
765+
\begin{commands}
766+
python3 compare_ssystem_major_JPL.py [options] <file> [object]
767+
768+
positional arguments:
769+
file Path to ssystem_major.ini
770+
object Optional: compare only this named object
771+
772+
options:
773+
--years Time range in years (default: 2)
774+
--step Step size in days (default: 7)
775+
--out Output PDF filename (default: ssystem_compare.pdf)
776+
--stellarium Stellarium base URL (default: http://localhost:8090)
777+
--delay Seconds to wait after setting Stellarium time
778+
(default: 0.05)
779+
--max-error Warn if maximum angular error exceeds this value in
780+
arcminutes
781+
782+
# Examples:
783+
python3 compare_ssystem_major_JPL.py ./ssystem_major.ini
784+
python3 compare_ssystem_major_JPL.py ./ssystem_major.ini himalia
785+
python3 compare_ssystem_major_JPL.py ./ssystem_major.ini --years 1\
786+
--out compare.pdf
787+
\end{commands}
788+
789+
If no object name is given, all objects defined in \texttt{ssystem\_major.ini} are
790+
evaluated. The \texttt{--max-error} option can be used to flag objects whose maximum
791+
error exceeds a chosen threshold, making it easy to identify moons that require updated
792+
elements.
793+
794+
\paragraph{Fetching updated orbital elements from JPL Horizons}
795+
796+
\texttt{fetch\_ssystem\_major.py} retrieves updated orbital elements from JPL Horizons
797+
and prints a modified version of \texttt{ssystem\_major.ini} to the console. Only the
798+
orbital parameters are updated; all other entries remain unchanged. The output can be
799+
reviewed and then manually merged into \texttt{ssystem\_major.ini}.
800+
801+
\begin{commands}
802+
python3 fetch_ssystem_major.py [options] <file> [object]
803+
804+
positional arguments:
805+
file Path to ssystem_major.ini
806+
object Optional: update only one named object
807+
808+
# Example:
809+
python3 fetch_ssystem_major.py ./ssystem_major.ini himalia
810+
\end{commands}
811+
812+
Again, omitting the object name causes all objects in the file to be updated.
813+
814+
Always review the updated elements carefully before committing them. Freshly fetched
815+
parameters are valid near the current epoch but may not improve long-term accuracy for
816+
all objects equally.
817+
818+
Note that the newly fetched elements are fitted to the current epoch. Deviations will
819+
therefore still appear over time, both in the past and in the future, and will be visible
820+
in a subsequent comparison run. These residual errors should, however, be smaller than
821+
those produced by the previously stored orbital elements for current time.
822+
823+
\paragraph{Recommended workflow}
824+
825+
\begin{enumerate}
826+
\item Run \texttt{compare\_ssystem\_major\_JPL.py} over the full object list and inspect
827+
the resulting PDF to identify moons with large angular errors.
828+
\item For each problematic moon, run \texttt{fetch\_ssystem\_major.py} with the object
829+
name to fetch updated elements from JPL Horizons.
830+
\item Run \texttt{compare\_ssystem\_major\_JPL.py} again for the same object to verify
831+
that the new elements reduce the error. Comparing the before and after plots
832+
provides a clear picture of the improvement.
833+
\item Repeat as needed for additional objects.
834+
\end{enumerate}
835+
836+
725837
\subsection{Multiple Epochs for Minor Planets}
726838
\label{sec:ssystem.ini:MultiEpoch}
727-
\indexterm{asteroid!multi-epoch ephemeris}
728-
\indexterm{JPL Horizons!multi-epoch script}
839+
\indexterm[asteroid!multi-epoch ephemeris]{}
840+
\indexterm[JPL Horizons!multi-epoch script]{}
729841

730842
As described in section~\ref{sec:ssystem.ini:minor}, asteroid orbital
731843
elements in \file{ssystem\_minor.ini} are valid only near their epoch.

0 commit comments

Comments
 (0)