Is there an easy way of obtaining the orbit reference frames (centered in the main body, x-axis pointing to the perigee, y-axis pointing to the direction of velocity at the perigee, and z-axis completing the frame) and the LVLH (x-axis pointing to velocity, y-axis to main body) frame given an orbit or SpacecraftState?
I looked both at the frames package and the orbit class and could not find anything related. I could have missed something though.
The first one (aligned with lines of apsides) does not exist yet in Orekit.
The second one is supported by the LOFType enumerate in the frames package with numerous supported conventions.
In fact the first one could be added to the list, however one should be aware that perigee direction computed just from one state would be an osculating direction, and hence would move around depending on orbital perturbations. A typical example would be for Earth observing satellites in sun-synchronous/Earth phased/frozen eccentricity orbits. What is frozen is mean eccentricity, but osculating eccentricity varies a lot and osculating perigee in fact performs one full rotation around Earth every orbit because the short periodic terms on eccentricity are larger than mean eccentricity itself.
I am building a maneuver optimization suite based on Orekit for my master’s thesis. So most of the time I will not be using more perturbations than J2. I mainly want the frame as an easy way to get a vector that is parallel to the velocity at the perigee without the need to propagate the state to the perigee.
I will take a look at the LOFType thanks for your response!