Description
General properties of a TargetSequence segment.
Object Model
Public Methods
ApplyProfile | Apply Changes - applies the current values of specified profile to the segments within the target sequence. |
ApplyProfileByName | Apply Changes - applies the current values of specified profile to the segments within the target sequence. |
ApplyProfiles | Apply 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. |
ResetProfile | Reset - resets the current values of specified profile. |
ResetProfileByName | Reset - resets the current values of specified profile. |
ResetProfiles | Reset - resets the controls of the search profiles to the segments' values. |
Public Properties
Action | Whether to run the sequence nominally or using profiles. |
ContinueOnFailure | Continue 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. |
Profiles | Returns the profiles used within the target sequence. |
ResetInnerTargeters | If true, inner target sequences will have their profiles reset before each run. |
Segments | Returns the segments contained within the target sequence. |
WhenProfilesFinish | When Profiles Converge - the action to be carried out if targeting has converged. |
Example
Configure target sequence segment
| [C#] | Copy Code |
|---|
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;
IAgVAMCSManeuver dv1 = targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV1", "-") as IAgVAMCSManeuver;
IAgVAMCSManeuver dv2 = targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV2", "-") as IAgVAMCSManeuver;
string profileName = "Change Maneuver Type";
if (Array.IndexOf(targetSequence.Profiles.AvailableProfiles, profileName) != -1)
{
IAgVAProfile newProfile = targetSequence.Profiles.Add(profileName);
}
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;
((IAgVAMCSSegment)dv1).Results.Add("Epoch");
IAgVADCResult roaResult = dc.Results.GetResultByPaths("DV1", "Epoch");
roaResult.Enable = true;
dc.MaxIterations = 50;
dc.EnableDisplayStatus = true;
dc.Mode = AgEVAProfileMode.eVAProfileModeIterate;
targetSequence.Action = AgEVATargetSeqAction.eVATargetSeqActionRunActiveProfiles;
|
|
Configure target sequence segment
| [Visual Basic .NET] | Copy Code |
|---|
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
Dim dv1 As IAgVAMCSManeuver = TryCast(targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV1", "-"), IAgVAMCSManeuver) Dim dv2 As IAgVAMCSManeuver = TryCast(targetSequence.Segments.Insert(AgEVASegmentType.eVASegmentTypeManeuver, "DV2", "-"), IAgVAMCSManeuver)
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
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
DirectCast(dv1, IAgVAMCSSegment).Results.Add("Epoch") Dim roaResult As IAgVADCResult = dc.Results.GetResultByPaths("DV1", "Epoch") roaResult.Enable = True
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