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

Description

Defines an event (time instant).

Public Methods

Public Method FindOccurrenceReturn computed time instance if it occurs.
Public Method OccursBeforeReturn true if computed time instance occurs before or at specified time, return false otherwise.

Public Properties

Public Property NoonTodayReturn time instant that corresponds to today's GMT noon.
Public Property NoonTomorrowReturn time instant that corresponds to tomorrow's GMT noon.
Public Property TodayReturn time instant that corresponds to today's GMT midnight.
Public Property TomorrowReturn time instant that corresponds to tomorrow's GMT midnight.
Public Property TypeReturn the type of time instant.

Interfaces

Implemented Interface
IAgCrdn

CoClasses that Implement IAgCrdnEvent

Example

Determine if event occurs before an epoch.
[C#]
// The event you are interested in.
IAgCrdnEvent timeEvent1 = provider.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMax"];

// The reference event you want to determine if event of interest happened before.
IAgCrdnEvent timeEvent2 = provider.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMin"];
IAgCrdnEventFindOccurrenceResult occurrence2 = timeEvent2.FindOccurrence();

if (occurrence2.IsValid)
{
    if (timeEvent1.OccursBefore(occurrence2.Epoch))
    {
        Console.WriteLine("The time of maximum altitude happend before time of minimum altitude");
    }
    else
    {
        Console.WriteLine("The time of minimum altitude happend before time of maximum altitude");
    }
}
Determine the time of an event.
[C#]
IAgCrdnEvent timeEvent = provider.Events["PassIntervals.First.Start"];

IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence();

if (occurrence.IsValid)
{
    Console.WriteLine("The first pass interval happened at: " + occurrence.Epoch);
}
else
{
    Console.WriteLine("The first pass interval never occurred");
}
Determine if event occurs before an epoch.
[Visual Basic .NET]
' The event you are interested in.
Dim timeEvent1 As IAgCrdnEvent = provider.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMax")

' The reference event you want to determine if event of interest happened before.
Dim timeEvent2 As IAgCrdnEvent = provider.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMin")
Dim occurrence2 As IAgCrdnEventFindOccurrenceResult = timeEvent2.FindOccurrence()

If occurrence2.IsValid Then
	If timeEvent1.OccursBefore(occurrence2.Epoch) Then
		Console.WriteLine("The time of maximum altitude happend before time of minimum altitude")
	Else
		Console.WriteLine("The time of minimum altitude happend before time of maximum altitude")
	End If
End If
Determine the time of an event.
[Visual Basic .NET]
Dim timeEvent As IAgCrdnEvent = provider.Events("PassIntervals.First.Start")

Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()

If occurrence.IsValid Then
	Console.WriteLine("The first pass interval happened at: " + occurrence.Epoch)
Else
	Console.WriteLine("The first pass interval never occurred")
End If
© 2019 Analytical Graphics, Inc. All Rights Reserved.