Description
Converts the orbital state specified by elementArray from the fromSystem element set to the toSystem element set, using the central body gravitational parameter specified by mu. This overload can only be used when the fromSystem or toSystem is Spherical Lat-Long. The order of the elements for each element set are listed below (using the Spacecraft properties):
- CARTESIAN: X, Y, Z, VX, VY, VZ
- KEPLERIAN: A, E, I, RAAN, W, TA
- NONSINGULAR_KEPLERIAN: NonSingularA, NonSingularE1, NonSingularE2, NonSingularE3, NonSingularE4, NonSingularE5
- EQUINOCTIAL: EquinoctialA, EquinoctialH, EquinoctialK, EquinoctialP, EquinoctialQ, EquinoctialLongitude
- BROUWER_MEAN: BL_A, BL_E, BL_I, BL_RAAN, BL_W, BL_MA
- J2_BROUWER_MEAN: BLJ2A, BLJ2E, BLJ2I, BLJ2RAAN, BLJ2W, BLJ2MA
- SPHERICAL: SphericalRadius, RA, DEC, Vi, SphericalAzimuth, VerticalFPA
- SPHERICAL_LATLONG: LatLongRadius, Latitude, Longitude, LatLongVi, LatLongAzimuth, HorizontalFPA
- SGP4: Mean I, Mean RAAN, Mean E, Mean W, Mean MA, Mean MeanMotion
- MODIFIED_EQUINOCTIAL: ModifiedEquinoctialP, ModifiedEquinoctialF, ModifiedEquinoctialG, ModifiedEquinoctialH, ModifiedEquinoctialK, ModifiedEquinoctialL
- SGP4 EQUINOCTIAL: Mean EquinoctialH, Mean EquinoctialK, Mean EquinoctialP, Mean EquinoctialQ, Mean EquinoctialLongitude, Mean EquinoctialMeanMotion
Note, when used to convert an element set into SGP4 elements this function is not compatible with the SGP4/SDP4 propagator.
Timing Precision Mode
This page describes functionality in millisecond timing precision mode.
Function Signature
Arguments
fromSystem
|
|
Description:
|
Element set of input state.
|
Valid Values:
|
Value
|
Label
|
1
|
CARTESIAN
|
2
|
KEPLERIAN
|
3
|
NONSINGULAR_KEPLERIAN
|
4
|
EQUINOCTIAL
|
5
|
BROUWER_MEAN
|
6
|
J2_BROUWER_MEAN
|
7
|
SPHERICAL
|
8
|
SPHERICAL_LATLONG
|
9
|
SGP4
|
10
|
MODIFIED_EQUINOCTIAL
|
11
|
SGP4 EQUINOCTIAL
|
|
toSystem
|
|
Description:
|
Element set of output state.
|
Valid Values:
|
Value
|
Label
|
1
|
CARTESIAN
|
2
|
KEPLERIAN
|
3
|
NONSINGULAR_KEPLERIAN
|
4
|
EQUINOCTIAL
|
5
|
BROUWER_MEAN
|
6
|
J2_BROUWER_MEAN
|
7
|
SPHERICAL
|
8
|
SPHERICAL_LATLONG
|
9
|
SGP4
|
10
|
MODIFIED_EQUINOCTIAL
|
11
|
SGP4 EQUINOCTIAL
|
|
epoch
|
|
Description:
|
The TAI epoch of the orbital state in modified Julian date format.
|
elementArray
|
|
Description:
|
A six-element array containing the orbital state in the input element set.
When converting TO Spherical Lat-Long. or SGP4, the input state is assumed to be referenced to the MJ2000 coordinate system. When converting FROM Spherical Lat-Long., the input state is assumed to be in the Earth Fixed coordinate system. When converting FROM SGP4, the input state is assumed to be in the TEME coordinate system.
For all other conversions, the output state will be referenced to the same coordinate system as the input state.
|
Required Size:
|
At least 6
|
mu
|
|
Description:
|
Specifies the value of Mu (gravitational parameter of central body) to use in the element conversion.
|
Units:
|
km3/s2
|
Valid Range:
|
mu > 0
|
Return Value
Type:
|
Array of number (size = 6)
|
Returns a six-element array containing the orbital state in the output element set. When converting TO Spherical Lat-Long., the output state will be referenced to the Earth Fixed coordinate system. When converting FROM Spherical Lat-Long., the output state will be referenced to the MJ2000 coordinate system.
Syntax
myArray1 = ElementConvert(myVariable1, myVariable2, myVariable3, myArray2, myVariable4);
|
This example converts the state of Spacecraft1 from Cartesian to Spherical Lat/Long elements using the gravitational parameter (mu) of Mars. This shows two different approaches to setting the Spherical array. The output will be the same using any of these approaches; each option is available in order to provide flexibility in the way users can construct their script.
Array Spherical[6]; // Output Array
Array Cartesian[6]; // Element Array to be Converted
Cartesian = {Spacecraft1.X, Spacecraft1.Y, Spacecraft1.Z,
Spacecraft1.VX, Spacecraft1.VY, Spacecraft1.VZ};
// Use fromSystem and toSystem values
Spherical = ElementConvert(CARTESIAN, SPHERICAL_LATLONG, Spacecraft1.Epoch, Cartesian, Mars.Mu);
// Use 1 and 8 to set fromSystem and toSystem values
Spherical = ElementConvert(1, 8, Spacecraft1.Epoch, Cartesian, Mars.Mu);
Report Cartesian, Spherical;
|
|
See also
ElementConvert
Orbit Element Types
|