Description
MultipleThresholdCrossings returns an array of two-dimensional arrays. Each two-dimensional array contains start and stop times based on the boundaries passed in. The DataSets property must contain the Time dataset for this method to work correctly.
Syntax
[Visual Basic .NET] |
---|
Public Function MultipleThresholdCrossings( _
ByVal ElemName As String, _
ByRef Thresholds As System.Array _
) As System.Array
|
[C#] |
---|
public System.Array MultipleThresholdCrossings( string ElemName, ref System.Array Thresholds );
|
[Managed C++] |
---|
public: System::Array MultipleThresholdCrossings( String __gc ^ ElemName, System::Array ^^ Thresholds );
|
[Unmanaged C++] |
---|
public: HRESULT MultipleThresholdCrossings( BSTR ElemName, SAFEARRAY ** Thresholds, SAFEARRAY ** Array );
|
Parameters
Return Type
An array of two-dimensional arrays. Each two-dimensional array contains start and stop times. Some indexes may not contain any data.

Example
Execute an object coverage data provider and dump its result
[C#] | Copy Code |
---|
IAgStkObject aircraft = root.CurrentScenario.Children["aircraft340"];
IAgStkObjectCoverage objectCoverage = aircraft.ObjectCoverage;
objectCoverage.Clear();
objectCoverage.Assets.Add("Constellation/gps_const");
objectCoverage.Compute();
IAgDataPrvTimeVar provider = objectCoverage.DataProviders["FOM by Time"] as IAgDataPrvTimeVar;
IAgDrResult result = provider.Exec("1 Jan 2012 12:00:00.00", "1 Jan 2012 13:00:00.00", 1);
foreach (IAgDrSubSection section in result.Sections)
{
foreach (IAgDrInterval interval in section.Intervals)
{
Array arBoundaries = new object[]
{
1.0, 2.0, 3.0, 4.0, 5.0
};
Array arRanges = interval.MultipleThresholdCrossings("FOM Value", ref arBoundaries);
for (int iRange = 0; iRange < arRanges.GetLength(0); iRange++)
{
Console.Write("\nRange: {0}\n", iRange);
Array arTimeSpans = arRanges.GetValue(iRange) as Array;
for (int iSpan = 0; iSpan < arTimeSpans.GetLength(0); iSpan++)
{
string strStart = arTimeSpans.GetValue(iSpan, 0).ToString();
string strStop = arTimeSpans.GetValue(iSpan, 1).ToString();
Console.Write("Start: {0} Stop: {1}\n", strStart, strStop);
}
}
}
}
|
|
Execute an object coverage data provider and dump its result
[Visual Basic .NET] | Copy Code |
---|
Dim aircraft As IAgStkObject = root.CurrentScenario.Children("aircraft340")
Dim objectCoverage As IAgStkObjectCoverage = aircraft.ObjectCoverage objectCoverage.Clear() objectCoverage.Assets.Add("Constellation/gps_const") objectCoverage.Compute()
Dim provider As IAgDataPrvTimeVar = TryCast(objectCoverage.DataProviders("FOM by Time"), IAgDataPrvTimeVar)
Dim result As IAgDrResult = provider.Exec("1 Jan 2012 12:00:00.00", "1 Jan 2012 13:00:00.00", 1)
For Each section As IAgDrSubSection In result.Sections For Each interval As IAgDrInterval In section.Intervals Dim arRanges As Array = interval.MultipleThresholdCrossings("FOM Value", arBoundaries)
|
|
See Also