<< CL_fr_inertial2tnw Coordinates and frames CL_fr_lvlhMat >>

CelestLab >> Coordinates and frames > CL_fr_locOrbMat

CL_fr_locOrbMat

Inertial frame to custom local orbital frame transformation matrix

Calling Sequence

[M] = CL_fr_locOrbMat(pos, vel, frame_name)
[M, omega] = CL_fr_locOrbMat(frame_name, pos, vel [, acc])

Description

Parameters

pos:

Satellite's position vector relative to the inertial frame [m] (3xN or 3x1)

vel:

Satellite's velocity vector relative to the inertial frame [m/s] (3xN or 3x1)

acc:

(optional) Satellite's acceleration vector relative to the inertial frame or empty. [m/s] (3xN or 3x1)

frame_name:

(string) Name of local frame (1x1)

M:

Inertial to local orbital frame transformation matrix (3x3xN)

omega:

Angular velocity vector of local frame / inertial frame - components in inertial frame (3xN)

Authors

See also

Examples

pos = [3500.e3; 2500.e3; 5800.e3];
vel = [1.e3; 3.e3; 7.e3];

// Example 1: Standard 'qsw' local frame:
M = CL_fr_locOrbMat("qsw", pos, vel)
M = CL_fr_locOrbMat("rtn", pos, vel) // => same
M = CL_fr_qswMat(pos, vel) // => same

// Example 2: 'lvlh' (same as (s, -w, -q)):
M = CL_fr_locOrbMat("lvlh", pos, vel)
M = CL_fr_locOrbMat("sWQ", pos, vel) // => same
M = CL_fr_lvlhMat(pos, vel) // => same

// Example 3: comparison with CL_rot_defFrameVec:
M = CL_fr_locOrbMat("qWs", pos, vel )
M = CL_rot_defFrameVec(pos, vel, 1, 3) // => same

// Example 4: computation of omega (keplerian motion):
// NB: [0;0;0] only valid because local frame is derived from qsw.
[M, omega] = CL_fr_locOrbMat("qsw", pos, vel, [0;0;0])
// NB: gravitational constant is implicit
[M, omega] = CL_fr_locOrbMat("tnw", pos, vel, CL_fo_centralAcc(pos))

Report an issue
<< CL_fr_inertial2tnw Coordinates and frames CL_fr_lvlhMat >>