Description
AgAccessConstraintCollection used to access
the list of constraints
Object Model
Public Methods
Public Properties
Count |
property Count returns the
size of the collection |
Item |
property Item returns an
AccessConstraint |
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 a
LOS sun exclusion access constraint
[C#] |
Copy Code
|
IAgAccessCnstrAngle cnstrAngle = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLOSSunExclusion) as IAgAccessCnstrAngle;
cnstrAngle.Angle = 176.0;
|
|
Add and configure a
lighting condition access constraint
[C#] |
Copy Code
|
IAgAccessCnstrCondition light = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLighting) as IAgAccessCnstrCondition;
light.Condition = AgECnstrLighting.eDirectSun;
|
|
Add and configure an
altitude access constraint
[C#] |
Copy Code
|
IAgAccessCnstrMinMax altitude = accessConstraints.AddConstraint(AgEAccessConstraints.eCstrAltitude) as IAgAccessCnstrMinMax;
altitude.EnableMin = true;
altitude.Min = 20.5;
|
|
List all exclusion
zones of an access constraint
[C#] |
Copy Code
|
IAgAccessCnstrExclZonesCollection excZones = accessconstraints.GetActiveConstraint(AgEAccessConstraints.eCstrExclusionZone) as IAgAccessCnstrExclZonesCollection;
if (excZones != null)
{
Array zones = excZones.ToArray(0, -1);
for (int i = 0; i < zones.GetUpperBound(0); i++)
{
Console.WriteLine("MinLon: {0}, MinLat: {1}, MaxLon: {2}, MaxLat {3}", zones.GetValue(i, 0), zones.GetValue(i, 1), zones.GetValue(i, 2), zones.GetValue(i, 3));
}
}
|
|
Enumerate the
available constraints collection
[C#] |
Copy Code
|
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 a
LOS sun exclusion access constraint
[Visual Basic .NET] |
Copy Code
|
Dim cnstrAngle As IAgAccessCnstrAngle =
TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLOSSunExclusion),
IAgAccessCnstrAngle)
cnstrAngle.Angle = 176
|
|
Add and configure a
lighting condition access constraint
[Visual Basic .NET] |
Copy Code
|
Dim light As IAgAccessCnstrCondition =
TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrLighting),
IAgAccessCnstrCondition)
light.Condition = AgECnstrLighting.eDirectSun
|
|
Add and configure an
altitude access constraint
[Visual Basic .NET] |
Copy Code
|
Dim altitude As IAgAccessCnstrMinMax =
TryCast(accessConstraints.AddConstraint(AgEAccessConstraints.eCstrAltitude),
IAgAccessCnstrMinMax)
altitude.EnableMin = True
altitude.Min = 20.5
|
|
List all exclusion
zones of an access constraint
[Visual Basic .NET] |
Copy Code
|
Dim excZones As
IAgAccessCnstrExclZonesCollection =
TryCast(accessconstraints.GetActiveConstraint(AgEAccessConstraints.eCstrExclusionZone),
IAgAccessCnstrExclZonesCollection)
If excZones IsNot Nothing Then
Dim zones
As Array
= excZones.ToArray(0, -1)
Dim i
As Integer = 0
While i
<>
Console.WriteLine("MinLon:
{0}, MinLat: {1}, MaxLon: {2}, MaxLat {3}",
zones.GetValue(i, 0), zones.GetValue(i, 1), zones.GetValue(i, 2),
zones.GetValue(i, 3))
System.Math.Max(System.Threading.Interlocked.Increment(i),i
- 1)
End
While
End If
|
|
Enumerate the
available constraints collection
[Visual Basic .NET] |
Copy Code
|
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
|
|
Get handle to the
object access constraints
[MATLAB] |
Copy Code
|
% IAgSatellite satellite: Satellite object
accessConstraints = satellite.AccessConstraints;
|
|