Description
The factory creates event interval lists.
Public Methods
Create | Create and register an interval list using specified name, description, and type. |
CreateEventIntervalListCondition | Create an interval list containing intervals during which specified condition is satisfied. |
CreateEventIntervalListFile | Create an interval list based on specified interval file. |
CreateEventIntervalListFiltered | Create an interval list by filtering intervals from original interval list using specified filtering method. |
CreateEventIntervalListFixed | Interval list defined by time ordered non-overlapping intervals each explicitly specified by its start and stop times. Stop date/time is required to be at or after start for each interval. |
CreateEventIntervalListMerged | Create an interval list by merging two constituent interval lists using specified logical operation. |
CreateEventIntervalListScaled | Create an interval list defined by scaling every interval in original interval list using either absolute or relative scale. |
CreateEventIntervalListSignaled | Create an interval list recorded at the target clock location by performing signal transmission of original interval list between base and target clock locations. |
CreateEventIntervalListTimeOffset | Create an interval list defined by shifting the specified reference interval list by a fixed time offset. |
IsTypeSupported | Returns whether the specified type is supported. |
Example
Determine if the specified event interval list type is supported.
[C#] |
---|
// Check if the specified event interval list type is supported.
if (provider.EventIntervalLists.Factory.IsTypeSupported(eventIntervalListType))
{
//Create an EventIntervalList with the supported Type
IAgCrdnEventIntervalList eventIntervalList = provider.EventIntervalLists.Factory.Create(
"MyEventIntervalList", string.Empty,
eventIntervalListType);
}
|
|
Create and configure filtered event interval list.
[C#] |
---|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFiltered("MyIntervalListFiltered", "MyDescription");
IAgCrdnEventIntervalListFiltered listFiltered = intervalList as IAgCrdnEventIntervalListFiltered;
listFiltered.OriginalIntervals = provider.EventIntervalLists["AttitudeIntervals"];
IAgCrdnFirstIntervalsFilter firstIntervals = listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterFirstIntervals) as IAgCrdnFirstIntervalsFilter;
firstIntervals.MaximumNumberOfIntervals = 3;
// Or for example satisfaction intervals
IAgCrdnSatisfactionConditionFilter asSatisfactionCondition = listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterSatisfactionIntervals) as IAgCrdnSatisfactionConditionFilter;
asSatisfactionCondition.Condition = provider.Conditions["BeforeStop"];
asSatisfactionCondition.DurationKind = AgECrdnIntervalDurationKind.eCrdnIntervalDurationKindAtLeast;
// Uses current Time unit preference, this code snippet assumes seconds.
asSatisfactionCondition.IntervalDuration = 30;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure time offset event interval list.
[C#] |
---|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListTimeOffset("MyIntervalListFixedTimeOffset", "MyDescription");
IAgCrdnEventIntervalListTimeOffset asTimeOffset = intervalList as IAgCrdnEventIntervalListTimeOffset;
asTimeOffset.ReferenceIntervals = provider.EventIntervalLists["AfterStart.SatisfactionIntervals"];
// Uses current Time unit preference, this code snippet assumes seconds.
asTimeOffset.TimeOffset = 300;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure event interval list from file.
[C#] |
---|
// Example contents of a file
//
// STK.V.10.0
//
// BEGIN IntervalList
// ScenarioEpoch 1 Jul 1999 00:00:00.00
// DATEUNITABRV UTCG
//
// BEGIN Intervals
// "1 Jul 1999 00:00:00.00" "1 Jul 1999 02:00:00.00"
// "1 Jul 1999 05:00:00.00" "1 Jul 1999 07:00:00.00"
// "1 Jul 1999 11:00:00.00" "1 Jul 1999 13:00:00.00"
// "1 Jul 1999 17:00:00.00" "1 Jul 1999 19:00:00.00"
// END Intervals
//
// END IntervalList
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFile("MyIntervalListFromFile", "MyDescription", intervalFile);
IAgCrdnEventIntervalListFile asListFile = intervalList as IAgCrdnEventIntervalListFile;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure merged event interval list.
[C#] |
---|
IAgCrdnProvider satelliteVgtProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt;
IAgCrdnProvider aircraftVgtProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt;
IAgCrdnEventIntervalList intervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListMerged("MyIntervalListMerged", "MyDescription");
IAgCrdnEventIntervalListMerged asListMerged = intervalList as IAgCrdnEventIntervalListMerged;
asListMerged.SetIntervalListA(satelliteVgtProvider.EventIntervalLists["AvailabilityIntervals"]);
asListMerged.SetIntervalListB(aircraftVgtProvider.EventIntervalLists["AvailabilityIntervals"]);
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure list condition event interval.
[C#] |
---|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListCondition("MyIntervalListSatisfaction", "MyDescription");
IAgCrdnEventIntervalListCondition asListCondition = intervalList as IAgCrdnEventIntervalListCondition;
asListCondition.Condition = provider.Conditions["AfterStart"];
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure scaled event interval list.
[C#] |
---|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListScaled("MyIntervalListScaled", "MyDescription");
IAgCrdnEventIntervalListScaled asListScaled = intervalList as IAgCrdnEventIntervalListScaled;
asListScaled.AbsoluteIncrement = 40;
// Or use Relative
asListScaled.UseAbsoluteIncrement = false;
asListScaled.RelativeIncrement = 20; // Percentage
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure signaled event interval list.
[C#] |
---|
IAgCrdnProvider satelliteVgtProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt;
IAgCrdnProvider aircraftVgtProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt;
IAgCrdnEventIntervalList intervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListSignaled("MyIntervalListSignaled", "MyDescription");
IAgCrdnEventIntervalListSignaled asListSingled = intervalList as IAgCrdnEventIntervalListSignaled;
asListSingled.OriginalIntervals = aircraftVgtProvider.EventIntervalLists["BeforeStop.SatisfactionIntervals"];
asListSingled.BaseClockLocation = satelliteVgtProvider.Points["Center"];
asListSingled.TargetClockLocation = aircraftVgtProvider.Points["Center"];
asListSingled.SignalSense = AgECrdnSignalSense.eCrdnSignalSenseTransmit;
IAgCrdnSignalDelayBasic basicSignalDelay = asListSingled.SignalDelay as IAgCrdnSignalDelayBasic;
basicSignalDelay.SpeedOption = AgECrdnSpeedOptions.eCrdnCustomTransmissionSpeed;
// Uses current Time unit preference, this code snippet assumes seconds.
basicSignalDelay.TimeDelayConvergence = 0.002;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure filtered event interval list.
[Visual Basic .NET] |
---|
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFiltered("MyIntervalListFiltered", "MyDescription")
Dim listFiltered As IAgCrdnEventIntervalListFiltered = TryCast(intervalList, IAgCrdnEventIntervalListFiltered)
listFiltered.OriginalIntervals = provider.EventIntervalLists("AttitudeIntervals")
Dim firstIntervals As IAgCrdnFirstIntervalsFilter = TryCast(listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterFirstIntervals), IAgCrdnFirstIntervalsFilter)
firstIntervals.MaximumNumberOfIntervals = 3
' Or for example satisfaction intervals
Dim asSatisfactionCondition As IAgCrdnSatisfactionConditionFilter = TryCast(listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterSatisfactionIntervals), IAgCrdnSatisfactionConditionFilter)
asSatisfactionCondition.Condition = provider.Conditions("BeforeStop")
asSatisfactionCondition.DurationKind = AgECrdnIntervalDurationKind.eCrdnIntervalDurationKindAtLeast
' Uses current Time unit preference, this code snippet assumes seconds.
asSatisfactionCondition.IntervalDuration = 30
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
|
|
Create and configure time offset event interval list.
[Visual Basic .NET] |
---|
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListTimeOffset("MyIntervalListFixedTimeOffset", "MyDescription")
Dim asTimeOffset As IAgCrdnEventIntervalListTimeOffset = TryCast(intervalList, IAgCrdnEventIntervalListTimeOffset)
asTimeOffset.ReferenceIntervals = provider.EventIntervalLists("AfterStart.SatisfactionIntervals")
' Uses current Time unit preference, this code snippet assumes seconds.
asTimeOffset.TimeOffset = 300
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
|
|
Create and configure event interval list from file.
[Visual Basic .NET] |
---|
' Example contents of a file
'
' STK.V.10.0
'
' BEGIN IntervalList
' ScenarioEpoch 1 Jul 1999 00:00:00.00
' DATEUNITABRV UTCG
'
' BEGIN Intervals
' "1 Jul 1999 00:00:00.00" "1 Jul 1999 02:00:00.00"
' "1 Jul 1999 05:00:00.00" "1 Jul 1999 07:00:00.00"
' "1 Jul 1999 11:00:00.00" "1 Jul 1999 13:00:00.00"
' "1 Jul 1999 17:00:00.00" "1 Jul 1999 19:00:00.00"
' END Intervals
'
' END IntervalList
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFile("MyIntervalListFromFile", "MyDescription", intervalFile)
Dim asListFile As IAgCrdnEventIntervalListFile = TryCast(intervalList, IAgCrdnEventIntervalListFile)
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
|
|
Create and configure merged event interval list.
[Visual Basic .NET] |
---|
Dim satelliteVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt
Dim aircraftVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt
Dim intervalList As IAgCrdnEventIntervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListMerged("MyIntervalListMerged", "MyDescription")
Dim asListMerged As IAgCrdnEventIntervalListMerged = TryCast(intervalList, IAgCrdnEventIntervalListMerged)
asListMerged.SetIntervalListA(satelliteVgtProvider.EventIntervalLists("AvailabilityIntervals"))
asListMerged.SetIntervalListB(aircraftVgtProvider.EventIntervalLists("AvailabilityIntervals"))
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS
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
|
|
Create and configure list condition event interval.
[Visual Basic .NET] |
---|
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListCondition("MyIntervalListSatisfaction", "MyDescription")
Dim asListCondition As IAgCrdnEventIntervalListCondition = TryCast(intervalList, IAgCrdnEventIntervalListCondition)
asListCondition.Condition = provider.Conditions("AfterStart")
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
|
|
Create and configure scaled event interval list.
[Visual Basic .NET] |
---|
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListScaled("MyIntervalListScaled", "MyDescription")
Dim asListScaled As IAgCrdnEventIntervalListScaled = TryCast(intervalList, IAgCrdnEventIntervalListScaled)
asListScaled.AbsoluteIncrement = 40
' Or use Relative
asListScaled.UseAbsoluteIncrement = False
asListScaled.RelativeIncrement = 20
' Percentage
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
|
|
Create and configure signaled event interval list.
[Visual Basic .NET] |
---|
Dim satelliteVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt
Dim aircraftVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt
Dim intervalList As IAgCrdnEventIntervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListSignaled("MyIntervalListSignaled", "MyDescription")
Dim asListSingled As IAgCrdnEventIntervalListSignaled = TryCast(intervalList, IAgCrdnEventIntervalListSignaled)
asListSingled.OriginalIntervals = aircraftVgtProvider.EventIntervalLists("BeforeStop.SatisfactionIntervals")
asListSingled.BaseClockLocation = satelliteVgtProvider.Points("Center")
asListSingled.TargetClockLocation = aircraftVgtProvider.Points("Center")
asListSingled.SignalSense = AgECrdnSignalSense.eCrdnSignalSenseTransmit
Dim basicSignalDelay As IAgCrdnSignalDelayBasic = TryCast(asListSingled.SignalDelay, IAgCrdnSignalDelayBasic)
basicSignalDelay.SpeedOption = AgECrdnSpeedOptions.eCrdnCustomTransmissionSpeed
' Uses current Time unit preference, this code snippet assumes seconds.
basicSignalDelay.TimeDelayConvergence = 0.002
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
|
|
Determine if the specified event interval list type is supported.
[Visual Basic .NET] |
---|
' Check if the specified event interval list type is supported.
If provider.EventIntervalLists.Factory.IsTypeSupported(eventIntervalListType) Then
'Create an EventIntervalList with the supported Type
Dim eventIntervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.Create("MyEventIntervalList", String.Empty, eventIntervalListType)
End If
|
|