Description
Provides access to the Data Providers on an
ObjectCoverage Object.
Object Model
Public Methods
Clear |
Removes the computation on
the object coverage. |
ClearCoverage |
Clear object coverage. |
Compute |
Computes the object
coverage. |
Public Properties
AccessInterval |
The object coverage's
access interval. |
Assets |
The asset list
collection. |
DataProviders |
Returns the object
representing a list of available data providers for the
object. |
FOM |
The figure of merit on the
object coverage. |
IsCoverageConfigurationSaved |
Save the single-object
coverage definitions when the scenario is saved to disk, if a
compute has been done. |
StartTime |
The start time of object
coverage. Uses DateFormat Dimension. |
StopTime |
The stop time of object
coverage. Uses DateFormat Dimension. |
UseObjectTimes |
Use object interval
times. |
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);
}
}
}
}
|
|
Sets the interval of
the object coverage to the sunlight times of an object
[C#] |
Copy Code
|
IAgStkObject uavAircraft = root.GetObjectFromPath("Aircraft/UAV/Sensor/UAV_Camera");
IAgStkObject airspaceAreaTarget = root.GetObjectFromPath("AreaTarget/Airspace");
IAgCrdnEvent firstSunlightEpoch = airspaceAreaTarget.Vgt.Events["LightingIntervals.Sunlight.First.Start"];
IAgCrdnEvent lastSunlightEpoch = airspaceAreaTarget.Vgt.Events["LightingIntervals.Sunlight.First.Stop"];
uavAircraft.ObjectCoverage.UseObjectTimes = false;
IAgCrdnEventSmartEpoch startEpoch = uavAircraft.ObjectCoverage.AccessInterval.GetStartEpoch();
startEpoch.SetImplicitTime(firstSunlightEpoch);
IAgCrdnEventSmartEpoch stopEpoch = uavAircraft.ObjectCoverage.AccessInterval.GetStopEpoch();
stopEpoch.SetImplicitTime(lastSunlightEpoch);
uavAircraft.ObjectCoverage.AccessInterval.SetStartAndStopEpochs(startEpoch, stopEpoch);
|
|
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
#If Not CSToJava Then
#Else
#End If
Dim arBoundaries As
Array = New Object() {1, 2,
3, 4, 5}
#If Not CSToJava Then
Dim arRanges As
Array =
interval.MultipleThresholdCrossings("FOM
Value", arBoundaries)
#Else
#End If
Dim iRange As
Integer = 0
While iRange <>
Console.Write(vbLf
& "Range: {0}" & vbLf,
iRange)
Dim
arTimeSpans As Array = TryCast(arRanges.GetValue(iRange),
Array)
Dim
iSpan As Integer = 0
While
iSpan <>
Dim
strStart As String = arTimeSpans.GetValue(iSpan,
0).ToString()
Dim
strStop As String = arTimeSpans.GetValue(iSpan,
1).ToString()
Console.Write("Start:
{0}" & vbTab & "Stop:
{1}" & vbLf, strStart, strStop)
System.Math.Max(System.Threading.Interlocked.Increment(iSpan),iSpan
- 1)
End
While
System.Math.Max(System.Threading.Interlocked.Increment(iRange),iRange
- 1)
End While
Next
Next
|
|
Sets the interval of
the object coverage to the sunlight times of an object
[Visual Basic .NET] |
Copy Code
|
Dim uavAircraft As IAgStkObject =
root.GetObjectFromPath("Aircraft/UAV/Sensor/UAV_Camera")
Dim airspaceAreaTarget As IAgStkObject =
root.GetObjectFromPath("AreaTarget/Airspace")
Dim firstSunlightEpoch As IAgCrdnEvent =
airspaceAreaTarget.Vgt.Events("LightingIntervals.Sunlight.First.Start")
Dim lastSunlightEpoch As IAgCrdnEvent =
airspaceAreaTarget.Vgt.Events("LightingIntervals.Sunlight.First.Stop")
uavAircraft.ObjectCoverage.UseObjectTimes = False
Dim startEpoch As IAgCrdnEventSmartEpoch =
uavAircraft.ObjectCoverage.AccessInterval.GetStartEpoch()
startEpoch.SetImplicitTime(firstSunlightEpoch)
Dim stopEpoch As IAgCrdnEventSmartEpoch =
uavAircraft.ObjectCoverage.AccessInterval.GetStopEpoch()
stopEpoch.SetImplicitTime(lastSunlightEpoch)
uavAircraft.ObjectCoverage.AccessInterval.SetStartAndStopEpochs(startEpoch,
stopEpoch)
|
|
Compute Object
Coverage
[MATLAB] |
Copy Code
|
% IAgAircraft aircraft: Aircraft object
objCoverage = aircraft.ObjectCoverage;
objCoverage.Assets.RemoveAll;
objCoverage.Assets.Add('Satellite/MySatellite');
objCoverage.UseObjectTimes = true;
objCoverage.Compute;
objCoverageFOM = objCoverage.FOM;
objCoverageFOM.SetDefinitionType('eFmCoverageTime');
objCoverageFOM.Definition.SetComputeType('eTotal');
|
|