Description
Configuration options for chains.
Object Model
Public Methods
Public Properties
AccessIntervalsFile | Name of the .int file containing the strand access intervals. |
AutoRecompute | Opt to have STK automatically recompute accesses each time that an object on which the chain depends is updated. |
Constraints | Get the constraints applicable to the chain. |
DataSaveMode | Specify the mode for saving or recomputing accesses. |
DetectEventsBasedOnSamplesOnly | Flags control whether event times are computed just using the sampling or by sub-sampling |
EnableLightTimeDelay | Specify whether to take light time delay into account in the computation. |
EventDetection | Event detection strategy used for access calculations. |
Graphics | Get the 2D graphics properties of the chain. |
MaxTimeStep | The maximum sampling step size used when computing the chain. The maximum step size limits the amount of time that is allowed to elapse between sampling of the constraint functions during access computations. Uses Time Dimension. |
Objects | Get the collection of objects in the chain. |
Sampling | Sampling method used for access calculations. |
TimeConvergence | The time convergence for determining access intervals when computing the chain. Uses Time Dimension. |
TimePeriod | The time period for the chain. |
TimePeriodType | Get the option used to specify the time period for the chain. |
VO | Get the 3D graphics properties of the chain. |
Example
Create a chain (on the current scenario central body)
[C#] | Copy Code |
---|
IAgChain chain = root.CurrentScenario.Children.New(AgESTKObjectType.eChain, "MyChain") as IAgChain;
|
|
Define and compute a chain (basic)
[C#] | Copy Code |
---|
chain.Objects.Add("Facility/fac1");
chain.Objects.Add("Satellite/sat1");
chain.Objects.Add("Satellite/sat2");
chain.Objects.Add("Aircraft/air1");
chain.ComputeAccess();
|
|
Define and compute a chain (advance)
[C#] | Copy Code |
---|
chain.ClearAccess();
chain.Objects.Add("Facility/fac1");
chain.Objects.Add("Satellite/sat1");
chain.Objects.Add("Satellite/sat2");
chain.Objects.Add("Aircraft/air1");
chain.AutoRecompute = false;
chain.EnableLightTimeDelay = false;
chain.TimeConvergence = 0.001;
chain.DataSaveMode = AgEDataSaveMode.eSaveAccesses;
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod);
IAgChUserSpecifiedTimePeriod chainUserTimePeriod = chain.TimePeriod as IAgChUserSpecifiedTimePeriod;
chainUserTimePeriod.SetTimePeriod("1 Jul 2005 12:00:00", "2 Jul 2005 12:00:00");
chain.ComputeAccess();
|
|
Configure the chain compute time period.
[C#] | Copy Code |
---|
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod);
IAgChUserSpecifiedTimePeriod userSpecifiedTimePeriod = chain.TimePeriod as IAgChUserSpecifiedTimePeriod;
userSpecifiedTimePeriod.TimeInterval.SetExplicitInterval("1 May 2015 04:00:00.000", "1 May 2015 05:00:00.000");
|
|
Prints the strand intervals of chain object
[C#] | Copy Code |
---|
IAgStkObject chainAsStkObject = chain as IAgStkObject;
chain.ComputeAccess();
Console.WriteLine("Chain considered start time: {0}", chainAsStkObject.Vgt.Events["ConsideredStartTime"].FindOccurrence().Epoch);
Console.WriteLine("Chain considered stop time: {0}", chainAsStkObject.Vgt.Events["ConsideredStopTime"].FindOccurrence().Epoch);
IAgCrdnEventIntervalCollection objectParticipationIntervals = chainAsStkObject.Vgt.EventIntervalCollections["StrandAccessIntervals"];
IAgCrdnIntervalsVectorResult intervalListResult = objectParticipationIntervals.FindIntervalCollection();
for (int i = 0; i < intervalListResult.IntervalCollections.Count; ++i)
{
if (intervalListResult.IsValid)
{
Console.WriteLine("Link Name: {0}", objectParticipationIntervals.Labels.GetValue(i));
Console.WriteLine("--------------");
for (int j = 0; j < intervalListResult.IntervalCollections[i].Count; ++j)
{
object startTime = intervalListResult.IntervalCollections[i][j].Start;
object stopTime = intervalListResult.IntervalCollections[i][j].Stop;
Console.WriteLine("Start: {0}, Stop: {1}", startTime, stopTime);
}
}
}
|
|
Create a chain (on the current scenario central body)
[Visual Basic .NET] | Copy Code |
---|
Dim chain As IAgChain = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.eChain, "MyChain"), IAgChain)
|
|
Define and compute a chain (basic)
[Visual Basic .NET] | Copy Code |
---|
chain.Objects.Add("Facility/fac1") chain.Objects.Add("Satellite/sat1") chain.Objects.Add("Satellite/sat2") chain.Objects.Add("Aircraft/air1")
chain.ComputeAccess()
|
|
Define and compute a chain (advance)
[Visual Basic .NET] | Copy Code |
---|
chain.ClearAccess()
chain.Objects.Add("Facility/fac1") chain.Objects.Add("Satellite/sat1") chain.Objects.Add("Satellite/sat2") chain.Objects.Add("Aircraft/air1")
chain.AutoRecompute = False chain.EnableLightTimeDelay = False chain.TimeConvergence = 0.001 chain.DataSaveMode = AgEDataSaveMode.eSaveAccesses
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod)
Dim chainUserTimePeriod As IAgChUserSpecifiedTimePeriod = TryCast(chain.TimePeriod, IAgChUserSpecifiedTimePeriod) chainUserTimePeriod.SetTimePeriod("1 Jul 2005 12:00:00", "2 Jul 2005 12:00:00")
chain.ComputeAccess()
|
|
Configure the chain compute time period.
[Visual Basic .NET] | Copy Code |
---|
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod) Dim userSpecifiedTimePeriod As IAgChUserSpecifiedTimePeriod = TryCast(chain.TimePeriod, IAgChUserSpecifiedTimePeriod) userSpecifiedTimePeriod.TimeInterval.SetExplicitInterval("1 May 2015 04:00:00.000", "1 May 2015 05:00:00.000")
|
|
Prints the strand intervals of chain object
[Visual Basic .NET] | Copy Code |
---|
Dim chainAsStkObject As IAgStkObject = TryCast(chain, IAgStkObject)
chain.ComputeAccess()
Console.WriteLine("Chain considered start time: {0}", chainAsStkObject.Vgt.Events("ConsideredStartTime").FindOccurrence().Epoch) Console.WriteLine("Chain considered stop time: {0}", chainAsStkObject.Vgt.Events("ConsideredStopTime").FindOccurrence().Epoch)
Dim objectParticipationIntervals As IAgCrdnEventIntervalCollection = chainAsStkObject.Vgt.EventIntervalCollections("StrandAccessIntervals") Dim intervalListResult As IAgCrdnIntervalsVectorResult = objectParticipationIntervals.FindIntervalCollection()
Dim i As Integer = 0 While i <> If intervalListResult.IsValid Then Console.WriteLine("Link Name: {0}", objectParticipationIntervals.Labels.GetValue(i)) Console.WriteLine("--------------") Dim j As Integer = 0 While j <> Dim startTime As Object = intervalListResult.IntervalCollections(i)(j).Start Dim stopTime As Object = intervalListResult.IntervalCollections(i)(j).[Stop] Console.WriteLine("Start: {0}, Stop: {1}", startTime, stopTime) System.Threading.Interlocked.Increment(j) End While End If System.Threading.Interlocked.Increment(i) End While
|
|
Create a chain (on the current scenario central body)
[MATLAB] | Copy Code |
---|
% IAgStkObjectRoot root: STK Object Model Root % Create the Chain on the current scenario central body (use % NewOnCentralBody to specify explicitly the central body) chain = root.CurrentScenario.Children.New('eChain', 'MyChain');
|
|
Define and compute a chain (basic)
[MATLAB] | Copy Code |
---|
% IAgChain chain: Chain object % Add some objects to chain (using STK path) chain.Objects.Add('Facility/MyFacility'); chain.Objects.Add('Satellite/MySatellite'); % Compute the chain chain.ComputeAccess();
|
|
Define and compute a chain (advance)
[MATLAB] | Copy Code |
---|
% IAgChain chain: Chain object % IAgSatellite satellite: Satellite object % Remove all previous accesses chain.ClearAccess(); % Add some objects to chain chain.Objects.Add('Facility/MyFacility'); chain.Objects.AddObject(satellite); % Configure chain parameters chain.AutoRecompute = false; chain.EnableLightTimeDelay = false; chain.TimeConvergence = 0.001; chain.DataSaveMode = 'eSaveAccesses'; % Specify our own time period chain.SetTimePeriodType('eUserSpecifiedTimePeriod'); % Get chain time period interface chainUserTimePeriod = chain.TimePeriod; chainUserTimePeriod.SetTimePeriod(root.CurrentScenario.StartTime, root.CurrentScenario.StopTime); % Set to scenario period % Compute the chain chain.ComputeAccess();
|
|
Prints the strand intervals of chain object
[MATLAB] | Copy Code |
---|
% IAgChain chain: Chain Object % Compute the chain access if not done already. chain.ComputeAccess(); % Considered Start and Stop time disp(['Chain considered start time: ' chain.Vgt.Events.Item('ConsideredStartTime').FindOccurrence.Epoch]); disp(['Chain considered stop time: ', chain.Vgt.Events.Item('ConsideredStopTime').FindOccurrence.Epoch]); objectParticipationIntervals = chain.Vgt.EventIntervalCollections.Item('StrandAccessIntervals'); intervalListResult = objectParticipationIntervals.FindIntervalCollection(); for i = 0:intervalListResult.IntervalCollections.Count -1 if intervalListResult.IsValid disp(['Link Name: ' objectParticipationIntervals.Labels(i+1)]); disp('--------------'); for j = 0:intervalListResult.IntervalCollections.Item(i).Count - 1 startTime = intervalListResult.IntervalCollections.Item(i).Item(j).Start; stopTime = intervalListResult.IntervalCollections.Item(i).Item(j).Stop; disp(['Start: ' startTime ' Stop: ' stopTime]); end end end
|
|
Create a chain (on the current scenario central body)
[Python] | Copy Code |
---|
# IAgStkObjectRoot root: STK Object Model Root # Create the Chain on the current scenario central body (use # NewOnCentralBody to specify explicitly the central body) chain = root.CurrentScenario.Children.New(4, 'MyChain') # eChain
|
|
Define and compute a chain (basic)
[Python] | Copy Code |
---|
# IAgChain chain: Chain object # Add some objects to chain (using STK path) chain.Objects.Add('Facility/MyFacility') chain.Objects.Add('Satellite/MySatellite') # Compute the chain chain.ComputeAccess()
|
|
Define and compute a chain (advanced)
[Python] | Copy Code |
---|
# IAgChain chain: Chain object # IAgSatellite satellite: Satellite object # Remove all previous accesses chain.ClearAccess() # Add some objects to chain chain.Objects.Add('Facility/MyFacility') chain.Objects.AddObject(satellite) # Configure chain parameters chain.AutoRecompute = False chain.EnableLightTimeDelay = False chain.TimeConvergence = 0.001 chain.DataSaveMode = 2 # eSaveAccesses # Specify our own time period chain.SetTimePeriodType(2) # eUserSpecifiedTimePeriod # Get chain time period interface chainUserTimePeriod = chain.TimePeriod chainUserTimePeriod.SetTimePeriod(root.CurrentScenario.StartTime, root.CurrentScenario.StopTime) # Set to scenario period # Compute the chain chain.ComputeAccess()
|
|
Prints the strand intervals of chain object
[Python] | Copy Code |
---|
# IAgChain chain: Chain Object # Compute the chain access if not done already. chain.ComputeAccess() # Considered Start and Stop time print('Chain considered start time: #s' # chain.Vgt.Events.Item('ConsideredStartTime').FindOccurrence().Epoch) print('Chain considered stop time: #s' # chain.Vgt.Events.Item('ConsideredStopTime').FindOccurrence().Epoch) objectParticipationIntervals = chain.Vgt.EventIntervalCollections.Item('StrandAccessIntervals') intervalListResult = objectParticipationIntervals.FindIntervalCollection() for i in range(0,intervalListResult.IntervalCollections.Count): if intervalListResult.IsValid: print('Link Name: #s' # objectParticipationIntervals.Labels(i+1)) print('--------------') for j in range(0,intervalListResult.IntervalCollections.Item(i).Count): startTime = intervalListResult.IntervalCollections.Item(i).Item(j).Start stopTime = intervalListResult.IntervalCollections.Item(i).Item(j).Stop print('Start: #s Stop: #s' # (startTime, stopTime))
|
|
CoClasses that Implement IAgChain