Description
Converts the position specified by fromVector from the fromSystem coordinate system to the toSystem coordinate system, referencing the coordinate systems to the specified epoch.
Timing Precision Mode
This page describes functionality in nanosecond timing precision mode.
Function Signature
Arguments
fromSystem
|
|
Description:
|
Coordinate system of input position.
|
Valid Values:
|
Value
|
Label
|
1
|
Mean of J2000 Earth Equator
|
2
|
Mean of J2000 Earth Ecliptic
|
3
|
True of Date Earth Equator
|
4
|
Earth Fixed
|
5
|
Local Coordinates - Longitude
|
6
|
True Equator Mean Equinox
|
7
|
Local Coordinates - Longitude/Latitude
|
8
|
Mean of Date Earth Equator
|
9
|
Mean of 1950 Earth Equator
|
10
|
Moon Fixed (Principle Axis Rotating)
|
11
|
True of Date Rotating
|
12
|
Moon Principle Axis - Inertial at J2000
|
13
|
Moon Principle Axis - Inertial at Epoch
|
14
|
Moon Mean Earth - Rotating
|
15
|
Moon Mean Earth - Inertial at J2000
|
16
|
Moon Mean Earth - Inertial at Epoch
|
17
|
Specify any CelestialObject.ReferenceFrameId
|
|
toSystem
|
|
Description:
|
Coordinate system of output position.
|
Valid Values:
|
Value
|
Label
|
1
|
Mean of J2000 Earth Equator
|
2
|
Mean of J2000 Earth Ecliptic
|
3
|
True of Date Earth Equator
|
4
|
Earth Fixed
|
5
|
Local Coordinates - Longitude
|
6
|
True Equator Mean Equinox
|
7
|
Local Coordinates - Longitude/Latitude
|
8
|
Mean of Date Earth Equator
|
9
|
Mean of 1950 Earth Equator
|
10
|
Moon Fixed (Principle Axis Rotating)
|
11
|
True of Date Rotating
|
12
|
Moon Principle Axis - Inertial at J2000
|
13
|
Moon Principle Axis - Inertial at Epoch
|
14
|
Moon Mean Earth - Rotating
|
15
|
Moon Mean Earth - Inertial at J2000
|
16
|
Moon Mean Earth - Inertial at Epoch
|
17
|
Specify any CelestialObject.ReferenceFrameId
|
|
epoch
|
|
Description:
|
The TAI epoch of the input and/or output position in modified Julian date format. If both the input and output coordinate systems are referenced to an epoch, both will be defined using this epoch.
|
fromVector
|
|
Description:
|
A three-element array containing the position in the input coordinate system.
|
Required Size:
|
At least 3
|
Return Value
Type:
|
Array of number (size = 3)
|
Units:
|
km
|
Returns a three-element array containing the position in the output coordinate system.
Syntax
myArray1 = PositionConvert(myVariable1, myVariable2, myTimeSpan1, myArray2);
|
This example converts the position of Spacecraft1 from MJ2000 Earth Equator coordinates to Earth Fixed coordinates using the Earth.ReferenceFrameIDs.BodyFixed property.
Array PosMJ2000[3];
Array PosECEF[3];
// Position in MJ2000 coordinates
PosMJ2000 = Spacecraft1.Position;
// Convert Spacecraft1's Position from MJ2000 to ECEF using the CelestialObject.ReferenceFrameIDs
PosECEF = PositionConvert(1,Earth.ReferenceFrameIDs.BodyFixed, Spacecraft1.Epoch, PosMJ2000);
Report Spacecraft1.Epoch, PosMJ2000, PosECEF;
|
Output:
Spacecraft1.Epoch
|
28849.500428241
|
PosMJ2000
|
{-3410.673000000 5950.957000000 -1788.627000000}
|
PosECEF
|
{ 6446.685474515 2337.351622515 -1795.215825286}
|
|
See also
PositionConvert
Orbit Reference Frames
|