STK Vector Geometry ToolSend comments on this topic.
IAgCrdnEventArrayFiltered Interface

Description

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

Public Properties

Public Property CountSpecify 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 FilterIntervalListThe interval list used to filter samples when FilterType is set to Skip Intervals.
Public Property FilterTypeSkip 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 IncludeIntervalStopTimesIf set to true, includes stop times of each interval from original time array.
Public Property OriginalTimeArrayThe original time array.
Public Property StepThe number of steps skipped between accepted samples when FilterType is set to Skip Time Steps.

Interfaces

Implemented Interface
IAgCrdnEventArray
IAgCrdn

CoClasses that Implement IAgCrdnEventArrayFiltered

Example

Create and configure filtered event array.
[C#]
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]
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 < numTimes
		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
© 2024 Analytical Graphics, Inc. All Rights Reserved.