STK Vector Geometry ToolSend comments on this topic.
Transform Method (IAgCrdnAxes)
See Also
Epoch
Specify an epoch.
OutputAxes
Specify an axes the input vector is transformed into.
VectorInMyAxes
Specify an input vector to be transformed from this axes into the output axes.
Windows





Windows & Linux

Description

Transforms the input vector from this axes into the output axes.

Syntax

[Visual Basic .NET]
Public Function Transform( _
    ByVal Epoch As System.Object, _
    ByVal OutputAxes As IAgCrdnAxes, _
    ByVal VectorInMyAxes As IAgCartesian3Vector _
) As IAgCrdnAxesTransformResult
[Unmanaged C++]
public: HRESULT Transform(
    VARIANT Epoch,
    IAgCrdnAxes * OutputAxes,
    IAgCartesian3Vector * VectorInMyAxes,
    IAgCrdnAxesTransformResult ** ppRetVal
);
[Python - STK API ]
def Transform(self, Epoch:typing.Any, OutputAxes:"IAgCrdnAxes", VectorInMyAxes:"IAgCartesian3Vector") -> "IAgCrdnAxesTransformResult":

Parameters

Epoch
Specify an epoch.
OutputAxes
Specify an axes the input vector is transformed into.
VectorInMyAxes
Specify an input vector to be transformed from this axes into the output axes.

Remarks

Consider a vector rotating and changing its magnitude in space. The vector's direction and magnitude as well as its time rate of change can be given at some specified time using Cartesian coordinates in one of VGT coordinate axes. The same vector at the same time will have different Cartesian coordinates with respect to different VGT coordinate axes. One set of coordinates can be obtained from the other using Transform methods defined for VGT coordinate axes: given time and coordinates with respect to one VGT coordinate axes, these methods output coordinates with respect to other axes. For example, consider a position vector of a satellite defined as displacement vector between the center of the Earth and the center of the satellite. When this position vector is viewed with respect to the Moon fixed axes, its magnitude remains the same because the vector is still a displacement vector between the Earth center and the center of satellite. Its Cartesian coordinates with respect to the Moon fixed axes will be different but not its magnitude.

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
© 2024 Analytical Graphics, Inc. All Rights Reserved.