skyfielders / python-skyfield

Elegant astronomy for Python
MIT License
1.4k stars 211 forks source link

Add right ascension to the output of osculating_elements_of() #674

Closed tjnd89 closed 2 years ago

tjnd89 commented 2 years ago

I've recently started using Skyfield and am calling osculating_elements_of() to get the various orbital parameters of an EarthSatellite. I noticed that right ascension of the ascending node was not one of the available parameters (you have LAAN, but not RAAN). I'm curious if this is by design or an oversight? Thanks!

brandon-rhodes commented 2 years ago

Though @JoshPaterson will be able to answer better, I think that the generic routine argument_of_latitude() routine returns the angle-around-the-great-circle of whichever reference frame you pass in. If you pass in the ecliptic, then the result will be ecliptic longitude. But if you leave it at the default of the ICRS, then I think the “latitude” around the reference frame's great circle will be right ascension.

I'd suggest trying it out — call the method, and see if the results you get back look like the right ascensions you are expecting.

tjnd89 commented 2 years ago

Ok, I checked it out and found that the 'longitude_of_ascending_node is the same as the right ascension of the ascending node. I used a state vector in the GCRS frame and put it into STK and generated the equivalent classical elements there. The LAAN from osculating_elements_of() matched the RAAN from STK. So all is well, it's just the odd name that threw me off. Thanks!