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





Description

Defined by filtering times from original time array according to specified filtering method.

Object Model


Public Properties

Public Property Count Specify the number of times skipped between accepted samples when FilterType is set to Skip Count. In other words, skip count of 1 which is now the smallest accepted value is interpreted as taking every other samples, skip count of 2 means taking a sample, then skipping two consecutive samples and then taking another sample, etc.
Public Property FilterType Skip Time Steps filter type omits from filtered time array any times that fall within specified time step of last accepted time sample. Skip Count filter type omits specified number of time samples since last accepted time sample. Both filters operate within single interval of original time array and are reset when moving from one interval to next.
Public Property IncludeIntervalStopTimes If set to true, includes stop times of each interval from original time array.
Public Property OriginalTimeArray The original time array.
Public Property Step The number of steps skipped between accepted samples when FilterType is set to Skip Time Steps.

Example

Create and configure filtered event array.
[C#] Copy Code
IAgCrdnEventArray eventArray = provider.EventArrays.Factory.CreateEventArrayFiltered("MyEventArrayFiltered",  "MyDescription"); 
IAgCrdnEventArrayFiltered asFiltered = eventArray as IAgCrdnEventArrayFiltered; 
 
asFiltered.OriginalTimeArray = provider.EventArrays["EphemerisTimes"]; 
 
asFiltered.FilterType = AgECrdnEventArrayFilterType.eCrdnEventArrayFilterTypeSkipTimeStep; 
asFiltered.IncludeIntervalStopTimes = true
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asFiltered.Step = 240
 
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 filtered event array.
[Visual Basic .NET] Copy Code
Dim eventArray As IAgCrdnEventArray = provider.EventArrays.Factory.CreateEventArrayFiltered("MyEventArrayFiltered", "MyDescription")
Dim asFiltered As IAgCrdnEventArrayFiltered = TryCast(eventArray, IAgCrdnEventArrayFiltered)

asFiltered.OriginalTimeArray = provider.EventArrays("EphemerisTimes")

asFiltered.FilterType = AgECrdnEventArrayFilterType.eCrdnEventArrayFilterTypeSkipTimeStep
asFiltered.IncludeIntervalStopTimes = True

' Uses current Time unit preference, this code snippet assumes seconds.
asFiltered.[Step] = 240

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 IAgCrdnEventArrayFiltered

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1