AGI STK Astrogator 11 Send comments on this topic.
IAgVAMCSTargetSequence Interface
Windows






Windows & Linux

Description

General properties of a TargetSequence segment.

Object Model



Public Methods

Public Method ApplyProfileApply Changes - applies the current values of specified profile to the segments within the target sequence.
Public Method ApplyProfileByNameApply Changes - applies the current values of specified profile to the segments within the target sequence.
Public Method ApplyProfilesApply Changes - applies the current values of search profiles' controls and the changes specified by the segment configuration profiles to the segments within the target sequence.
Public Method ResetProfileReset - resets the current values of specified profile.
Public Method ResetProfileByNameReset - resets the current values of specified profile.
Public Method ResetProfilesReset - resets the controls of the search profiles to the segments' values.

Public Properties

Public Property ActionWhether to run the sequence nominally or using profiles.
Public Property ContinueOnFailureContinue if profiles don't converge - if true, the target sequence continues if a profile fails to converge; otherwise, the MCS will stop upon the failure of a search profile.
Public Property ProfilesReturns the profiles used within the target sequence.
Public Property ResetInnerTargetersIf true, inner target sequences will have their profiles reset before each run.
Public Property SegmentsReturns the segments contained within the target sequence.
Public Property WhenProfilesFinishWhen Profiles Converge - the action to be carried out if targeting has converged.

Example

Configure target sequence segment
[C#]Copy Code
// First add a sequence target 
IAgVAMCSSegment segment = driver.MainSequence.Insert(AgEVASegmentType.eVASegmentTypeTargetSequence, "Start Transfer""-"); 
IAgVAMCSTargetSequence targetSequence = segment as IAgVAMCSTargetSequence; 
 
targetSequence.Action = AgEVATargetSeqAction.eVATargetSeqActionRunActiveProfiles; 
targetSequence.WhenProfilesFinish = AgEVAProfilesFinish.eVAProfilesFinishRunToReturnAndContinue; 
targetSequence.ContinueOnFailure = false
 
// Add as many child segments to target 
IAgVAMCSManeuver dv1 = targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV1""-"as IAgVAMCSManeuver; 
IAgVAMCSManeuver dv2 = targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV2""-"as IAgVAMCSManeuver; 
 
// Add more profiles if necessary 
string profileName = "Change Maneuver Type"
if (Array.IndexOf(targetSequence.Profiles.AvailableProfiles, profileName) != -1

    IAgVAProfile newProfile = targetSequence.Profiles.Add(profileName); 

 
// Enable controls 
dv1.EnableControlParameter(AgEVAControlManeuver.eVAControlManeuverImpulsiveCartesianX); 
IAgVAProfileDifferentialCorrector dc = targetSequence.Profiles["Differential Corrector"as IAgVAProfileDifferentialCorrector; 
IAgVADCControl controlParam = dc.ControlParameters.GetControlByPaths("DV1""ImpulsiveMnvr.Cartesian.X"); 
controlParam.Enable = true
controlParam.MaxStep = 0.3
 
// Enable results 
((IAgVAMCSSegment)dv1).Results.Add("Epoch"); 
IAgVADCResult roaResult = dc.Results.GetResultByPaths("DV1""Epoch"); 
roaResult.Enable = true
 
// Confiure the differential corrector 
dc.MaxIterations = 50
dc.EnableDisplayStatus = true
dc.Mode = AgEVAProfileMode.eVAProfileModeIterate; 
targetSequence.Action = AgEVATargetSeqAction.eVATargetSeqActionRunActiveProfiles; 
 

Configure target sequence segment
[Visual Basic .NET]Copy Code
' First add a sequence target
Dim segment As IAgVAMCSSegment = driver.MainSequence.Insert(AgEVASegmentType.eVASegmentTypeTargetSequence, "Start Transfer", "-")
Dim targetSequence As IAgVAMCSTargetSequence = TryCast(segment, IAgVAMCSTargetSequence)

targetSequence.Action = AgEVATargetSeqAction.eVATargetSeqActionRunActiveProfiles
targetSequence.WhenProfilesFinish = AgEVAProfilesFinish.eVAProfilesFinishRunToReturnAndContinue
targetSequence.ContinueOnFailure = False

' Add as many child segments to target
Dim dv1 As IAgVAMCSManeuver = TryCast(targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV1", "-"), IAgVAMCSManeuver)
Dim dv2 As IAgVAMCSManeuver = TryCast(targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV2", "-"), IAgVAMCSManeuver)

' Add more profiles if necessary
Dim profileName As String = "Change Maneuver Type"
If Array.IndexOf(targetSequence.Profiles.AvailableProfiles, profileName) <> -1 Then
    Dim newProfile As IAgVAProfile = targetSequence.Profiles.Add(profileName)
End If

' Enable controls
dv1.EnableControlParameter(AgEVAControlManeuver.eVAControlManeuverImpulsiveCartesianX)
Dim dc As IAgVAProfileDifferentialCorrector = TryCast(targetSequence.Profiles("Differential Corrector"), IAgVAProfileDifferentialCorrector)
Dim controlParam As IAgVADCControl = dc.ControlParameters.GetControlByPaths("DV1", "ImpulsiveMnvr.Cartesian.X")
controlParam.Enable = True
controlParam.MaxStep = 0.3

' Enable results
DirectCast(dv1, IAgVAMCSSegment).Results.Add("Epoch")
Dim roaResult As IAgVADCResult = dc.Results.GetResultByPaths("DV1", "Epoch")
roaResult.Enable = True

' Confiure the differential corrector
dc.MaxIterations = 50
dc.EnableDisplayStatus = True
dc.Mode = AgEVAProfileMode.eVAProfileModeIterate
targetSequence.Action = AgEVATargetSeqAction.eVATargetSeqActionRunActiveProfiles

Insert a Target Sequence Segment into the MCS and configure
[MATLAB]Copy Code
% IAgVADriverMCS driver: MCS driver interface 
ts = driver.MainSequence.Insert('eVASegmentTypeTargetSequence', 'Start Transfer', '-'); 
dv1 = ts.Segments.Insert('eVASegmentTypeManeuver', 'DV1', '-'); 
%Insert maneuver into target sequence and target thrust vector 
dv1.SetManeuverType('eVAManeuverTypeImpulsive'); 
impulsive = dv1.Maneuver; 
impulsive.SetAttitudeControlType('eVAAttitudeControlThrustVector'); 
thrustVector = impulsive.AttitudeControl; 
thrustVector.ThrustAxesName = 'Satellite/MySatellite VNC(Earth)'; 
dv1.EnableControlParameter('eVAControlManeuverImpulsiveCartesianX'); 
dv1.Results.Add('Keplerian Elems/Radius of Apoapsis'); 
%Handle to differential corrector profile 
dc = ts.Profiles.Item('Differential Corrector'); 
%Set up control parameter 
xControlParam = dc.ControlParameters.GetControlByPaths('DV1','ImpulsiveMnvr.Cartesian.X'); 
xControlParam.Enable = true; 
xControlParam.MaxStep = 0.3; 
%Set up result for control parameter 
roaResult = dc.Results.GetResultByPaths('DV1', 'Radius Of Apoapsis'); 
roaResult.Enable = true; 
roaResult.DesiredValue = 42238; 
roaResult.Tolerance = 0.1; 
 
dc.MaxIterations = 50; 
ts.Action = 'eVATargetSeqActionRunActiveProfiles'; 
 
 

CoClasses that Implement IAgVAMCSTargetSequence

© 2018 Analytical Graphics, Inc. All Rights Reserved.