STK ObjectsSend comments on this topic.
ComputeRanges Method (IAgMtoAnalysisRange)
See Also
Mode
TrackIds
Time
Windows





Windows & Linux

Description

Returns an array of track ids with a bool value if it's in range of the object.

Syntax

[Visual Basic .NET]
Public Function ComputeRanges( _
    ByVal Mode As AgEMtoRangeMode, _
    ByVal TrackIds As System.Array, _
    ByVal Time As System.Object _
) As System.Array
[C#]
public System.Array ComputeRanges(
    AgEMtoRangeMode Mode,
    System.Array TrackIds,
    System.Object Time
);
[Managed C++]
public: System::Array ComputeRanges(
    AgEMtoRangeMode Mode,
    System::Array ^ TrackIds,
    VARIANT Time
);
[Unmanaged C++]
public: HRESULT ComputeRanges(
    AgEMtoRangeMode Mode,
    SAFEARRAY * * TrackIds,
    VARIANT Time,
    SAFEARRAY * * ppRetVal
);
[Java]
public AgSafeArray computeRanges(
    AgEMtoRangeMode Mode,
    AgSafeArray TrackIds,
    AgVariant Time
);
[Python - STK API ]
def ComputeRanges(self, Mode:"AgEMtoRangeMode", TrackIds:list, Time:typing.Any) -> list:

Parameters

Mode
TrackIds
Time

See Also

Example

Compute MTO ranges
[C#]
IAgMtoAnalysisRange range = mto.Analysis.Range;
range.StkObjectPath = "Satellite/J2Satellite";

// ComputeRanges expects a one dimensional array of mto track ids
// ComputeRanges returns a two dimensional array of track id, visibility, and range
Array tracks = new object[]
               {
                   1, 4
               };

Array result = range.ComputeRanges(AgEMtoRangeMode.eMtoRangeModeEach, ref tracks, "1 Jan 2012 12:00:00.000");

// Print results
for (int i = 0; i < result.GetLength(0); i++)
{
    Console.WriteLine("Track #: {0}, Visible: {1}, Range: {2}", result.GetValue(i, 0), result.GetValue(i, 1), result.GetValue(i, 2));
}
Compute MTO ranges
[Visual Basic .NET]
Dim range As IAgMtoAnalysisRange = mto.Analysis.Range
range.StkObjectPath = "Satellite/J2Satellite"

' ComputeRanges expects a one dimensional array of mto track ids
' ComputeRanges returns a two dimensional array of track id, visibility, and range
Dim tracks As Array = New Object() {1, 4}

Dim result As Array = range.ComputeRanges(AgEMtoRangeMode.eMtoRangeModeEach, tracks, "1 Jan 2012 12:00:00.000")

' Print results
Dim i As Integer = 0
While i < result.GetLength(0)
	Console.WriteLine("Track #: {0}, Visible: {1}, Range: {2}", result.GetValue(i, 0), result.GetValue(i, 1), result.GetValue(i, 2))
	System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
End While
© 2024 Analytical Graphics, Inc. All Rights Reserved.