Description
Represents the Time-dependent Data Provider (for instance satellite position).
Public Methods
Exec | Compute the data; time-dependent data providers require an interval and a time step. Start/Stop use DateFormat Dimension. StepTime uses Time Dimension. |
ExecElements | Compute the data and return just the indicated data elements; time-dependent data providers require an interval and a time step. |
ExecElementsEventArray | Compute the data and returns just the indicated data elements; Input is a Times Array component, and object start and stop times. Start/Stop use DateFormat Dimension. |
ExecElementsEventArrayOnly | Compute the data and returns just the indicated data elements; Input is a Times Array component. |
ExecElementsNativeTimes | Compute the data for default; return just the indicated data elements; default time-dependent data providers require an interval. Start/Stop use DateFormat Dimension. |
ExecEventArray | Compute the data given a Times Array component. Also requires object start and stop times, which use DateFormat Dimension. |
ExecNativeTimes | Compute the data for default; default time-dependent data providers require an interval. Start/Stop use DateFormat Dimension. |
ExecSingle | Computes the data given a single Time. SingleTime uses DateFormat Dimension. |
ExecSingleElements | Computes the data given a single Time and return just the indicated data elements. SingleTime uses DateFormat Dimension. |
ExecSingleElementsArray | Computes the data given a single Time array and return just the indicated data elements. If time values without data are requested, null entries will be returned in the data array. SingleTime uses DateFormat Dimension. |
Interfaces
CoClasses that Implement IAgDataPrvTimeVar
Example
Compute an access and get constraint data from data provider
[C#] |
---|
// Compute Access between the facility and the satellite
IAgStkObject sat1 = root.GetObjectFromPath("Satellite/Satellite1");
IAgStkObject fac1 = root.GetObjectFromPath("Facility/Facility1");
IAgStkAccess access = sat1.GetAccessToObject(fac1);
access.ComputeAccess();
// Get the access intervals
IAgIntervalCollection accessIntervals = access.ComputedAccessIntervalTimes;
// Set unit preferences - change to get your preferred units
root.UnitPreferences.SetCurrentUnit("Distance", "km");
root.UnitPreferences.SetCurrentUnit("Angle", "deg");
root.UnitPreferences.SetCurrentUnit("Time", "sec");
root.UnitPreferences.SetCurrentUnit("DateFormat", "UTCG");
// Extract the access intervals and the range information for each access interval
Array dataPrvElements = new object[]
{
"Time", "FromAngularRate", "FromRange"
};
IAgDataPrvTimeVar dp = access.DataProviders["Constraint Data"] as IAgDataPrvTimeVar;
for (int index0 = 0; index0 < accessIntervals.Count; ++index0)
{
object startTime = null, stopTime = null;
accessIntervals.GetInterval(index0, out startTime, out stopTime);
Console.WriteLine("Access Interval #{0} - Start={1} Stop={2}", index0, startTime, stopTime);
IAgDrResult result = dp.ExecElements(startTime, stopTime, 60, ref dataPrvElements);
Array timeValues = result.DataSets[0].GetValues();
Array fromAngularRateValues = result.DataSets[1].GetValues();
Array fromRangeValues = result.DataSets[2].GetValues();
for (int index1 = 0; index1 < timeValues.GetLength(0); ++index1)
{
Console.WriteLine("{0}: FromAngularRate={1} FromRange={2}",
timeValues.GetValue(index1),
fromAngularRateValues.GetValue(index1),
fromRangeValues.GetValue(index1));
}
Console.WriteLine();
}
|
|
Execute a time dependent data provider and request all elements for the specified time interval
[C#] |
---|
IAgDataPrvTimeVar dpInfo = facility.DataProviders["Lighting AER"] as IAgDataPrvTimeVar;
IAgDrResult resInfo = dpInfo.Exec(
"1 Jan 2012 12:00:00.000",
"1 Jan 2012 12:00:20.000",
60.0);
|
|
Execute a time dependent data provider and returning all elements for a single time
[C#] |
---|
IAgDataPrvTimeVar dp = satellite.DataProviders["Precision Passes"] as IAgDataPrvTimeVar;
IAgDrResult resInfo = dp.ExecSingle("1 Jan 2012 12:00:00.000");
|
|
Execute a time dependent data provider and returning the specified elements at the specified time
[C#] |
---|
Array times = new object[]
{
"1 Jan 2012 12:00:00.000", "1 Jan 2012 12:00:20.000",
"1 Jan 2012 12:00:40.000"
};
Array elems = new object[]
{
"Time",
"Precision Pass Number"
};
IAgDataPrvTimeVar dp = satellite.DataProviders["Precision Passes"] as IAgDataPrvTimeVar;
// ExecSingleElementsArray expects each safe array parameter to be one dimensional,
// all arrays must have the same length
IAgDrTimeArrayElements resInfo = dp.ExecSingleElementsArray(ref times, ref elems);
|
|
Execute a time dependent data provider and returning the specified elements for a single time
[C#] |
---|
Array elems = new object[]
{
"Time",
"Precision Pass Number"
};
IAgDataPrvTimeVar dp = satellite.DataProviders["Precision Passes"] as IAgDataPrvTimeVar;
// ExecSingleElements expects as the second parameter a one dimensional array of element names
IAgDrResult resInfo = dp.ExecSingleElements("1 Jan 2012 12:00:00.000", ref elems);
|
|
Compute an access and get constraint data from data provider
[Visual Basic .NET] |
---|
' Compute Access between the facility and the satellite
Dim sat1 As IAgStkObject = root.GetObjectFromPath("Satellite/Satellite1")
Dim fac1 As IAgStkObject = root.GetObjectFromPath("Facility/Facility1")
Dim access As IAgStkAccess = sat1.GetAccessToObject(fac1)
access.ComputeAccess()
' Get the access intervals
Dim accessIntervals As IAgIntervalCollection = access.ComputedAccessIntervalTimes
' Set unit preferences - change to get your preferred units
root.UnitPreferences.SetCurrentUnit("Distance", "km")
root.UnitPreferences.SetCurrentUnit("Angle", "deg")
root.UnitPreferences.SetCurrentUnit("Time", "sec")
root.UnitPreferences.SetCurrentUnit("DateFormat", "UTCG")
' Extract the access intervals and the range information for each access interval
Dim dataPrvElements As Array = New Object() {"Time", "FromAngularRate", "FromRange"}
Dim dp As IAgDataPrvTimeVar = TryCast(access.DataProviders("Constraint Data"), IAgDataPrvTimeVar)
Dim index0 As Integer = 0
While index0 < accessIntervals.Count
Dim startTime As Object = Nothing, stopTime As Object = Nothing
accessIntervals.GetInterval(index0, startTime, stopTime)
Console.WriteLine("Access Interval #{0} - Start={1} Stop={2}", index0, startTime, stopTime)
Dim result As IAgDrResult = dp.ExecElements(startTime, stopTime, 60, dataPrvElements)
Dim timeValues As Array = result.DataSets(0).GetValues()
Dim fromAngularRateValues As Array = result.DataSets(1).GetValues()
Dim fromRangeValues As Array = result.DataSets(2).GetValues()
Dim index1 As Integer = 0
While index1 < timeValues.GetLength(0)
Console.WriteLine("{0}: FromAngularRate={1} FromRange={2}", timeValues.GetValue(index1), fromAngularRateValues.GetValue(index1), fromRangeValues.GetValue(index1))
System.Threading.Interlocked.Increment(index1)
End While
Console.WriteLine()
System.Threading.Interlocked.Increment(index0)
End While
|
|
Execute a time dependent data provider and request all elements for the specified time interval
[Visual Basic .NET] |
---|
Dim dpInfo As IAgDataPrvTimeVar = TryCast(facility.DataProviders("Lighting AER"), IAgDataPrvTimeVar)
Dim resInfo As IAgDrResult = dpInfo.Exec("1 Jan 2012 12:00:00.000", "1 Jan 2012 12:00:20.000", 60)
|
|
Execute a time dependent data provider and returning all elements for a single time
[Visual Basic .NET] |
---|
Dim dp As IAgDataPrvTimeVar = TryCast(satellite.DataProviders("Precision Passes"), IAgDataPrvTimeVar)
Dim resInfo As IAgDrResult = dp.ExecSingle("1 Jan 2012 12:00:00.000")
|
|
Execute a time dependent data provider and returning the specified elements at the specified time
[Visual Basic .NET] |
---|
Dim times As Array = New Object() {"1 Jan 2012 12:00:00.000", "1 Jan 2012 12:00:20.000", "1 Jan 2012 12:00:40.000"}
Dim elems As Array = New Object() {"Time", "Precision Pass Number"}
Dim dp As IAgDataPrvTimeVar = TryCast(satellite.DataProviders("Precision Passes"), IAgDataPrvTimeVar)
' ExecSingleElementsArray expects each safe array parameter to be one dimensional,
' all arrays must have the same length
Dim resInfo As IAgDrTimeArrayElements = dp.ExecSingleElementsArray(times, elems)
|
|
Execute a time dependent data provider and returning the specified elements for a single time
[Visual Basic .NET] |
---|
Dim elems As Array = New Object() {"Time", "Precision Pass Number"}
Dim dp As IAgDataPrvTimeVar = TryCast(satellite.DataProviders("Precision Passes"), IAgDataPrvTimeVar)
' ExecSingleElements expects as the second parameter a one dimensional array of element names
Dim resInfo As IAgDrResult = dp.ExecSingleElements("1 Jan 2012 12:00:00.000", elems)
|
|
See Also