STK Vector Geometry ToolSend comments on this topic.
Occurred Method (IAgCrdnEventInterval)
See Also
Epoch
Windows






Windows & Linux

Description

Determine if specified time falls within computed interval if it exists.

Syntax

[Visual Basic .NET]
Public Function Occurred( _
    ByVal Epoch As System.Object _
) As 
[C#]
public bool Occurred(
    System.Object Epoch
);
[Managed C++]
public: bool Occurred(
    VARIANT Epoch
);
[Java]
public bool occurred(
    VARIANT Epoch
);
[Unmanaged C++]
public: HRESULT Occurred(
    VARIANT Epoch,
    VARIANT_BOOL * pRetVal
);

Parameters

Epoch

See Also

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");
    }
}
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
© 2020 Analytical Graphics, Inc. All Rights Reserved.