STK Vector Geometry ToolSend comments on this topic.
IAgCrdnEventInterval Interface

Description

A single time interval.

Public Methods

Public Method FindIntervalReturn computed interval if it exists.
Public Method OccurredDetermine if specified time falls within computed interval if it exists.

Public Properties

Public Property LabelStartA label associated with the interval start.
Public Property LabelStartDescriptionThe start description.
Public Property LabelStopA label associated with the interval stop.
Public Property LabelStopDescriptionThe stop description.
Public Property TypeReturn the type of interval.

Interfaces

Implemented Interface
IAgCrdn

CoClasses that Implement IAgCrdnEventInterval

Example

Determine if event occurred in interval.
[C#]
// The event you are interested in.
IAgCrdnEventInterval timeEventInterval = provider.EventIntervals["LightingIntervals.Sunlight.First"];

// The reference event you want to determine if event occurred in the interval.
IAgCrdnEvent timeEvent = provider.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMax"];
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence();

if (occurrence.IsValid)
{
    if (timeEventInterval.Occurred(occurrence.Epoch))
    {
        Console.WriteLine("Our highest altitude was reached on the first lighting pass");
    }
    else
    {
        Console.WriteLine("Our highest altitude was not reached on the first lighting pass");
    }
}
Determines the start and stop times of the event interval.
[C#]
IAgCrdnEventInterval eventInterval = provider.EventIntervals["AvailabilityTimeSpan"];

IAgCrdnEventIntervalResult interval = eventInterval.FindInterval();

if (interval.IsValid)
{
    Console.WriteLine("Interval Start: " + interval.Interval.Start);
    Console.WriteLine("Interval Stop: " + interval.Interval.Stop);
}
Determines the event intervals contained in the interval collection.
[C#]
IAgCrdnEventIntervalCollection intervalCollection = provider.EventIntervalCollections["LightingIntervals"];

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 event occurred in interval.
[Visual Basic .NET]
' The event you are interested in.
Dim timeEventInterval As IAgCrdnEventInterval = provider.EventIntervals("LightingIntervals.Sunlight.First")

' The reference event you want to determine if event occurred in the interval.
Dim timeEvent As IAgCrdnEvent = provider.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMax")
Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()

If occurrence.IsValid Then
	If timeEventInterval.Occurred(occurrence.Epoch) Then
		Console.WriteLine("Our highest altitude was reached on the first lighting pass")
	Else
		Console.WriteLine("Our highest altitude was not reached on the first lighting pass")
	End If
End If
Determines the start and stop times of the event interval.
[Visual Basic .NET]
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals("AvailabilityTimeSpan")

Dim interval As IAgCrdnEventIntervalResult = eventInterval.FindInterval()

If interval.IsValid Then
	Console.WriteLine("Interval Start: " + interval.Interval.Start)
	Console.WriteLine("Interval Stop: " + interval.Interval.[Stop])
End If
Determines the event intervals contained in the interval collection.
[Visual Basic .NET]
Dim intervalCollection As IAgCrdnEventIntervalCollection = provider.EventIntervalCollections("LightingIntervals")

Dim intervalResult As IAgCrdnIntervalsVectorResult = intervalCollection.FindIntervalCollection()
If intervalResult.IsValid Then
	For Each intervals As IAgCrdnIntervalCollection In intervalResult.IntervalCollections
		For Each interval As IAgCrdnInterval In intervals
			Console.WriteLine("Start: " + interval.Start)
			Console.WriteLine("Start: " + interval.[Stop])
		Next
	Next
End If
© 2024 Analytical Graphics, Inc. All Rights Reserved.