Description
Provides access to the Data Providers and access computations.
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. |
Base | Base object used in the access. |
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. |
Name | Name of the access. |
SaveComputedData | Flag indicating whether to save computed data with the Access instance. |
Target | Target object used in the access. |
Vgt | Gets a VGT provider to access the analytical vector geometry, timeline, calculation and other types of components. |
Interfaces
CoClasses that Implement IAgStkAccess
Example
Compute an access between two STK Objects (using object path)
[C#] |
---|
// Get access by object path
IAgStkAccess access = stkObject.GetAccess("Facility/fac1");
// Compute access
access.ComputeAccess();
|
|
Compute an access between two STK Objects (using IAgStkObject interface)
[C#] |
---|
// Get access by STK Object
IAgStkAccess access = stkObject1.GetAccessToObject(stkObject2);
// Compute access
access.ComputeAccess();
|
|
Compute an access and get constraint data from data provider
[C#] |
---|
// Compute Access between the facility and the satellite
IAgStkObject sat1 = root.GetObjectFromPath("Satellite/Satellite1");
IAgStkObject fac1 = root.GetObjectFromPath("Facility/Facility1");
IAgStkAccess access = sat1.GetAccessToObject(fac1);
access.ComputeAccess();
// Get the access intervals
IAgIntervalCollection accessIntervals = access.ComputedAccessIntervalTimes;
// Set unit preferences - change to get your preferred units
root.UnitPreferences.SetCurrentUnit("Distance", "km");
root.UnitPreferences.SetCurrentUnit("Angle", "deg");
root.UnitPreferences.SetCurrentUnit("Time", "sec");
root.UnitPreferences.SetCurrentUnit("DateFormat", "UTCG");
// Extract the access intervals and the range information for each access interval
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#] |
---|
IAgStkObject uav = stkRoot.GetObjectFromPath("/Aircraft/UAV");
IAgStkObject sensor = stkRoot.GetObjectFromPath("/Aircraft/UAV/Sensor/UAVSensor");
IAgStkObject coloradoSprings = stkRoot.GetObjectFromPath("/Place/ColoradoSprings");
// For this code snippet, let's use the time interval when the UAV reached min and max altitude values.
// Note, this assumes time at min happens before time at max.
IAgCrdnEvent timeOfAltMin = uav.Vgt.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMin"];
IAgCrdnEvent timeOfAltMax = uav.Vgt.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMax"];
// Set the access time period with the times we figured out above.
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#] |
---|
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] |
---|
' Get access by object path
Dim access As IAgStkAccess = stkObject.GetAccess("Facility/fac1")
' Compute access
access.ComputeAccess()
|
|
Compute an access between two STK Objects (using IAgStkObject interface)
[Visual Basic .NET] |
---|
' Get access by STK Object
Dim access As IAgStkAccess = stkObject1.GetAccessToObject(stkObject2)
' Compute access
access.ComputeAccess()
|
|
Compute an access and get constraint data from data provider
[Visual Basic .NET] |
---|
' Compute Access between the facility and the satellite
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()
' Get the access intervals
Dim accessIntervals As IAgIntervalCollection = access.ComputedAccessIntervalTimes
' Set unit preferences - change to get your preferred units
root.UnitPreferences.SetCurrentUnit("Distance", "km")
root.UnitPreferences.SetCurrentUnit("Angle", "deg")
root.UnitPreferences.SetCurrentUnit("Time", "sec")
root.UnitPreferences.SetCurrentUnit("DateFormat", "UTCG")
' Extract the access intervals and the range information for each access interval
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 < accessIntervals.Count
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 < timeValues.GetLength(0)
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] |
---|
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")
' For this code snippet, let's use the time interval when the UAV reached min and max altitude values.
' Note, this assumes time at min happens before time at max.
Dim timeOfAltMin As IAgCrdnEvent = uav.Vgt.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMin")
Dim timeOfAltMax As IAgCrdnEvent = uav.Vgt.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMax")
' Set the access time period with the times we figured out above.
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] |
---|
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)
[Python - STK API] |
---|
# 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 - STK API] |
---|
# IAgSatellite satellite: Satellite object
# Get access by object path
access = satellite.GetAccess('Facility/MyFacility')
# Compute access
access.ComputeAccess()
|
|
Compute Access with Advanced Settings
[Python - STK API] |
---|
# IAgStkAccess access: Access object
access.Advanced.EnableLightTimeDelay = True
access.Advanced.TimeLightDelayConvergence = .00005
access.Advanced.AberrationType = AgEAberrationType.eAberrationAnnual
access.Advanced.UseDefaultClockHostAndSignalSense = False
access.Advanced.ClockHost = AgEIvClockHost.eIvBase
access.Advanced.SignalSenseOfClockHost = AgEIvTimeSense.eIvTransmit
access.ComputeAccess()
|
|
Compute and extract access interval times
[Python - STK API] |
---|
# 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 - STK API] |
---|
# 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 = AgEAccessTimeType.eUserSpecAccessTime
accessTimePeriod = access.AccessTimePeriodData
accessTimePeriod.AccessInterval.State = AgECrdnSmartIntervalState.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)
[MATLAB] |
---|
% 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] |
---|
% IAgSatellite satellite: Satellite object
% Get access by object path
access = satellite.GetAccess('Facility/MyFacility');
% Compute access
access.ComputeAccess();
|
|
Compute Access with Advanced Settings
[MATLAB] |
---|
% 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] |
---|
% 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] |
---|
% 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);
|
|