Description
Returns an array of track ids with a bool value indicating if it's visible to the specified object.
Syntax
[Visual Basic .NET] |
---|
Public Function ComputeAllTracks( _
ByVal Mode As AgEMtoVisibilityMode, _
ByVal Time As System.Object _
) As System.Array
|
Parameters
See Also
Example
Determine which tracks are visible from the other STK Object at the specified time
[C#] |
---|
IAgMtoAnalysisVisibility mtoVisibility = mto.Analysis.Visibility;
mtoVisibility.UseTerrain = false; // Set to true to use terrain instead of line of sight.
mtoVisibility.Entirety = AgEMtoEntirety.eMtoEntiretyPartial; // Only applies if MTO is static (i.e. non time dependent).
mtoVisibility.StkObjectPath = "Satellite/J2Satellite";
// ComputeAllTracks returns a two dimensional array whose elements are trackid and visibility
Array trackVisibilityArray = mtoVisibility.ComputeAllTracks(AgEMtoVisibilityMode.eVisibilityModeEach, "1 Jan 2012 12:00:00.000");
// Output results
Console.WriteLine("ComputeAllTracks:");
for (int i = 0; i < trackVisibilityArray.GetLength(0); ++i)
{
Console.WriteLine(" Track {0} visibility: {1}",
Convert.ToInt32(trackVisibilityArray.GetValue(i, 0)),
Convert.ToInt32(trackVisibilityArray.GetValue(i, 1)));
}
|
|
Determine which tracks are visible from the other STK Object at the specified time
[Visual Basic .NET] |
---|
Dim mtoVisibility As IAgMtoAnalysisVisibility = mto.Analysis.Visibility
mtoVisibility.UseTerrain = False
' Set to true to use terrain instead of line of sight.
mtoVisibility.Entirety = AgEMtoEntirety.eMtoEntiretyPartial
' Only applies if MTO is static (i.e. non time dependent).
mtoVisibility.StkObjectPath = "Satellite/J2Satellite"
' ComputeAllTracks returns a two dimensional array whose elements are trackid and visibility
Dim trackVisibilityArray As Array = mtoVisibility.ComputeAllTracks(AgEMtoVisibilityMode.eVisibilityModeEach, "1 Jan 2012 12:00:00.000")
' Output results
Console.WriteLine("ComputeAllTracks:")
Dim i As Integer = 0
While i < trackVisibilityArray.GetLength(0)
Console.WriteLine(" Track {0} visibility: {1}", Convert.ToInt32(trackVisibilityArray.GetValue(i, 0)), Convert.ToInt32(trackVisibilityArray.GetValue(i, 1)))
System.Threading.Interlocked.Increment(i)
End While
|
|