Description
Transforms the input vector from this axes into the output axes.
Syntax
Parameters
Remarks
See Also
Example
Transform a vector to the Earth's Fixed axes.
[C#] |
---|
// Get the satellite's ICRF cartesian position at 180 EpSec using the data provider interface
int numEpSec = 180;
IAgDataProviderGroup dpGroup = sat.DataProviders["Cartesian Position"] as IAgDataProviderGroup;
Array elements = new object[] { "x", "y", "z" };
IAgDataPrvTimeVar dp = dpGroup.Group["ICRF"] as IAgDataPrvTimeVar;
IAgDrResult dpResult = dp.ExecElements(numEpSec, numEpSec, 60, ref elements);
double xICRF = (double)dpResult.DataSets[0].GetValues().GetValue(0);
double yICRF = (double)dpResult.DataSets[1].GetValues().GetValue(0);
double zICRF = (double)dpResult.DataSets[2].GetValues().GetValue(0);
// Create a vector using the ICRF coordinates
IAgCrdnAxes axesICRF = sat.Vgt.WellKnownAxes.Earth.ICRF;
IAgCartesian3Vector vectorICRF = Application.ConversionUtility.NewCartesian3Vector();
vectorICRF.Set(xICRF, yICRF, zICRF);
// Use the Transform method to transform ICRF to Fixed
IAgCrdnAxes axesFixed = sat.Vgt.WellKnownAxes.Earth.Fixed;
IAgCrdnAxesTransformResult result = axesICRF.Transform(numEpSec, axesFixed, vectorICRF);
// Get the Fixed coordinates
double xFixed = result.Vector.X;
double yFixed = result.Vector.Y;
double zFixed = result.Vector.Z;
|
|
Transform a vector to the Earth's Fixed axes.
[Visual Basic .NET] |
---|
' Get the satellite's ICRF cartesian position at 180 EpSec using the data provider interface
Dim numEpSec As Integer = 180
Dim dpGroup As IAgDataProviderGroup = TryCast(sat.DataProviders("Cartesian Position"), IAgDataProviderGroup)
Dim elements As Array = New Object() {"x", "y", "z"}
Dim dp As IAgDataPrvTimeVar = TryCast(dpGroup.Group("ICRF"), IAgDataPrvTimeVar)
Dim dpResult As IAgDrResult = dp.ExecElements(numEpSec, numEpSec, 60, elements)
Dim xICRF As Double = DirectCast(dpResult.DataSets(0).GetValues().GetValue(0), Double)
Dim yICRF As Double = DirectCast(dpResult.DataSets(1).GetValues().GetValue(0), Double)
Dim zICRF As Double = DirectCast(dpResult.DataSets(2).GetValues().GetValue(0), Double)
' Create a vector using the ICRF coordinates
Dim axesICRF As IAgCrdnAxes = sat.Vgt.WellKnownAxes.Earth.ICRF
Dim vectorICRF As IAgCartesian3Vector = Application.ConversionUtility.NewCartesian3Vector()
vectorICRF.[Set](xICRF, yICRF, zICRF)
' Use the Transform method to transform ICRF to Fixed
Dim axesFixed As IAgCrdnAxes = sat.Vgt.WellKnownAxes.Earth.Fixed
Dim result As IAgCrdnAxesTransformResult = axesICRF.Transform(numEpSec, axesFixed, vectorICRF)
' Get the Fixed coordinates
Dim xFixed As Double = result.Vector.X
Dim yFixed As Double = result.Vector.Y
Dim zFixed As Double = result.Vector.Z
|
|