Description
Returns an array of track ids with a bool
value indicating if it's visible to the specified object.
Syntax
Parameters
Example
Which tracks of the
specified subset of tracks are visible from the other STK Object at
the specified time?
[C#] |
Copy Code
|
IAgMtoAnalysisVisibility mtoVisibility = mto.Analysis.Visibility;
mtoVisibility.UseTerrain = false;
mtoVisibility.Entirety = AgEMtoEntirety.eMtoEntiretyPartial;
Array tracksOfInterest = new object[]
{
1, 2, 7
};
mtoVisibility.StkObjectPath = "Satellite/J2Satellite";
Array trackVisibilityArray = mtoVisibility.ComputeTracks(AgEMtoVisibilityMode.eVisibilityModeEach, ref tracksOfInterest, "1 Jan 2012 12:05:00.000");
Console.WriteLine("ComputeTracks:");
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)));
}
|
|
Which tracks of the
specified subset of tracks are visible from the other STK Object at
the specified time?
[Visual Basic .NET] |
Copy Code
|
Dim mtoVisibility As
IAgMtoAnalysisVisibility = mto.Analysis.Visibility
mtoVisibility.UseTerrain = False
mtoVisibility.Entirety = AgEMtoEntirety.eMtoEntiretyPartial
#If Not CSToJava Then
#Else
#End If
Dim tracksOfInterest As Array =
New Object() {1, 2, 7}
mtoVisibility.StkObjectPath = "Satellite/J2Satellite"
#If Not CSToJava Then
Dim trackVisibilityArray As Array =
mtoVisibility.ComputeTracks(AgEMtoVisibilityMode.eVisibilityModeEach,
tracksOfInterest, "1 Jan 2012
12:05:00.000")
#Else
#End If
Console.WriteLine("ComputeTracks:")
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
|
|
See Also