AGI STK Objects 11 Send comments on this topic.
AreTracksVisible Method (IAgMtoAnalysisVisibility)
See Also  Example
Eval
TrackIds
Time





Description

Returns true if any track in the array is visible to the object.

Syntax

[Visual Basic .NET]
Public Function AreTracksVisible( _
   ByVal Eval As AgEMtoTrackEval, _
   ByRef TrackIds As System.Array, _
   ByVal Time As System.Object _
) As Boolean

[C#]
public bool AreTracksVisible(
AgEMtoTrackEval Eval,
ref System.Array TrackIds,
System.Object Time
);

[Managed C++]
public: bool AreTracksVisible(
AgEMtoTrackEval Eval,
System::Array ^^ TrackIds,
VARIANT Time
);

[Java]
public bool areTracksVisible(
AgEMtoTrackEval Eval,
Object[] TrackIds,
Variant Time
);

[Unmanaged C++]
public: HRESULT AreTracksVisible(
AgEMtoTrackEval Eval,
SAFEARRAY ** TrackIds,
VARIANT Time,
VARIANT_BOOL * ReturnValue
);

Parameters

Eval
Member Value Description
eMtoTrackEvalAll 0 Returns 1 if every track is within range otherwise it returns 0.
eMtoTrackEvalAny 1 Returns 1 if any track is in range of the Object, (ie, lowerLimit <= range <= upperLimit) else returns 0.
TrackIds
Time

Example

Determine if all the specified tracks (i.e. a subset of the MTO tracks) are visible from the other STK Object at the specified time?
[C#] Copy Code
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"
 
Array tracksOfInterest = new object[] 
                         { 
                             127 
                         }; 
 
// AreTracksVisible expects as the second parameter a one dimensional array of mto track ids 
bool areTracksAreVisible = mtoVisibility.AreTracksVisible(AgEMtoTrackEval.eMtoTrackEvalAll, ref tracksOfInterest, "1 Jan 2012 12:02:00.000"); 
 

Determine if all the specified tracks (i.e. a subset of the MTO 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
' 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"

#If Not CSToJava Then
#Else
#End If
Dim tracksOfInterest As Array = New Object() {1, 2, 7}

' AreTracksVisible expects as the second parameter a one dimensional array of mto track ids
#If Not CSToJava Then
Dim areTracksAreVisible As Boolean = mtoVisibility.AreTracksVisible(AgEMtoTrackEval.eMtoTrackEvalAll, tracksOfInterest, "1 Jan 2012 12:02:00.000")
#Else
#End If

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1