How can I get orbit reference and LVLH reference frames?

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!

Hi Sergio
If it might be helpful, a function that converts from LVLH to J2000
(in Java)

  public static Vector3D getVectorLVLHtoJ2000(SpacecraftState currentState, Vector3D lvlhDirection) {
    //Get EME2000 position [m] and velocity [m/s]
    Frame eme2000 = FramesFactory.getEME2000();
    Frame scFrame = currentState.getFrame();
    Transform toEme2000 = scFrame.getTransformTo(eme2000, currentState.getDate());
    PVCoordinates pvEme2000 = toEme2000.transformPVCoordinates(currentState.getPVCoordinates());

    //Rotation from J2000 to LVLH
    Rotation rotate = LOFType.LVLH_CCSDS.rotationFromInertial(pvEme2000);

    //Return rotated vector
    return rotate.applyInverseTo(lvlhDirection);
  }
  }

Alberto

2 Likes