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





Description

Defined by taking fixed time steps from specified time reference and adding sampled times to array if they fall within specified bounding interval list.

Object Model



Public Properties

Public Property BoundingIntervalList The bounding interval list.
Public Property IncludeIntervalEdges Specify whether to include interval edges.
Public Property ReferenceTimeInstant The reference time instant. Only applicable if the ReferenceType is set to time instant.
Public Property ReferenceType Specify the time reference from which fixed sampling time steps are taken. Note: selecting Start/Stop of each Interval resets the time reference for each interval, whereas other types maintain single reference for entire array.
Public Property SamplingTimeStep The sampling time step.

Example

Create and configure fixed step event array.
[C#] Copy Code
IAgCrdnEventArray eventArray = provider.EventArrays.Factory.CreateEventArrayFixedStep("MyEventArrayFixedStep",  "MyDescription"); 
IAgCrdnEventArrayFixedStep asFixedStep = eventArray as IAgCrdnEventArrayFixedStep; 
 
asFixedStep.BoundingIntervalList = provider.EventIntervalLists["AfterStart.SatisfactionIntervals"]; 
asFixedStep.IncludeIntervalEdges = true
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asFixedStep.SamplingTimeStep = 240
asFixedStep.ReferenceType = AgECrdnSampledReferenceTime.eCrdnSampledReferenceTimeStartOfIntervalList; 
 
// or using time instants 
asFixedStep.ReferenceType = AgECrdnSampledReferenceTime.eCrdnSampledReferenceTimeReferenceEvent; 
asFixedStep.ReferenceTimeInstant = provider.Events["EphemerisStartTime"]; 
 
IAgCrdnFindTimesResult timeArrays = eventArray.FindTimes(); 
if (timeArrays.IsValid) 

    Console.WriteLine("Times"); 
    int numTimes = timeArrays.Times.GetLength(0); 
    for (int i = 0; i < numTimes; ++i) 
    { 
        Console.WriteLine(timeArrays.Times.GetValue(i)); 
    } 
 
    foreach (IAgCrdnInterval timeArray in timeArrays.Intervals) 
    { 
        Console.WriteLine("Start: " + timeArray.Start); 
        Console.WriteLine("Stop: " + timeArray.Stop); 
    } 

 

Create and configure fixed step event array.
[Visual Basic .NET] Copy Code
Dim eventArray As IAgCrdnEventArray = provider.EventArrays.Factory.CreateEventArrayFixedStep("MyEventArrayFixedStep", "MyDescription")
Dim asFixedStep As IAgCrdnEventArrayFixedStep = TryCast(eventArray, IAgCrdnEventArrayFixedStep)

asFixedStep.BoundingIntervalList = provider.EventIntervalLists("AfterStart.SatisfactionIntervals")
asFixedStep.IncludeIntervalEdges = True

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedStep.SamplingTimeStep = 240
asFixedStep.ReferenceType = AgECrdnSampledReferenceTime.eCrdnSampledReferenceTimeStartOfIntervalList

' or using time instants
asFixedStep.ReferenceType = AgECrdnSampledReferenceTime.eCrdnSampledReferenceTimeReferenceEvent
asFixedStep.ReferenceTimeInstant = provider.Events("EphemerisStartTime")

Dim timeArrays As IAgCrdnFindTimesResult = eventArray.FindTimes()
If timeArrays.IsValid Then
    Console.WriteLine("Times")
    Dim numTimes As Integer = timeArrays.Times.GetLength(0)
    Dim i As Integer = 0
    While i <>
        Console.WriteLine(timeArrays.Times.GetValue(i))
        System.Threading.Interlocked.Increment(i)
    End While

    For Each timeArray As IAgCrdnInterval In timeArrays.Intervals
        Console.WriteLine("Start: " + timeArray.Start)
        Console.WriteLine("Stop: " + timeArray.[Stop])
    Next
End If

CoClasses that Implement IAgCrdnEventArrayFixedStep

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1