Description
Provides access to the Data Providers and access computations.
Object Model
Public Methods
ClearAccess | Clears the access intervals, but not the definitional settings of the access object itself (like step size, light time delay settings, time interval, etc.) |
ComputeAccess | Recomputes the access between two objects. Calls to ComputeAccess should not be made between calls to BeginUpdate and EndUpdate. |
RemoveAccess | Removes the access that was computed between two objects. |
SpecifyAccessEventIntervals | Access is computed using the intervals in the specified event interval list. |
SpecifyAccessIntervals | Allows a list of intervals to be used for the access calculation. |
SpecifyAccessTimePeriod | If eUserSpec is selected for AccessTimePeriod, specify the start and stop times for the user-defined period. |
Public Properties
AccessTimePeriod | Specifies the time period option. A member of the AgEAccessTimeType enumeration. |
AccessTimePeriodData | Returns an IAgIntervalCollection if AccessTimePeriod is eAccessTimeIntervals; returns an IAgAccessTimePeriod if AccessTimePeriod is eUserSpecAccessTime; returns an IAgAccessTimeEventIntervals if AccessTimePeriod is eAccessTimeEventIntervals. |
Advanced | Gets the Advanced properties for the Access computations. |
ComputedAccessIntervalTimes | Returns a list of the computed access interval times. |
DataDisplays | Gets the VO Data Display Collection. |
DataProviders | Returns the object representing a list of available data providers for the object. |
Graphics | Gets the Graphics properties for the Access computations. |
Vgt | Gets a VGT provider to access the analytical vector geometry, timeline, calculation and other types of components. |
Example
Compute an access between two STK Objects (using object path)
[C#] | Copy Code |
---|
IAgStkAccess access = stkObject.GetAccess("Facility/fac1");
access.ComputeAccess();
|
|
Compute an access between two STK Objects (using IAgStkObject interface)
[C#] | Copy Code |
---|
IAgStkAccess access = stkObject1.GetAccessToObject(stkObject2);
access.ComputeAccess();
|
|
Compute an access and get constraint data from data provider
[C#] | Copy Code |
---|
IAgStkObject sat1 = root.GetObjectFromPath("Satellite/Satellite1");
IAgStkObject fac1 = root.GetObjectFromPath("Facility/Facility1");
IAgStkAccess access = sat1.GetAccessToObject(fac1);
access.ComputeAccess();
IAgIntervalCollection accessIntervals = access.ComputedAccessIntervalTimes;
root.UnitPreferences.SetCurrentUnit("Distance", "km");
root.UnitPreferences.SetCurrentUnit("Angle", "deg");
root.UnitPreferences.SetCurrentUnit("Time", "sec");
root.UnitPreferences.SetCurrentUnit("DateFormat", "UTCG");
Array dataPrvElements = new object[]
{
"Time", "FromAngularRate", "FromRange"
};
IAgDataPrvTimeVar dp = access.DataProviders["Constraint Data"] as IAgDataPrvTimeVar;
for (int index0 = 0; index0 < accessIntervals.Count; ++index0)
{
object startTime = null, stopTime = null;
accessIntervals.GetInterval(index0, out startTime, out stopTime);
Console.WriteLine("Access Interval #{0} - Start={1} Stop={2}", index0, startTime, stopTime);
IAgDrResult result = dp.ExecElements(startTime, stopTime, 60, ref dataPrvElements);
Array timeValues = result.DataSets[0].GetValues();
Array fromAngularRateValues = result.DataSets[1].GetValues();
Array fromRangeValues = result.DataSets[2].GetValues();
for (int index1 = 0; index1 < timeValues.GetLength(0); ++index1)
{
Console.WriteLine("{0}: FromAngularRate={1} FromRange={2}",
timeValues.GetValue(index1),
fromAngularRateValues.GetValue(index1),
fromRangeValues.GetValue(index1));
}
Console.WriteLine();
}
|
|
Configure the access analysis time period to specified time instants.
[C#] | Copy Code |
---|
IAgStkObject uav = stkRoot.GetObjectFromPath("/Aircraft/UAV");
IAgStkObject sensor = stkRoot.GetObjectFromPath("/Aircraft/UAV/Sensor/UAVSensor");
IAgStkObject coloradoSprings = stkRoot.GetObjectFromPath("/Place/ColoradoSprings");
IAgCrdnEvent timeOfAltMin = uav.Vgt.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMin"];
IAgCrdnEvent timeOfAltMax = uav.Vgt.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMax"];
IAgStkAccess access = sensor.GetAccessToObject(coloradoSprings);
access.AccessTimePeriod = AgEAccessTimeType.eUserSpecAccessTime;
IAgAccessTimePeriod accessTimePeriod = access.AccessTimePeriodData as IAgAccessTimePeriod;
accessTimePeriod.AccessInterval.State = AgECrdnSmartIntervalState.eCrdnSmartIntervalStateStartStop;
IAgCrdnEventSmartEpoch accessStartEpoch = accessTimePeriod.AccessInterval.GetStartEpoch();
accessStartEpoch.SetImplicitTime(timeOfAltMin);
accessTimePeriod.AccessInterval.SetStartEpoch(accessStartEpoch);
IAgCrdnEventSmartEpoch accessStopEpoch = accessTimePeriod.AccessInterval.GetStopEpoch();
accessStopEpoch.SetImplicitTime(timeOfAltMax);
accessTimePeriod.AccessInterval.SetStopEpoch(accessStopEpoch);
|
|
Configure the access interval to the availability time span of the object where access is being computed to.
[C#] | Copy Code |
---|
IAgStkObject satellite = stkRoot.GetObjectFromPath("/Satellite/GEO");
IAgStkObject otherObject = stkRoot.GetObjectFromPath("/Aircraft/UAV/Sensor/UAVSensor");
IAgStkAccess access = satellite.GetAccessToObject(otherObject);
access.AccessTimePeriod = AgEAccessTimeType.eUserSpecAccessTime;
IAgAccessTimePeriod accessTimePeriod = access.AccessTimePeriodData as IAgAccessTimePeriod;
if (otherObject.Vgt.EventIntervals.Contains("AvailabilityTimeSpan"))
{
IAgCrdnEventInterval availabilityTimeSpan = otherObject.Vgt.EventIntervals["AvailabilityTimeSpan"];
accessTimePeriod.AccessInterval.SetImplicitInterval(availabilityTimeSpan);
}
|
|
Compute an access between two STK Objects (using object path)
[Visual Basic .NET] | Copy Code |
---|
Dim access As IAgStkAccess = stkObject.GetAccess("Facility/fac1")
access.ComputeAccess()
|
|
Compute an access between two STK Objects (using IAgStkObject interface)
[Visual Basic .NET] | Copy Code |
---|
Dim access As IAgStkAccess = stkObject1.GetAccessToObject(stkObject2)
access.ComputeAccess()
|
|
Compute an access and get constraint data from data provider
[Visual Basic .NET] | Copy Code |
---|
Dim sat1 As IAgStkObject = root.GetObjectFromPath("Satellite/Satellite1") Dim fac1 As IAgStkObject = root.GetObjectFromPath("Facility/Facility1") Dim access As IAgStkAccess = sat1.GetAccessToObject(fac1) access.ComputeAccess()
Dim accessIntervals As IAgIntervalCollection = access.ComputedAccessIntervalTimes
root.UnitPreferences.SetCurrentUnit("Distance", "km") root.UnitPreferences.SetCurrentUnit("Angle", "deg") root.UnitPreferences.SetCurrentUnit("Time", "sec") root.UnitPreferences.SetCurrentUnit("DateFormat", "UTCG")
Dim dataPrvElements As Array = New Object() {"Time", "FromAngularRate", "FromRange"}
Dim dp As IAgDataPrvTimeVar = TryCast(access.DataProviders("Constraint Data"), IAgDataPrvTimeVar)
Dim index0 As Integer = 0 While index0 <> Dim startTime As Object = Nothing, stopTime As Object = Nothing
accessIntervals.GetInterval(index0, startTime, stopTime)
Console.WriteLine("Access Interval #{0} - Start={1} Stop={2}", index0, startTime, stopTime)
Dim result As IAgDrResult = dp.ExecElements(startTime, stopTime, 60, dataPrvElements)
Dim timeValues As Array = result.DataSets(0).GetValues() Dim fromAngularRateValues As Array = result.DataSets(1).GetValues() Dim fromRangeValues As Array = result.DataSets(2).GetValues()
Dim index1 As Integer = 0 While index1 <> Console.WriteLine("{0}: FromAngularRate={1} FromRange={2}", timeValues.GetValue(index1), fromAngularRateValues.GetValue(index1), fromRangeValues.GetValue(index1)) System.Threading.Interlocked.Increment(index1) End While
Console.WriteLine() System.Threading.Interlocked.Increment(index0) End While
|
|
Configure the access analysis time period to specified time instants.
[Visual Basic .NET] | Copy Code |
---|
Dim uav As IAgStkObject = stkRoot.GetObjectFromPath("/Aircraft/UAV") Dim sensor As IAgStkObject = stkRoot.GetObjectFromPath("/Aircraft/UAV/Sensor/UAVSensor") Dim coloradoSprings As IAgStkObject = stkRoot.GetObjectFromPath("/Place/ColoradoSprings")
Dim timeOfAltMin As IAgCrdnEvent = uav.Vgt.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMin") Dim timeOfAltMax As IAgCrdnEvent = uav.Vgt.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMax")
Dim access As IAgStkAccess = sensor.GetAccessToObject(coloradoSprings) access.AccessTimePeriod = AgEAccessTimeType.eUserSpecAccessTime Dim accessTimePeriod As IAgAccessTimePeriod = TryCast(access.AccessTimePeriodData, IAgAccessTimePeriod)
accessTimePeriod.AccessInterval.State = AgECrdnSmartIntervalState.eCrdnSmartIntervalStateStartStop
Dim accessStartEpoch As IAgCrdnEventSmartEpoch = accessTimePeriod.AccessInterval.GetStartEpoch() accessStartEpoch.SetImplicitTime(timeOfAltMin) accessTimePeriod.AccessInterval.SetStartEpoch(accessStartEpoch)
Dim accessStopEpoch As IAgCrdnEventSmartEpoch = accessTimePeriod.AccessInterval.GetStopEpoch() accessStopEpoch.SetImplicitTime(timeOfAltMax) accessTimePeriod.AccessInterval.SetStopEpoch(accessStopEpoch)
|
|
Configure the access interval to the availability time span of the object where access is being computed to.
[Visual Basic .NET] | Copy Code |
---|
Dim satellite As IAgStkObject = stkRoot.GetObjectFromPath("/Satellite/GEO") Dim otherObject As IAgStkObject = stkRoot.GetObjectFromPath("/Aircraft/UAV/Sensor/UAVSensor") Dim access As IAgStkAccess = satellite.GetAccessToObject(otherObject)
access.AccessTimePeriod = AgEAccessTimeType.eUserSpecAccessTime Dim accessTimePeriod As IAgAccessTimePeriod = TryCast(access.AccessTimePeriodData, IAgAccessTimePeriod)
If otherObject.Vgt.EventIntervals.Contains("AvailabilityTimeSpan") Then Dim availabilityTimeSpan As IAgCrdnEventInterval = otherObject.Vgt.EventIntervals("AvailabilityTimeSpan") accessTimePeriod.AccessInterval.SetImplicitInterval(availabilityTimeSpan) End If
|
|
Compute an access between two STK Objects (using IAgStkObject interface)
[MATLAB] | Copy Code |
---|
% IAgSatellite satellite: Satellite object % IAgFacility facility: Facility object % Get access by STK Object access = satellite.GetAccessToObject(facility); % Compute access access.ComputeAccess();
|
|
Compute an access between two STK Objects (using object path)
[MATLAB] | Copy Code |
---|
% IAgSatellite satellite: Satellite object % Get access by object path access = satellite.GetAccess('Facility/MyFacility'); % Compute access access.ComputeAccess();
|
|
Compute Access with Advanced Settings
[MATLAB] | Copy Code |
---|
% IAgStkAccess access: Access object access.Advanced.EnableLightTimeDelay = true; access.Advanced.TimeLightDelayConvergence = .00005; access.Advanced.AberrationType = 'eAberrationAnnual'; access.Advanced.UseDefaultClockHostAndSignalSense = false; access.Advanced.ClockHost = 'eIvBase'; access.Advanced.SignalSenseOfClockHost = 'eIvTransmit'; access.ComputeAccess;
|
|
Compute and extract access interval times
[MATLAB] | Copy Code |
---|
% IAgStkAccess access: Access calculation % Get and display the Computed Access Intervals intervalCollection = access.ComputedAccessIntervalTimes; % Set the intervals to use to the Computed Access Intervals computedIntervals = intervalCollection.ToArray(0, -1); access.SpecifyAccessIntervals(computedIntervals);
|
|
Configure the access analysis time period to specified time instants.
[MATLAB] | Copy Code |
---|
% IAgStkObjectRoot root: STK Object Model root satellite = root.GetObjectFromPath('/Satellite/MySatellite'); facility = root.GetObjectFromPath('/Facility/MyFacility'); % For this code snippet, let's use the time interval when the satellite reached min and max altitude values. % Note, this assumes time at min happens before time at max. timeOfAltMin = satellite.Vgt.Events.Item('GroundTrajectory.Detic.LLA.Altitude.TimeOfMin'); timeOfAltMax = satellite.Vgt.Events.Item('GroundTrajectory.Detic.LLA.Altitude.TimeOfMax'); % Set the access time period with the times we figured out above. access = satellite.GetAccessToObject(facility); access.AccessTimePeriod = 'eUserSpecAccessTime'; accessTimePeriod = access.AccessTimePeriodData; accessTimePeriod.AccessInterval.State = 'eCrdnSmartIntervalStateStartStop'; accessStartEpoch = accessTimePeriod.AccessInterval.GetStartEpoch(); accessStartEpoch.SetImplicitTime(timeOfAltMin); accessTimePeriod.AccessInterval.SetStartEpoch(accessStartEpoch); accessStopEpoch = accessTimePeriod.AccessInterval.GetStopEpoch(); accessStopEpoch.SetImplicitTime(timeOfAltMax); accessTimePeriod.AccessInterval.SetStopEpoch(accessStopEpoch);
|
|
Compute an access between two STK Objects (using IAgStkObject interface)
[Python] | Copy Code |
---|
# IAgSatellite satellite: Satellite object # IAgFacility facility: Facility object # Get access by STK Object access = satellite.GetAccessToObject(facility) # Compute access access.ComputeAccess()
|
|
Compute an access between two STK Objects (using object path)
[Python] | Copy Code |
---|
# IAgSatellite satellite: Satellite object # Get access by object path access = satellite.GetAccess('Facility/MyFacility') # Compute access access.ComputeAccess()
|
|
Compute Access with Advanced Settings
[Python] | Copy Code |
---|
# IAgStkAccess access: Access object access.Advanced.EnableLightTimeDelay = True access.Advanced.TimeLightDelayConvergence = .00005 access.Advanced.AberrationType = 1 # eAberrationAnnual access.Advanced.UseDefaultClockHostAndSignalSense = False access.Advanced.ClockHost = 0 # eIvBase access.Advanced.SignalSenseOfClockHost = 0 # eIvTransmit access.ComputeAccess()
|
|
Compute and extract access interval times
[Python] | Copy Code |
---|
# IAgStkAccess access: Access calculation # Get and display the Computed Access Intervals intervalCollection = access.ComputedAccessIntervalTimes # Set the intervals to use to the Computed Access Intervals computedIntervals = intervalCollection.ToArray(0, -1) access.SpecifyAccessIntervals(computedIntervals)
|
|
Configure the access analysis time period to specified time instants.
[Python] | Copy Code |
---|
# IAgStkObjectRoot root: STK Object Model root satellite = root.GetObjectFromPath('/Satellite/MySatellite') facility = root.GetObjectFromPath('/Facility/MyFacility') # For this code snippet, let's use the time interval when the satellite reached min and max altitude values. # Note, this assumes time at min happens before time at max. timeOfAltMin = satellite.Vgt.Events.Item('GroundTrajectory.Detic.LLA.Altitude.TimeOfMin') timeOfAltMax = satellite.Vgt.Events.Item('GroundTrajectory.Detic.LLA.Altitude.TimeOfMax') # Set the access time period with the times we figured out above. access = satellite.GetAccessToObject(facility) access.AccessTimePeriod = 2 # eUserSpecAccessTime accessTimePeriod = access.AccessTimePeriodData accessTimePeriod.AccessInterval.State = 2 # eCrdnSmartIntervalStateStartStop accessStartEpoch = accessTimePeriod.AccessInterval.GetStartEpoch() accessStartEpoch.SetImplicitTime(timeOfAltMin) accessTimePeriod.AccessInterval.SetStartEpoch(accessStartEpoch) accessStopEpoch = accessTimePeriod.AccessInterval.GetStopEpoch() accessStopEpoch.SetImplicitTime(timeOfAltMax) accessTimePeriod.AccessInterval.SetStopEpoch(accessStopEpoch)
|
|
CoClasses that Implement IAgStkAccess