Description | Example | Return Message | Group

AttSim (Satellites)

Set values and run the Attitude Simulator

Syntax

AttSim <SatObjectPath> {AttSimOption} <Parameters>

Description

The AttSim Connect command provides the means to define one or more integrated attitude segments for a satellite.

Valid values for {AttSimOption} are:

{AttSimOption} <Parameters> Description
Run "<OutputAttFile>" [UseForAttitude] Run the Attitude Simulator, placing the resulting attitude in the file specified by "<OutputAttFile>", the file should have the .a extension. If "<OutputAttFile>"is just a filename without a path, the file will be saved in the user's default database directory.

If you include the UseForAttitude keyword, the simulated attitude will automatically be inserted into the satellite's attitude profile, overriding any existing basic or targeted attitude for the specified time period.

Times {TimeInterval} [{EpochTime}] Use Times to define a time period shorter than that defined for the satellite. The EpochTime will normally coincide with the Start Time. Otherwise the program will integrate (forward or backward, as appropriate) without saving until it reaches the Start Time; then it will integrate forward and save.

For valid {TimeInterval} and {EpochTime} values see Time Options.

InitCond {InitOption} [<Parameters>] Set the initial conditions for an attitude simulation. {InitOptions} and [<Parameters>] are outlined below.
Integrator "{IntegratorName}" <Parameters> Specify an integrator. {IntegratorNames} and [<Parameters>] are outlined below.
Advanced {AdvancedOption} <Parameters> Set advanced run options. {AdvancedOptions} and [<Parameters>] are outlined below.
Environment "{ModelName}" <Parameters> Set parameters for the atmospheric density model to be used. "{ModelName}" and <Parameters> are outlined below.
Config {FileList} <Parameters> Set initialization, simulation and post-processing files and parameters regarding their use by the simulator. {FileList} and <Parameters> are outlined below.

InitCond

If {AttSimOption} is InitCond, valid values for {InitOption} and their associated [<Parameters>] are:

{InitOption} [<Parameters>] Description
FromCurrent N/A Set the initial conditions for an attitude simulation using values from the satellite specified in the <SatObjectPath>.
FixedRates <wx> <wy> <wz> Set the initial conditions for an attitude simulation by specifying the initial angular velocity rates about the satellite's X, Y and Z axes. <wx> <wy> <wz> are entered in deg/sec.
Quaternion <q1> <q2> <q3> <q4> Set the initial conditions for an attitude simulation using quaternion coordinates.
Euler <euler1> <euler2> <euler3> {Sequence} Set the initial conditions for an attitude simulation using a euler angle. <euler1> <euler2> <euler3> are entered in degrees. {Sequence} is 121, 123, 131, 132, 212, 213, 231, 232, 312, 313, 321, or 323.
YPR <yaw> <pitch> <roll> {Sequence} Set the initial conditions for an attitude simulation using YPR coordinates. {Sequence} is RPY, RYP, PRY, PYR, YRP, or YPR.
MomentumBias {On | Off} [<hx> <hy> <hz>] If you wish to take account of a Momentum Bias -- due, for example, to a spinning device within the satellite body -- turn MomentumBias On and specify the initial angular momentum values. If MomentumBias is On, <hx> <hy> <hz> are values between -1000.0 and 1000.0 entered in kg m^2/sec.

Integrator

If {AttSimOption} is Integrator, valid values for "{IntegratorName}" and their associated <Parameters> are:

"{IntegratorName}" <Parameters> Description
"Bulirsch Stoer" <RelativeError> <NumberOfStages> [<MinStepOption> <MaxStepOption>] Integration method based on Richardson extrapolation with automatic step size control. <RelativeError> is a real value between 1.0e-15 and 1.0. <NumberOfStages> is an integer between 1 and 10.
"RKF 7(8)" <RelativeError> <AbsoluteError> [<MinStepOption> <MaxStepOption>] Runge-Kutta-Fehlberg integration method of the 7th order with 8th order error control for the integration step size. <RelativeError> and <AbsoluteError> are real values between 1.0e-15 and 1.0.
"RKF 4(5)" <RelativeError> <AbsoluteError> [<MinStepOption> <MaxStepOption>] Runge-Kutta-Fehlberg integration method of the 4th order with 5th order error control for the integration step size. <RelativeError> and <AbsoluteError> are real values between 1.0e-15 and 1.0.

The optional <MinStepOption> and <MaxStepOption> allow you to specify a minimum and/or maximum step (time interval between evaluations).

Advanced

If {AttSimOption} is Advanced, valid values for {AdvancedOptions} and their associated <Parameters> are:

{AdvancedOption} <Parameters> Description
Progress {On | Off} If On, the percent of the run completed and the time remaining is displayed during the simulator run.
Animate {On | Off} [<SamplingPeriod>] If On, the scenario will animate in the 2D and 3D Graphics windows during the simulator run. If On, you can also include a <SamplingPeriod> by specifying a value between: 0.01 and 180.0 secs, entered in the Connect time unit.

Environment

If {AttSimOption} is Environment, valid values for "{ModelName}" and their associated <Parameters> are:

"{ModeNames}" <Parameters> Description
"Harris-Priester" <AverageF10.7> Takes into account a 10.7 cm solar flux level and diurnal bulge. Uses density Tables.
"1976 Standard" N/A A Table look-up model based on the satellite's altitude, with a valid range of 86km - 1000 km.
"Jacchia 1970" <DailyF10.7> <AverageF10.7> <GeoMagIndex> Computes atmospheric density based on the composition of the atmosphere, which depends on altitude as well as seasonal variation. Valid range is 100-2500 km.
"Jacchia 1971" <DailyF10.7> <AverageF10.7> <GeoMagIndex> Similar to Jacchia 1970, with improved treatment of certain solar effects.
"Jacchia-Roberts" <DailyF10.7> <AverageF10.7> <GeoMagIndex> Similar to Jacchia 1971 but uses analytical methods to improve performance.
"Jacchia 1960" N/A An earlier model by Jacchia that uses the solar cycle to predict a value for the F10.7 cm flux and accounts for the effects of the diurnal bulge.
"Exponential" <RefDensity> <RefAltitude> <ScaleAltitude> This model uses an equation to calculate atmospheric density. The equation can be found in the Astrogator Components: Atmospheric Models STK Help topic.

<Parameters> associated with available "{ModelNames}" can be:

<Parameter> Description
<AverageF10.7> <AverageF10.7> is the 81-day averaged Ottawa 10.7 cm solar flux value and is expressed as an integer between 65 and 275.
<DailyF10.7> <DailyF10.7> is the daily Ottawa 10.7 cm solar flux value and is expressed as an integer between 65 and 275.
<GeoMagIndex> <GeoMagIndex> is the planetary geomagnetic flux index, Kp and is expressed as a real number between 0.0 and 10.0.
<RefAltitude> A value between 0.0m and 1.0e9m entered in Connect distance units.
<ScaleAltitude>
<RefDensity> A value between 0.0 and 1000.0 entered in kg/m^3.

Config

Valid values for {FileList} and their associated <Parameters> are:

{FileList} <Parameters> Description
Initialization {Action} <FilePath> [<Index>] [<NewFilePath>] Use <FileName> to indicate the name of the file to be used. Valid values for {Action} and <SimulationParams> are outlined below.
Simulation {Action} <FilePath> [<Index>] [<NewFilePath>] [<SimulationParams>]
PostProcess {Action} <FilePath> [<Index>] [<NewFilePath>]

Valid values for {Action} and their associated <Parameters> are:

{Action} <Parameters> Description
Add <FilePath> [<Index>] [<SimulationParams>]
  • Use the optional <Index> parameter to indicate where to insert the file in the list.
  • If <Index> is not included, the item will be added to the end of the list.
  • <SimulationParams> are included only if {FileList} is Simulation. <SimulationParams> are outlined below.

Note: Only 10 files can be added to each list.

Remove <FilePath> [<Index>] [<SimulationParams>]
  • Use the optional <Index> parameter to indicate which item in the list is to be processed if there is more than one file with the same name.
  • If <Index> is not included, the last matching item in the list will be processed.
  • <SimulationParams> are included only if {FileList} is Simulation. <SimulationParams> are outlined below.
Modify <FilePath> [<Index>] [<NewFilePath>] [<SimulationParams>]
  • Use the optional <Index> parameter to indicate which item in the list is to be processed if there is more than one file with the same name.
  • If <Index> is not included, the last matching item in the list will be processed.
  • <SimulationParams> are included only if {FileList} is Simulation. <SimulationParams> are outlined below.
  • If {Action} is Modify, you can include the optional <NewFilePath>.

Valid values for <SimulationParams> are:

Note: <SimulationParams> can be included only if {FileList} is Simulation.

<SimulationParams> <Parameters>
Sampling <SampleValue> {Recompute | NoRecompute} Sampling will occur at the frequency set in <SampleValue>, which is entered in Connect time units and must be greater than 0.0 and less than 3600.0 seconds. Enter Recompute to have the recomputation of attitude occur only at the intervals you set using the AttSim Times command instead of occurring at every sampling taken by the integrator.
NoSampling Allow the integrator to use its step size control algorithm to determine the right steps.

Example

To Run an attitude simulation for Satellite1 and place it in the file AttSimRun1.a:

AttSim */Satellite/Satellite1 Run "E:\Temp\AttSimRun1.a"

To Run an attitude simulation for Satellite1, place the result in the file AttSimRun1.a, and set the result attitude profile as Satellite1's profile:

AttSim */Satellite/Satellite1 Run "AttSimRun2.a" UseForAttitude

To set the start and stop times for an attitude simulation for attSat:

AttSim */Satellite/attSat Times "1 Jan 2002 01:00:00.00" "1 Jan 2002 01:45:00.00"

To set the initial conditions for an attitude simulation using values from the satellite attSat:

AttSim */Satellite/attSat InitCond FromCurrent

To set the initial conditions for an attitude simulation using a euler angle with values: -80 94 -23, and sequence 313:

AttSim */Satellite/attSat InitCond Euler -80 94 -23 313

To set up an attitude simulation using the RKF 4(5) integrator:

AttSim */Satellite/attSat Integrator "RKF 4(5)" 1.0e-2 1.0e-4

To animate during the simulator run and use a sampling period of 2.5 seconds:

AttSim */Satellite/attSat Advanced Animate On 2.5

To set up an attitude simulation using the "Jacchia 1960" environment model:

AttSim */Satellite/attSat Environment "Jacchia 1960"

To set up an attitude simulation using the "Exponential" model with Ref Density of 234.56 km, RefAltitude of 1234.5 km and Scale Altitude of 76.321 km:

SetUnits / km

AttSim */Satellite/attSat Environment "Exponential" 234.56 1234.5 76.321

To add the matlab file rblimit.m, to the initialization file list for an attitude simulation:

AttSim */Satellite/attSat Config Initialization Add rblimit.m

To change the satu.m file in the Simulation file list to not use sampling:

AttSim */Satellite/attSat Config Simulation Modify satu.m NoSampling

To remove the rblimit.m, which is in position 4, from the PostProcess file list:

AttSim */Satellite/attSat Config PostProcess Remove rblimit.m 4

ReturnMessage

If activated, Connect returns an acknowledgement message.

Group Membership

This command belongs to the following group(s):

Vehicles

Version

10

STK Programming Interface 11.0.1