AGI STK VGT 11Send comments on this topic.
TransformWithRate Method (IAgCrdnAxes)
See Also  Example
Epoch
Specify an epoch. The method may throw an exception if the epoch parameter specified cannot be converted to a currently selected date unit.
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

[Visual Basic .NET]
Public Function TransformWithRate( _
   ByVal Epoch As System.Object, _
   ByVal OutputAxes As IAgCrdnAxes, _
   ByVal VectorInMyAxes As IAgCartesian3Vector, _
   ByVal RateInMyAxes As IAgCartesian3Vector _
) As IAgCrdnAxesTransformWithRateResult
[C#]
public IAgCrdnAxesTransformWithRateResult TransformWithRate(
   System.Object Epoch,
   IAgCrdnAxes OutputAxes,
   IAgCartesian3Vector VectorInMyAxes,
   IAgCartesian3Vector RateInMyAxes
);
[Managed C++]
public: IAgCrdnAxesTransformWithRateResult^ TransformWithRate(
   VARIANT Epoch,
   IAgCrdnAxes ^ OutputAxes,
   IAgCartesian3Vector ^ VectorInMyAxes,
   IAgCartesian3Vector ^ RateInMyAxes
);
[Java]
public IAgCrdnAxesTransformWithRateResult transformWithRate(
   Variant Epoch,
   IAgCrdnAxes OutputAxes,
   IAgCartesian3Vector VectorInMyAxes,
   IAgCartesian3Vector RateInMyAxes
);
[Unmanaged C++]
public: HRESULT TransformWithRate(
   VARIANT Epoch,
   IAgCrdnAxes * OutputAxes,
   IAgCartesian3Vector * VectorInMyAxes,
   IAgCartesian3Vector * RateInMyAxes,
   IAgCrdnAxesTransformWithRateResult ** ReturnValue
);

Parameters

Epoch
Specify an epoch. The method may throw an exception if the epoch parameter specified cannot be converted to a currently selected date unit.
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.

Example

Transform a vector and vector's rate to the Earth's Fixed axes.
[C#]Copy Code
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, 60ref 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, 60ref 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]Copy Code
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

See Also

© 2018 Analytical Graphics, Inc. All Rights Reserved.