Description
Configuration options for chains.
Public Methods
Public Properties
AccessIntervalsFile | Name of the .int file containing the strand access intervals. |
AllowDupObjsInStrands | Allow a strand to contain an object more than once. |
AutoRecompute | Opt to have STK automatically recompute accesses each time that an object on which the chain depends is updated. |
Connections | Get the collection of connections in the chain. |
ConstConstraintsMode | Constellation constraints mode, apply to strands or per instance. |
Constraints | Get the constraints applicable to the chain. |
CovAssetMode | When Computing Coverage and the Chain is used as a coverage asset, append the grid instance to the end of the chain or update the grid instance inside 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. |
EndObject | End object for the Chain. |
EventDetection | Event detection strategy used for access calculations. |
Graphics | Get the 2D graphics properties of the chain. |
KeepEmptyStrands | Allow strands with no access intervals to included in reports. |
MaxStrandDepth | Maximum number of objects in all strands for the Chain. |
MaxTimeStep | Gets or sets 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 | This property is deprecated. Use the StartObject, EndObject and Connections properties to configure objects in the chain. |
OptimalStrandOpts | Optimal strands settings for the Chain. |
Sampling | Sampling method used for access calculations. |
StartObject | Start object for the Chain. |
TimeConvergence | Gets or sets the time convergence for determining access intervals when computing the chain. Uses Time Dimension. |
TimePeriod | Get 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. |
Interfaces
CoClasses that Implement IAgChain
Example
Create a chain (on the current scenario central body)
[C#] |
---|
// Create the Chain on the current scenario central body (use
// NewOnCentralBody to specify explicitly the central body)
IAgChain chain = root.CurrentScenario.Children.New(AgESTKObjectType.eChain, "MyChain") as IAgChain;
|
|
Define and compute a chain (basic)
[C#] |
---|
// Add some objects to chain (using STK path)
chain.Objects.Add("Facility/fac1");
chain.Objects.Add("Satellite/sat1");
chain.Objects.Add("Satellite/sat2");
chain.Objects.Add("Aircraft/air1");
// Compute the chain
chain.ComputeAccess();
|
|
Define and compute a chain (advance)
[C#] |
---|
// Remove all previous accesses
chain.ClearAccess();
// Add some objects to chain
chain.Objects.Add("Facility/fac1");
chain.Objects.Add("Satellite/sat1");
chain.Objects.Add("Satellite/sat2");
chain.Objects.Add("Aircraft/air1");
// Configure chain parameters
chain.AutoRecompute = false;
chain.EnableLightTimeDelay = false;
chain.TimeConvergence = 0.001;
chain.DataSaveMode = AgEDataSaveMode.eSaveAccesses;
// Specify our own time period
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod);
// Get chain time period interface
IAgChUserSpecifiedTimePeriod chainUserTimePeriod = chain.TimePeriod as IAgChUserSpecifiedTimePeriod;
chainUserTimePeriod.TimeInterval.SetExplicitInterval("1 Jul 2005 12:00:00", "2 Jul 2005 12:00:00");
// Compute the chain
chain.ComputeAccess();
|
|
Configure the chain compute time period.
[C#] |
---|
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#] |
---|
IAgStkObject chainAsStkObject = chain as IAgStkObject;
// Compute the chain access if not done already.
chain.ComputeAccess();
// Considered Start and Stop time
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] |
---|
' Create the Chain on the current scenario central body (use
' NewOnCentralBody to specify explicitly the central body)
Dim chain As IAgChain = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.eChain, "MyChain"), IAgChain)
|
|
Define and compute a chain (basic)
[Visual Basic .NET] |
---|
' Add some objects to chain (using STK path)
chain.Objects.Add("Facility/fac1")
chain.Objects.Add("Satellite/sat1")
chain.Objects.Add("Satellite/sat2")
chain.Objects.Add("Aircraft/air1")
' Compute the chain
chain.ComputeAccess()
|
|
Define and compute a chain (advance)
[Visual Basic .NET] |
---|
' Remove all previous accesses
chain.ClearAccess()
' Add some objects to chain
chain.Objects.Add("Facility/fac1")
chain.Objects.Add("Satellite/sat1")
chain.Objects.Add("Satellite/sat2")
chain.Objects.Add("Aircraft/air1")
' Configure chain parameters
chain.AutoRecompute = False
chain.EnableLightTimeDelay = False
chain.TimeConvergence = 0.001
chain.DataSaveMode = AgEDataSaveMode.eSaveAccesses
' Specify our own time period
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod)
' Get chain time period interface
Dim chainUserTimePeriod As IAgChUserSpecifiedTimePeriod = TryCast(chain.TimePeriod, IAgChUserSpecifiedTimePeriod)
chainUserTimePeriod.TimeInterval.SetExplicitInterval("1 Jul 2005 12:00:00", "2 Jul 2005 12:00:00")
' Compute the chain
chain.ComputeAccess()
|
|
Configure the chain compute time period.
[Visual Basic .NET] |
---|
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] |
---|
Dim chainAsStkObject As IAgStkObject = TryCast(chain, IAgStkObject)
' Compute the chain access if not done already.
chain.ComputeAccess()
' Considered Start and Stop time
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 < intervalListResult.IntervalCollections.Count
If intervalListResult.IsValid Then
Console.WriteLine("Link Name: {0}", objectParticipationIntervals.Labels.GetValue(i))
Console.WriteLine("--------------")
Dim j As Integer = 0
While j < intervalListResult.IntervalCollections(i).Count
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)
[Python - STK API] |
---|
# 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(AgESTKObjectType.eChain, 'MyChain')
|
|
Define and compute a chain (basic)
[Python - STK API] |
---|
# 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 - STK API] |
---|
# 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 = AgEDataSaveMode.eSaveAccesses
# Specify our own time period
chain.SetTimePeriodType(AgEChTimePeriodType.eUserSpecifiedTimePeriod)
# Get chain time period interface
chainUserTimePeriod = chain.TimePeriod
chainUserTimePeriod.TimeInterval.SetExplicitInterval(
root.CurrentScenario.AnalysisInterval.FindStartTime(),
root.CurrentScenario.AnalysisInterval.FindStopTime()) # Set to scenario period
# Compute the chain
chain.ComputeAccess()
|
|
Prints the strand intervals of chain object
[Python - STK API] |
---|
# 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))
|
|
Create a chain (on the current scenario central body)
[MATLAB] |
---|
% 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] |
---|
% 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)
[MATLAB] |
---|
% 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.TimeInterval.SetExplicitInterval( ...
root.CurrentScenario.AnalysisInterval.FindStartTime(), ...
root.CurrentScenario.AnalysisInterval.FindStopTime()); % Set to scenario period
% Compute the chain
chain.ComputeAccess();
|
|
Prints the strand intervals of chain object
[MATLAB] |
---|
% 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
|
|