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





Description

The factory creates collections of event interval lists.

Object Model





Public Methods

Public Method Create Create and register an event interval collection using specified name, description, and type.
Public Method CreateEventIntervalCollectionLighting Create an event interval collection defined by computing sunlight, penumbra and umbra intervals as seen at specified location using specified selection of eclipsing bodies.
Public Method CreateEventIntervalCollectionSatisfaction Create an event interval collection containing intervals during which condition set is satisfied.
Public Method CreateEventIntervalCollectionSignaled Create an event interval collection recorded at target clock location by performing signal transmission of original interval list collection between base and target clock locations.
Public Method IsTypeSupported Returns whether the specified type is supported.

Example

Create and configure signaled event interval collection.
[C#] Copy Code
IAgCrdnProvider satelliteVgtProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt; 
IAgCrdnProvider aircraftVgtProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt; 
 
IAgCrdnEventIntervalCollection intervalCollection = satelliteVgtProvider.EventIntervalCollections.Factory.CreateEventIntervalCollectionSignaled("MyIntervalCollectionSignaled",  "MyDescription"); 
IAgCrdnEventIntervalCollectionSignaled asCollectionSignaled = intervalCollection as IAgCrdnEventIntervalCollectionSignaled; 
 
asCollectionSignaled.OriginalCollection = aircraftVgtProvider.EventIntervalCollections["LightingIntervals"]; 
asCollectionSignaled.BaseClockLocation = satelliteVgtProvider.Points["Center"]; 
asCollectionSignaled.TargetClockLocation = aircraftVgtProvider.Points["Center"]; 
 
asCollectionSignaled.SignalSense = AgECrdnSignalSense.eCrdnSignalSenseTransmit; 
IAgCrdnSignalDelayBasic basicSignalDelay = asCollectionSignaled.SignalDelay as IAgCrdnSignalDelayBasic; 
basicSignalDelay.SpeedOption = AgECrdnSpeedOptions.eCrdnLightTransmissionSpeed; 
 
// Uses current Time unit preference, this code snippet assumes seconds. 
basicSignalDelay.TimeDelayConvergence = 0.002
 
IAgCrdnIntervalsVectorResult intervalResult = intervalCollection.FindIntervalCollection(); 
if (intervalResult.IsValid) 

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

 

Create and configure lighting event interval collection.
[C#] Copy Code
IAgCrdnEventIntervalCollection intervalCollection = provider.EventIntervalCollections.Factory.CreateEventIntervalCollectionLighting("MyIntervalCollectionLightning",  "MyDescription"); 
IAgCrdnEventIntervalCollectionLighting asCollectionLightning = intervalCollection as IAgCrdnEventIntervalCollectionLighting; 
 
// Optionally use a separate central body 
asCollectionLightning.UseObjectEclipsingBodies = true
asCollectionLightning.Location = provider.Points["Center"]; 
asCollectionLightning.EclipsingBodies = new object[] { "Saturn""Jupiter" }; 
 
IAgCrdnIntervalsVectorResult intervalResult = intervalCollection.FindIntervalCollection(); 
if (intervalResult.IsValid) 

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

 

Determine if the specified event interval collection type is supported.
[C#] Copy Code
// Check if the specified event interval collection type is supported. 
if (provider.EventIntervalCollections.Factory.IsTypeSupported(eventIntervalCollectionType)) 

    //Create an EventIntervalCollection with the supported Type 
    IAgCrdnEventIntervalCollection eventIntervalCollection = provider.EventIntervalCollections.Factory.Create( 
        "MyEventIntervalCollection"string.Empty, 
        eventIntervalCollectionType); 

 

Create and configure signaled event interval collection.
[Visual Basic .NET] Copy Code
Dim satelliteVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt
Dim aircraftVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt

Dim intervalCollection As IAgCrdnEventIntervalCollection = satelliteVgtProvider.EventIntervalCollections.Factory.CreateEventIntervalCollectionSignaled("MyIntervalCollectionSignaled", "MyDescription")
Dim asCollectionSignaled As IAgCrdnEventIntervalCollectionSignaled = TryCast(intervalCollection, IAgCrdnEventIntervalCollectionSignaled)

asCollectionSignaled.OriginalCollection = aircraftVgtProvider.EventIntervalCollections("LightingIntervals")
asCollectionSignaled.BaseClockLocation = satelliteVgtProvider.Points("Center")
asCollectionSignaled.TargetClockLocation = aircraftVgtProvider.Points("Center")

asCollectionSignaled.SignalSense = AgECrdnSignalSense.eCrdnSignalSenseTransmit
Dim basicSignalDelay As IAgCrdnSignalDelayBasic = TryCast(asCollectionSignaled.SignalDelay, IAgCrdnSignalDelayBasic)
basicSignalDelay.SpeedOption = AgECrdnSpeedOptions.eCrdnLightTransmissionSpeed

' Uses current Time unit preference, this code snippet assumes seconds.
basicSignalDelay.TimeDelayConvergence = 0.002

Dim intervalResult As IAgCrdnIntervalsVectorResult = intervalCollection.FindIntervalCollection()
If intervalResult.IsValid Then
    #If Not CSToJava Then
    For Each intervals As IAgCrdnIntervalCollection In intervalResult.IntervalCollections
        #Else
        #End If
        For Each interval As IAgCrdnInterval In intervals
            Console.WriteLine("Start: " + interval.Start)
            Console.WriteLine("Start: " + interval.[Stop])
        Next
    Next
End If

Create and configure lighting event interval collection.
[Visual Basic .NET] Copy Code
Dim intervalCollection As IAgCrdnEventIntervalCollection = provider.EventIntervalCollections.Factory.CreateEventIntervalCollectionLighting("MyIntervalCollectionLightning", "MyDescription")
Dim asCollectionLightning As IAgCrdnEventIntervalCollectionLighting = TryCast(intervalCollection, IAgCrdnEventIntervalCollectionLighting)

' Optionally use a separate central body
asCollectionLightning.UseObjectEclipsingBodies = True
asCollectionLightning.Location = provider.Points("Center")
asCollectionLightning.EclipsingBodies = New Object() {"Saturn", "Jupiter"}

Dim intervalResult As IAgCrdnIntervalsVectorResult = intervalCollection.FindIntervalCollection()
If intervalResult.IsValid Then
    #If Not CSToJava Then
    For Each intervals As IAgCrdnIntervalCollection In intervalResult.IntervalCollections
        #Else
        #End If
        For Each interval As IAgCrdnInterval In intervals
            Console.WriteLine("Start: " + interval.Start)
            Console.WriteLine("Start: " + interval.[Stop])
        Next
    Next
End If

Determine if the specified event interval collection type is supported.
[Visual Basic .NET] Copy Code
' Check if the specified event interval collection type is supported.
If provider.EventIntervalCollections.Factory.IsTypeSupported(eventIntervalCollectionType) Then
    'Create an EventIntervalCollection with the supported Type
    Dim eventIntervalCollection As IAgCrdnEventIntervalCollection = provider.EventIntervalCollections.Factory.Create("MyEventIntervalCollection", String.Empty, eventIntervalCollectionType)
End If

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1