AGI STK VGT 11 Send comments on this topic.
IAgCrdnEventIntervalList Interface





Description

An ordered list of time intervals.

Object Model


Public Methods

Public Method FindIntervals Return computed interval list that can be empty.
Public Method Occurred Determine if speified time falls within computed interval list.

Public Properties

Public Property Descriptions Get the labels associated with the interval list.
Public Property Labels Get the label descriptions associated with the interval list.
Public Property Type Return the type of interval list.

Example

Determine if epoch occured in interval collection.
[C#] Copy Code
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists["AttitudeIntervals"]; 
 
// The reference event you want to determine if event of interest happened before. 
IAgCrdnEvent timeEvent = provider.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMin"]; 
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence(); 
 
if (intervalList.Occurred(occurrence.Epoch)) 

    Console.WriteLine("The time of maximum altitude occurred in event interval list."); 

else 

    Console.WriteLine("The time of maximum altitude did not occurred in event interval list."); 

 

Determines the event intervals contained in the interval list.
[C#] Copy Code
IAgCrdnEventIntervalList intervalsList = provider.EventIntervalLists["AttitudeIntervals"]; 
 
IAgCrdnIntervalListResult intervals = intervalsList.FindIntervals(); 
 
if (intervals.IsValid) 

    Console.WriteLine("Intervals:"); 
    foreach (IAgCrdnInterval interval in intervals.Intervals) 
    { 
        Console.WriteLine("Interval Start: " + interval.Start); 
        Console.WriteLine("Interval Stop: " + interval.Stop); 
    } 

 

Determine the intervals without access.
[C#] Copy Code
// Compute UAV's access to the satellite 
IAgStkObject satellite = stkRoot.GetObjectFromPath("Satellite/LEO"); 
IAgStkObject aircraft = stkRoot.GetObjectFromPath("Aircraft/UAV"); 
IAgStkAccess satelliteAccess = aircraft.GetAccessToObject(satellite); 
satelliteAccess.ComputeAccess(); 
 
// Subtract the aircraft availability time with the access times to get the times without access. 
IAgCrdnEventIntervalList intervalList = aircraft.Vgt.EventIntervalLists.Factory.CreateEventIntervalListMerged("IntervalsWithoutAccess",  "MyDescription"); 
IAgCrdnEventIntervalListMerged asListMerged = intervalList as IAgCrdnEventIntervalListMerged; 
asListMerged.SetIntervalListA(aircraft.Vgt.EventIntervalLists["AvailabilityIntervals"]); 
asListMerged.SetIntervalListB(satelliteAccess.Vgt.EventIntervalLists["AccessIntervals"]); 
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS; 
 
// Print times without access. 
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals(); 
if (intervals.IsValid) 

    foreach (IAgCrdnInterval interval in intervals.Intervals) 
    { 
        Console.WriteLine("Start: " + interval.Start); 
        Console.WriteLine("Stop: " + interval.Stop); 
    } 

 

Determine if epoch occured in interval collection.
[Visual Basic .NET] Copy Code
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists("AttitudeIntervals")

' The reference event you want to determine if event of interest happened before.
Dim timeEvent As IAgCrdnEvent = provider.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMin")
Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()

If intervalList.Occurred(occurrence.Epoch) Then
    Console.WriteLine("The time of maximum altitude occurred in event interval list.")
Else
    Console.WriteLine("The time of maximum altitude did not occurred in event interval list.")
End If

Determines the event intervals contained in the interval list.
[Visual Basic .NET] Copy Code
Dim intervalsList As IAgCrdnEventIntervalList = provider.EventIntervalLists("AttitudeIntervals")

Dim intervals As IAgCrdnIntervalListResult = intervalsList.FindIntervals()

If intervals.IsValid Then
    Console.WriteLine("Intervals:")
    For Each interval As IAgCrdnInterval In intervals.Intervals
        Console.WriteLine("Interval Start: " + interval.Start)
        Console.WriteLine("Interval Stop: " + interval.[Stop])
    Next
End If

Determine the intervals without access.
[Visual Basic .NET] Copy Code
' Compute UAV's access to the satellite
Dim satellite As IAgStkObject = stkRoot.GetObjectFromPath("Satellite/LEO")
Dim aircraft As IAgStkObject = stkRoot.GetObjectFromPath("Aircraft/UAV")
Dim satelliteAccess As IAgStkAccess = aircraft.GetAccessToObject(satellite)
satelliteAccess.ComputeAccess()

' Subtract the aircraft availability time with the access times to get the times without access.
Dim intervalList As IAgCrdnEventIntervalList = aircraft.Vgt.EventIntervalLists.Factory.CreateEventIntervalListMerged("IntervalsWithoutAccess", "MyDescription")
Dim asListMerged As IAgCrdnEventIntervalListMerged = TryCast(intervalList, IAgCrdnEventIntervalListMerged)
asListMerged.SetIntervalListA(aircraft.Vgt.EventIntervalLists("AvailabilityIntervals"))
asListMerged.SetIntervalListB(satelliteAccess.Vgt.EventIntervalLists("AccessIntervals"))
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS

' Print times without access.
Dim intervals As IAgCrdnIntervalListResult = intervalList.FindIntervals()
If intervals.IsValid Then
    For Each interval As IAgCrdnInterval In intervals.Intervals
        Console.WriteLine("Start: " + interval.Start)
        Console.WriteLine("Stop: " + interval.[Stop])
    Next
End If

CoClasses that Implement IAgCrdnEventIntervalList

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1