I calculate the geomagnetic field using IGRF model in Matlab. However, the output is in the NED coordinate frame and I want to tranform it into the Body frame.

I've searched everywhere and I cannot find any suitable Rotation Matrix to calculate the IGRF in Orbit or Body frame.

I have found a transformation matrix from NED to ECEF and ECI. So, if anyone knows how to go from ECEF/ECI to Orbital Frame, I would be on your debt :D

  • $\begingroup$ So does this boil down to ECI to LVLH (I'm not sure what you mean by Orbit Frame)? If so, it's a duplicate of this: space.stackexchange.com/questions/33803/eci-to-lvlh-conversion $\endgroup$ Aug 6, 2019 at 17:00
  • $\begingroup$ @OrganicMarble Not exactly. I have my satellite orbiting around earth with X to be the velocity vector, Z points to Nadir and Y follows the right hand rule. That is my orbit frame. Basically, IGRF returns the Output in NED frame and I want to transfer it in the satellite's frame (body frame). I also have the R_BO (Rotational matrix from Orbit to Body frame), so if i can manage to find the magnetic field in the Orbit frame, I can transfer it in the body frame using the R_BO $\endgroup$
    – PoSeiDon
    Aug 6, 2019 at 17:16
  • $\begingroup$ Well, take a look at that question and see if the answer helps you anyway. What you are describing sounds like LVLH to me. $\endgroup$ Aug 6, 2019 at 17:17
  • $\begingroup$ @PoSeiDon I suggest to inject these into your question. A good question has all this 3: 1) what you want 2) what you tried 3) why it didn't work. $\endgroup$
    – peterh
    Aug 6, 2019 at 18:35

1 Answer 1


The direction cosine matrix relating the orbit frame and an inertial frame is as followed. Essentially it is a 3-1-3 body-two rotation sequence. I talk about the DCM a little more in detail here (Calculate Argument of periapsis of orbit given focus and two points on ellipse). You will need to know all your orbital parameters in order to calculate this DCM though.

Orbit-inettial DCM

NOTE: Theta is not true anomaly but true anomaly minus the argument of periapsis. Omega is the right angle to the ascending node and i is inclination.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.