<< CL_kp_anomConvertCir Orbit properties CL_kp_characteristics >>

celestlab >> Orbit properties > CL_kp_apsConvert

CL_kp_apsConvert

Conversion between quantities at periapsis or apoapsis (or at infinity)

Calling Sequence

[res1, res2...] = CL_kp_apsConvert(type1, val1, type2, val2, output [[, mu]])

Description

Parameters

type1:

(string) Type of 1st quantity - see above for details. (1x1)

val1:

Value of 1st quantity. [m or m/s or -] (1xN or 1x1)

type2:

(string) Type of 2nd quantity - see above for details. (1x1)

val2:

Value of 2nd quantity. [m or m/s or -] (1xN or 1x1)

output:

(string) Names of wanted results - see above for details. (1xP)

mu:

(optional) Gravitational constant. Default: %CL_mu. [m^3/s^2] (1x1)

res1, res2...:

Results. [m or m/s or -] (1xN)

Authors

See also

Examples

// Example 1
sma = 7.e6;
ecc = 1.e-2;
// Computes ra and rp from sma and ecc
[ra, rp] = CL_kp_apsConvert("sma", sma, "ecc", ecc, ["ra", "rp"])
// Computes everything from ra and rp
res = CL_kp_apsConvert("ra", ra, "rp", rp, "all")

// Example 2: Hohmann transfer
r1 = 7.e6;
r2 = 8.e6;
v1 = CL_kp_apsConvert("rp", r1, "ra", r1, ["vp"]);
v2 = CL_kp_apsConvert("rp", r2, "ra", r2, ["vp"]);
[vp, va] = CL_kp_apsConvert("rp", r1, "ra", r2, ["vp", "va"]);
dv_hohmann = (vp - v1) + (v2 - va);
dv_hohmann - CL_man_dvHohmann(r1, r2) // => 0

// Example 3
// Note that rp can be greater or smaller than ra
ra = 8.e6;
rp = ra + (-1 : 0.1 : 1) * 1.e6;
vp = CL_kp_apsConvert("rp", rp, "ra", ra, ["vp"]);
scf();
plot(rp / 1000, vp);

Report an issue
<< CL_kp_anomConvertCir Orbit properties CL_kp_characteristics >>