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





Description

Defines an event (time instant).

Object Model


Public Methods

Public Method FindOccurrence Return computed time instance if it occurs.
Public Method OccursBefore Return true if computed time instance occurs before or at specified time, return false otherwise.

Public Properties

Public Property NoonToday Return time instant that corresponds to today's GMT noon.
Public Property NoonTomorrow Return time instant that corresponds to tomorrow's GMT noon.
Public Property Today Return time instant that corresponds to today's GMT midnight.
Public Property Tomorrow Return time instant that corresponds to tomorrow's GMT midnight.
Public Property Type Return the type of time instant.

Example

Determine if event occurs before an epoch.
[C#] Copy Code
// 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#] Copy Code
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] Copy Code
' 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] Copy Code
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

CoClasses that Implement IAgCrdnEvent

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1