AGI STK Objects 11 Send comments on this topic.
IAgAccessCnstrMinMax Interface





Description

Access Constraint used for min/max constraints.

Public Properties

Public Property EnableMax Enable the Max property.
Public Property EnableMin Enable the Min property.
Public Property Max Max value for the access constrain.
Public Property Min Min value for the access constraint.

Interfaces

Implemented Interface
IAgAccessConstraint

Example

Add and configure a sun elevation angle access constraint
[C#] Copy Code
IAgAccessCnstrMinMax minmax = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrSunElevationAngle) as IAgAccessCnstrMinMax; 
minmax.EnableMin = true
minmax.Min = 22.2
minmax.EnableMax = true
minmax.Max = 77.7
 

Add and configure a lunar elevation angle access constraint
[C#] Copy Code
IAgAccessCnstrMinMax minmax = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLunarElevationAngle) as IAgAccessCnstrMinMax; 
minmax.EnableMin = true
minmax.Min = 11.1
minmax.EnableMax = true
minmax.Max = 88.8
 

Add and configure an altitude access constraint
[C#] Copy Code
// Attitude constraint 
IAgAccessCnstrMinMax altitude = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrAltitude) as IAgAccessCnstrMinMax; 
altitude.EnableMin = true
altitude.Min = 20.5
 

Enumerate the available constraints collection
[C#] Copy Code
// The AvailableConstraints method returns a rectangular two-dimensional array of available constraints. 
// A row of the array consists of two elements where the first element is a symbolic name of the constraint, 
// and the second is a corresponding enumeration value. 
 
Array arAvailable = accessConstraints.AvailableConstraints(); 
for (int i = 0; i < arAvailable.GetLength(0); i++) 

    string availName = (string)arAvailable.GetValue(i, 0); 
    AgEAccessConstraints eAccessConstraint = (AgEAccessConstraints)(int)arAvailable.GetValue(i, 1); 
    Console.WriteLine("\tConstraint {0}: {1} ({2})", i, availName, eAccessConstraint); 

 

Add and configure a sun elevation angle access constraint
[Visual Basic .NET] Copy Code
Dim minmax As IAgAccessCnstrMinMax = TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrSunElevationAngle), IAgAccessCnstrMinMax)
minmax.EnableMin = True
minmax.Min = 22.2
minmax.EnableMax = True
minmax.Max = 77.7

Add and configure a lunar elevation angle access constraint
[Visual Basic .NET] Copy Code
Dim minmax As IAgAccessCnstrMinMax = TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLunarElevationAngle), IAgAccessCnstrMinMax)
minmax.EnableMin = True
minmax.Min = 11.1
minmax.EnableMax = True
minmax.Max = 88.8

Add and configure an altitude access constraint
[Visual Basic .NET] Copy Code
' Attitude constraint
Dim altitude As IAgAccessCnstrMinMax = TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrAltitude), IAgAccessCnstrMinMax)
altitude.EnableMin = True
altitude.Min = 20.5

Enumerate the available constraints collection
[Visual Basic .NET] Copy Code
' The AvailableConstraints method returns a rectangular two-dimensional array of available constraints.
' A row of the array consists of two elements where the first element is a symbolic name of the constraint,
' and the second is a corresponding enumeration value.

Dim arAvailable As Array = accessConstraints.AvailableConstraints()
Dim i As Integer = 0
While i <>
    Dim availName As String = DirectCast(arAvailable.GetValue(i, 0), String)
    Dim eAccessConstraint As AgEAccessConstraints = DirectCast(DirectCast(arAvailable.GetValue(i, 1), Integer), AgEAccessConstraints)
    Console.WriteLine(vbTab & "Constraint {0}: {1} ({2})", i, availName, eAccessConstraint)
    System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
End While

CoClasses that Implement IAgAccessCnstrMinMax

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1