Bill-Gray / find_orb

Orbit determination from observations
https://www.projectpluto.com/find_orb.htm
GNU General Public License v2.0
98 stars 45 forks source link

Orbital elements in JSON output not correctly normalized into correct range #49

Closed talister closed 1 year ago

talister commented 1 year ago

While fitting 2023 PC, I noticed a discrepancy in the normalization of the mean anomaly M between the elements.txt, which was correctly in the range of 0...360 degrees and the value in the elements.json which wasn't. elements.txt:

Orbital elements:  2023 PC
   Perihelion 2023 Nov 18.166035 +/- 0.0107246 TT =  3:59:05 (JD 2460266.666035)
Epoch 2023 Aug 17.0 TT = JDT 2460173.5   Earth MOID: 0.0313   Ve: 0.0980
M 265.36145981 +/- 0.0118074        (J2000 ecliptic)          Find_Orb
n   1.01580516 +/- 9.82149e-6       Peri.  311.44475 +/- 0.0027232
a   0.98008205 +/- 6.31727e-6       Node   126.07916 +/- 0.0005508
e   0.1829179 +/- 8.47122e-5        Incl.    5.58480 +/- 0.0032467
P   0.97/354.39d           H 24.6   G  0.15   U  5.0  
q 0.80080746 +/- 7.78775e-5    Q 1.15935663 +/- 9.04761e-5
34 of 45 observations 2023 July 10-Aug. 10; mean residual 0".22

elements.json (relevant segment only, MOIDS trimmed):

  "elements":
  {
    "central body": "Sun",
    "epoch":  2460173.50000000,
    "M": -94.63854019, "M sigma": 0.0118074,
    "n":   1.01580517, "n sigma": 9.82149e-6,
    "a":   0.98008205, "a sigma": 6.31727e-6,
    "e":   0.18291793, "e sigma": 8.47122e-5,
    "q":   0.80080747, "q sigma": 7.78775e-5,
    "Q":   1.15935664, "Q sigma": 9.04761e-5,
    "i":   5.58480168, "i sigma": 0.0032467,
    "arg_per":  311.44475676, "arg_per sigma":  0.0027232,
    "asc_node": 126.07916128, "asc_node sigma": 0.0005508,
    "Tp": 2460266.66603521, "Tp sigma": 0.0107246,
    "H":   0.15,
  },

Files attached (JSON file renamed to elements_json.txt since github doesn't allow upload of that type) elements.txt elements_json.txt

Bill-Gray commented 1 year ago

Hi Tim - this is something that I fixed a while back in the source code. I think you're running a version that's at least three years old. (If you hit '.', you'll get some data that includes the version date.)

I do now notice that the Windows .exes on the site are now about a year old. So they'll fix this bug, but I really ought to post an update; various things have been improved/fixed since then.

Unfortunately, I'm currently in Tucson at CSS. I won't be able to actually do it until I get home very late Saturday. Sometime Sunday, I should be able to build the Windows .exes, put together notes on what's changed (quite a bit, actually), and put a note on the Find_Orb users list. But the version already on the site will at least fix this problem.

talister commented 1 year ago

I do apologize, I had done a fresh git checkout and make && make install so I thought I had the newest version but I discovered that the make install installed to a different place and the version I was picking up in $PATH was indeed from 2019. I have verified that the new version does correctly normalize the values. I'll leave this Issue for you to close as/when you see fit

Bill-Gray commented 1 year ago

Hi Tim -- no worries, just as well to nudge me on the elderly Windows .exes...