AGI STK Objects 11 Send comments on this topic.
IAgDataProvider Interface





Description

Represents the Sub Data Provider (i.e. "Fixed" in "Cartesian Position" group on satellites, or "Cartesian Position" on facilities).

Object Model


Public Properties

Public Property AllowUI When set to true the data provider will display a user interface to select/enter the pre-data required.
Public Property Elements Returns a collection of elements associated with a DataProvider or a SubDataProvider.
Public Property IsValid Returns whether the data provider is valid.
Public Property PreData The string associated with the current PreData parameter.

Example

Execute a time dependent group data provider which uses preData and returning the specified elements
[C#] Copy Code
Array elems = new object[] 
"Time""x""y""z" }; 
IAgDataProviderGroup dpVectorChoose = satObj.DataProviders["Vector Choose Axes"as IAgDataProviderGroup; 
IAgDataProvider groupPosition = dpVectorChoose.Group["Position"as IAgDataProvider; 
groupPosition.PreData = "Satellite/Sat2 Body"
IAgDataPrvTimeVar timeVarDP = groupPosition as IAgDataPrvTimeVar; 
IAgDrResult result = timeVarDP.ExecElements("26 Jan 2015 17:00:00.000""27 Jan 2015 17:00:00.000"120ref elems); 
IAgDrDataSetCollection datasets = result.DataSets; 
 
if (result.DataSets.Count > 0

    System.Array arrayTime = datasets[0].GetValues(); 
    System.Array arrayX = datasets[1].GetValues(); 
    System.Array arrayY = datasets[2].GetValues(); 
    System.Array arrayZ = datasets[2].GetValues(); 

 

Execute a time dependent data provider which uses preData and returning the specified elements
[C#] Copy Code
Array elems = new object[] 
"Range""Radial Rate" }; 
IAgDataPrvTimeVar RICdp = satObj.DataProviders["Relative Motion"as IAgDataPrvTimeVar; 
(RICdp as IAgDataProvider).PreData = "Satellite/Satellite123"
IAgDrResult result = RICdp.ExecElements("26 Jan 2015 17:00:00.000""27 Jan 2015 17:00:00.000"120ref elems); 
IAgDrDataSetCollection datasets = result.DataSets; 
 
if (result.DataSets.Count > 0

    System.Array arrayRange = datasets[0].GetValues(); 
    System.Array arrayRadialRate = datasets[1].GetValues(); 

 

Execute a time dependent group data provider which uses preData and returning the specified elements
[Visual Basic .NET] Copy Code
#If Not CSToJava Then
#Else
#End If
Dim elems As Array = New Object() {"Time", "x", "y", "z"}
Dim dpVectorChoose As IAgDataProviderGroup = TryCast(satObj.DataProviders("Vector Choose Axes"), IAgDataProviderGroup)
Dim groupPosition As IAgDataProvider = TryCast(dpVectorChoose.Group("Position"), IAgDataProvider)
groupPosition.PreData = "Satellite/Sat2 Body"
Dim timeVarDP As IAgDataPrvTimeVar = TryCast(groupPosition, IAgDataPrvTimeVar)
Dim result As IAgDrResult = timeVarDP.ExecElements("26 Jan 2015 17:00:00.000", "27 Jan 2015 17:00:00.000", 120, elems)
Dim datasets As IAgDrDataSetCollection = result.DataSets

If result.DataSets.Count > 0 Then
    Dim arrayTime As System.Array = datasets(0).GetValues()
    Dim arrayX As System.Array = datasets(1).GetValues()
    Dim arrayY As System.Array = datasets(2).GetValues()
    Dim arrayZ As System.Array = datasets(2).GetValues()
End If

Execute a time dependent data provider which uses preData and returning the specified elements
[Visual Basic .NET] Copy Code
#If Not CSToJava Then
#Else
#End If
Dim elems As Array = New Object() {"Range", "Radial Rate"}
Dim RICdp As IAgDataPrvTimeVar = TryCast(satObj.DataProviders("Relative Motion"), IAgDataPrvTimeVar)
TryCast(RICdp, IAgDataProvider).PreData = "Satellite/Satellite123"
Dim result As IAgDrResult = RICdp.ExecElements("26 Jan 2015 17:00:00.000", "27 Jan 2015 17:00:00.000", 120, elems)
Dim datasets As IAgDrDataSetCollection = result.DataSets

If result.DataSets.Count > 0 Then
    Dim arrayRange As System.Array = datasets(0).GetValues()
    Dim arrayRadialRate As System.Array = datasets(1).GetValues()
End If

See Also

CoClasses that Implement IAgDataProvider

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1