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





Windows & Linux

Description

Transforms the input vector and vector's rate from this axes into the output axes.

Syntax

Parameters

Epoch
Specify an epoch.
OutputAxes
Specify an output axes to transform to.
VectorInMyAxes
Specify an input vector to be transformed from this axes into the output axes.
RateInMyAxes
Specify an input vector rate 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 and vector's rate to the Earth's Fixed axes.
[C#]
int numEpSec = 180;

// Get the satellite's ICRF cartesian position at 180 EpSec using the data provider interface
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);

// Get the satellite's ICRF cartesian velocity at 180 EpSec using the data provider interface
dpGroup = sat.DataProviders["Cartesian Velocity"] as IAgDataProviderGroup;
dp = dpGroup.Group["ICRF"] as IAgDataPrvTimeVar;
dpResult = dp.ExecElements(numEpSec, numEpSec, 60, ref elements);
double xvelICRF = (double)dpResult.DataSets[0].GetValues().GetValue(0);
double yvelICRF = (double)dpResult.DataSets[1].GetValues().GetValue(0);
double zvelICRF = (double)dpResult.DataSets[2].GetValues().GetValue(0);

// Create a position vector using the ICRF coordinates
IAgCrdnAxes axesICRF = sat.Vgt.WellKnownAxes.Earth.ICRF;
IAgCartesian3Vector vectorICRF = Application.ConversionUtility.NewCartesian3Vector();
vectorICRF.Set(xICRF, yICRF, zICRF);

// Create a velocity vector using the ICRF coordinates
IAgCartesian3Vector vectorvelICRF = Application.ConversionUtility.NewCartesian3Vector();
vectorvelICRF.Set(xvelICRF, yvelICRF, zvelICRF);

// Use the TransformWithRate method to transform ICRF to Fixed
IAgCrdnAxes axesFixed = sat.Vgt.WellKnownAxes.Earth.Fixed;
IAgCrdnAxesTransformWithRateResult result = axesICRF.TransformWithRate(numEpSec, axesFixed, vectorICRF, vectorvelICRF);

// Get the Fixed position and velocity coordinates
double xFixed = result.Vector.X;
double yFixed = result.Vector.Y;
double zFixed = result.Vector.Z;
double xvelFixed = result.Velocity.X;
double yvelFixed = result.Velocity.Y;
double zvelFixed = result.Velocity.Z;
Transform a vector and vector's rate to the Earth's Fixed axes.
[Visual Basic .NET]
Dim numEpSec As Integer = 180

' Get the satellite's ICRF cartesian position at 180 EpSec using the data provider interface
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)

' Get the satellite's ICRF cartesian velocity at 180 EpSec using the data provider interface
dpGroup = TryCast(sat.DataProviders("Cartesian Velocity"), IAgDataProviderGroup)
dp = TryCast(dpGroup.Group("ICRF"), IAgDataPrvTimeVar)
dpResult = dp.ExecElements(numEpSec, numEpSec, 60, elements)
Dim xvelICRF As Double = DirectCast(dpResult.DataSets(0).GetValues().GetValue(0), Double)
Dim yvelICRF As Double = DirectCast(dpResult.DataSets(1).GetValues().GetValue(0), Double)
Dim zvelICRF As Double = DirectCast(dpResult.DataSets(2).GetValues().GetValue(0), Double)

' Create a position 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)

' Create a velocity vector using the ICRF coordinates
Dim vectorvelICRF As IAgCartesian3Vector = Application.ConversionUtility.NewCartesian3Vector()
vectorvelICRF.[Set](xvelICRF, yvelICRF, zvelICRF)

' Use the TransformWithRate method to transform ICRF to Fixed
Dim axesFixed As IAgCrdnAxes = sat.Vgt.WellKnownAxes.Earth.Fixed
Dim result As IAgCrdnAxesTransformWithRateResult = axesICRF.TransformWithRate(numEpSec, axesFixed, vectorICRF, vectorvelICRF)

' Get the Fixed position and velocity coordinates
Dim xFixed As Double = result.Vector.X
Dim yFixed As Double = result.Vector.Y
Dim zFixed As Double = result.Vector.Z
Dim xvelFixed As Double = result.Velocity.X
Dim yvelFixed As Double = result.Velocity.Y
Dim zvelFixed As Double = result.Velocity.Z
© 2024 Analytical Graphics, Inc. All Rights Reserved.