Main Content

Spacecraft Dynamics

Model dynamics of one or more spacecraft

  • Library:
  • Aerospace Blockset / Spacecraft / Spacecraft Dynamics

  • Spacecraft Dynamics block icon

Description

The Spacecraft Dynamics block models translational and rotational dynamics of spacecraft using numerical integration. It computes the position, velocity, attitude, and angular velocity of one or more spacecraft over time. For the most accurate results, use a variable step solver with low tolerance settings (less than 1e-8). To trade off accuracy for speed, use larger tolerances, depending on your mission requirements.

You can define initial orbital states as

  • A set of orbital elements.

  • Position and velocity state vectors.

To propagate orbital states, the block uses the gravity model selected for the current central body. It also includes external accelerations and forces that you provide as inputs to the block. To define initial attitude states, use quaternions, direction cosine matrices (DCMs), or Euler angles.

To propagate attitude states, the block uses moments provided as inputs to the block and mass properties defined on the block.

Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention.

The Spacecraft Dynamics block supports scalar and vector expansion. The block parameter and input port dimensions determine the number of the output signals and the number of spacecraft. After scalar and vector expansion, all parameters in the Orbit, Mass, and Attitude tabs and all input ports except for φθψ (Moon libration angles) and αδW (right ascension, declination, and rotation angle) input ports are defined for each spacecraft.

The size of the provided initial conditions determines the number of spacecraft being modeled. If you supply more than one value for a parameter in the Orbit, Attitude, or Mass tabs, the block outputs a constellation of satellites. Any parameter with a single provided value is expanded and applied to all the satellites in the constellation. For example, if you provide a single value for all the parameters on the block except True anomaly, which contains six values, the block creates a constellation of six satellites, varying true anomaly only.

The block applies the same expansion behavior to the block input ports. All input ports support expansion except Moon libration angles (when Central body is Moon) and Spin axis right ascension (RA) at J2000, Spin axis declination (Dec) at J2000, and Initial rotation angle at J2000 (when Central body is Custom). All other ports accept either a single value expanded to all spacecraft being modeled, or individual values applied to each spacecraft.

For more information on the coordinate systems and rotational and translational dynamics the Spacecraft Dynamics block uses, see Algorithms.

Ports

Input

expand all

Force applied to the spacecraft center of mass in the body frame, specified as a 3-element vector or numSat-by-3 array at the current time step. numSat is the number of spacecraft.

Dependencies

To enable this port, select the Input body forces check box.

Data Types: double

Moment applied to the spacecraft with respect of mass in the body frame, specified as a 3-element vector or numSat-by-3 array at the current time step. numSat is the number of spacecraft.

Dependencies

To enable this port, select the Input body moments check box.

Data Types: double

External acceleration to apply to the spacecraft with respect to the ICRF or fixed-frame at the current timestep, specified as a 3-element vector or m-by-3 array.

Dependencies

To enable this port, select the Input external accelerations check box.

To specify the acceleration coordinate frame, set the External acceleration coordinate frame parameter.

Data Types: double

Moon libration angles for transformation between the ICRF and Moon-centric fixed-frame using the Moon-centric Principal Axis (PA) system, specified as a 3-element vector. To get these values, use the Moon Libration block.

Note

The fixed-frame used by this block when Central body is set to Moon is the Mean Earth/pole axis (ME) system. For more information, see Algorithms.

Dependencies

To enable this port:

  • Set Central body to Moon.

  • Select the Input Moon libration angles check box.

Data Types: double

Central body spin axis instantaneous right ascension, declination, and rotation angle, specified as a 3-element vector. This port is available only for custom central bodies.

Dependencies

To enable this port:

  • Set Central body to Custom.

  • Set Central body spin axis source to Port.

Data Types: double

Spacecraft mass at the current timestep. numSat is the number of spacecraft.

Dependencies

To enable this port, set Mass type to Custom Variable.

Data Types: double

Rate of change of mass (positive if accreted, negative if ablated) at the current timestep, specified as a scalar or 1D array of size numSat. numSat is the number of spacecraft.

Dependencies

To enable this port, set Mass type to Simple Variable.

Data Types: double

Spacecraft inertia tensor, specified as a 3-by-3 array or 3-by-3-by-numSat array at the current timestep. numSat is the number of spacecraft.

Dependencies

To enable this port, set Mass type to Custom Variable.

Data Types: double

Rate of change of inertia tensor matrix, specified as a 3-by-3 array or 3-by-3-by-numSat array at the current time step. numSat is the number of spacecraft.

Dependencies

To enable this port, set Mass type to Custom Variable.

Data Types: double

Relative velocity at which the mass is accreted to or ablated from the body in body-fixed axes, specified as a 3-element vector or numSat-by-3 array. numSat is the number of spacecraft.

Dependencies

To enable this port:

  • Set Mass type to Custom Variable or Simple Variable.

  • Select the Include mass flow relative velocity check box.

Data Types: double

Output

expand all

Position of the spacecraft with respect to the ICRF or fixed-frame outport coordinate frame, returned as a 3-element vector or numSat-by-3 array at the current time step. numSat is the number of spacecraft.

Dependencies

  • To change the output coordinate frame for this port, set the State vector output coordinate frame parameter.

  • The size of the initial conditions provided in the Mass, Orbit, or Attitude tab control the port dimension.

Data Types: double

Velocity of the spacecraft with respect to the ICRF or fixed-frame outport coordinate frame, returned as a 3-element vector or numSat-by-3 array at the current time step. numSat is the number of spacecraft.

Dependencies

  • To change the output coordinate frame for this port, set the State vector output coordinate frame parameter.

  • The size of the initial conditions provided in the Mass, Orbit, or Attitude tab control the port dimension.

Data Types: double

Total inertial acceleration of the spacecraft with respect to the ICRF, returned as a 3-element vector or numSat-by-3 array at the current timestep. numSat is the number of spacecraft.

Dependencies

  • To enable this port, select the Output total inertial acceleration check box

  • The size of the initial conditions provided in the Orbit tab control the port dimension.

Data Types: double

Spacecraft attitude quaternion, returned as a (scalar first) quaternion rotation from the body axis to the outport frame, as a 4-element quaternion, or numSat-by-4 array (scalar first) at the current time step. numSat is the number of spacecraft.

Dependencies

The coordinate frame and attitude format of this port depends on these settings:

  • To specify the attitude reference coordinate frame, set the Attitude reference coordinate frame parameter.

  • Set Attitude representation to Quaternion.

Data Types: double

Spacecraft attitude direction cosine matrix (DCM), returned as a3-by-3 array or numSat-by-3-by-3 array. numSat is the number of spacecraft.

Dependencies

The coordinate frame and attitude format of this port depends on these settings:

  • To specify the attitude reference coordinate frame, set the Attitude reference coordinate frame parameter.

  • Set Attitude representation to DCM.

Data Types: double

Spacecraft attitude Euler angles, returned as a 3-element vector or numSat-by-3 array. numSat is the number of spacecraft.

Dependencies

The coordinate frame and attitude format of this port depend on these settings:

  • To specify the attitude reference coordinate frame, set the Attitude reference coordinate frame parameter.

  • Set Attitude representation to Euler angles.

Data Types: double

Angular rate of the spacecraft relative to the attitude reference coordinate frame, returned as a 3-element vector or numSat-by-3 array, expressed as body axis angular rates PQR. numSat is the number of spacecraft.

Dependencies

The attitude reference coordinate frame depends on the Attitude reference coordinate frame parameter.

Data Types: double

Body angular acceleration relative to the ICRF frame, returned as a 3-element array or numSat-by-3 array. numSat is the number of spacecraft.

Dependencies

To enable this port, select the Output total inertial angular acceleration check box.

The attitude reference coordinate frame depends on the Attitude reference coordinate frame parameter.

Data Types: double

Coordinate system transformation between the ICRF and fixed-frame coordinate system at the current timestep, returned as a 4-element array.

Dependencies

To enable this port, select the Output quaternion (ICRF to Fixed-frame) check box.

Data Types: double

Time at current time step, returned as a:

  • scalar — If you specify the Start data/time parameter as a Julian date.

  • 6-element array — If you specify the Start data/time parameter as a Gregorian date with six elements (year, month, day, hours, minutes, seconds).

This value equals the Start date/time parameter value plus the elapsed simulation time.

Dependencies

To enable this parameter, select the Output current date/time (UTC Julian date) check box.

Data Types: double

Fuel tank status at the current timestep, returned as a scalar or numSat-element array, returned as:

  • 1 — Tank is full.

  • 0 — Tank is not full or empty.

  • -1 — Tank is empty.

numSat is the number of spacecraft.

Dependencies

To enable this parameter, select the Output fuel tank status check box.

Data Types: double

Parameters

expand all

Main

To enable external forces to be included in the integration of the spacecraft equations of motion in the body frame, select this check box. Otherwise, clear this check box.

Programmatic Use

Block Parameter: forcesin
Type: character vector
Values: 'off' | 'on'
Default: 'off'

To enable external moments to be included in the integration of the spacecraft equations of motion in the body frame, select this check box. Otherwise, clear this check box.

Programmatic Use

Block Parameter: momentsIn
Type: character vector
Values: 'off' | 'on'
Default: 'off'

To enable additional external accelerations to be included in the integration of the spacecraft equations of motion, select this check box. Otherwise, clear this check box.

Programmatic Use

Block Parameter: accelIn
Type: character vector
Values: 'off' | 'on'
Default: 'off'

Frame for acceleration input port A, specified as ICRF or Fixed-frame.

Dependencies

To enable this parameter, select the Input external accelerations check box.

Programmatic Use

Block Parameter: accelFrame
Type: character vector
Values: 'ICRF' | 'Fixed-frame'
Default: 'ICRF'

Position and velocity state output port coordinate frame setup, specified as ICRF or Fixed-frame.

Programmatic Use

Block Parameter: outportFrame
Type: character vector
Values: 'ICRF' | 'Fixed-frame'
Default: 'ICRF'

Data Types: string

Enable the total acceleration output computed by the block with respect to the ICRF or fixed-frame outport coordinate frame. This acceleration includes all external accelerations, forces, and internal environmental accelerations that act on the spacecraft.

Note

Do not use this port as part of a simulation loop (in other words, do not feed this output back into the block).

Tunable: Yes

Dependencies

To change the output coordinate frame for this port, set the State vector output coordinate frame parameter.

Programmatic Use

Block Parameter: AccelOut
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Data Types: string

Initial start date and time of simulation, specified as a Julian or Gregorian date. The block defines initial conditions using this value.

Tip

To calculate the Julian date, use the juliandate function.

Tunable: Yes

Dependencies

The data format for this parameter is controlled by the Time format parameter.

Programmatic Use

Block Parameter: startDate
Type: character vector
Values: 'juliandate(2020, 1, 1, 12, 0, 0)' | valid scalar Julian date | valid Gregorian date including year, month, day, hours, minutes, seconds as 1D or 6-element array
Default: 'juliandate(2020, 1, 1, 12, 0, 0)'

To output the current date or time, select this check box. Otherwise, clear this check box.

Dependencies

The data format for this parameter is controlled by the Time format parameter.

Programmatic Use

Block Parameter: dateOut
Type: character vector
Values: 'off' | 'on'
Default: 'off'

Out-of-range block behavior action. Specify one of these options.

ActionDescription
None No action.
Warning Warning displays in the MATLAB® Command Window. Model simulation continues.
Error (default) MATLAB returns an exception. Model simulation stops.

Programmatic Use

Block Parameter: action
Type: character vector
Values: 'None' | 'Warning' | 'Error'
Default: 'Warning'

Mass

Spacecraft mass type, specified as:

  • Fixed — Mass and inertia are constant throughout the simulation.

  • Simple Variable — Mass and inertia vary linearly as a function of mass rate.

  • Custom Variable — Instantaneous mass, inertia, and inertia rate are inputs to the block.

Programmatic Use

Block Parameter: massType
Type: character vector
Values: 'Fixed' | 'Simple Variable' | 'Custom Variable'
Default: 'Fixed'

Data Types: double

Initial mass of rigid body spacecraft, specified as scalar or vector of size numSat. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set the Mass type parameter to either Fixed or Simple variable.

Programmatic Use

Block Parameter: mass
Type: character vector
Values: scalar | vector of size numSat
Default: '4.0'

Spacecraft empty (dry) mass, specified as a scalar or vector of size numSat. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Mass type to Simple variable.

Programmatic Use

Block Parameter: emptyMass
Type: character vector
Values: 1D array of size numSat | 1D array of size numSat
Default: '3.5'

Data Types: double

Spacecraft full (wet) mass, specified as a scalar or vector of size numSat. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Mass type to Simple variable.

Programmatic Use

Block Parameter: fullMass
Type: character vector
Values: scalar | vector of size numSat
Default: '4.0'

Data Types: double

Initial inertia tensor matrix of the spacecraft, specified, as a 3-by-3 array for a single spacecraft or a 3-by-3-by-numSat array for multiple spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Mass type to Fixed.

Programmatic Use

Block Parameter: inertia
Type: character vector
Values: '[0.2273, 0, 0; 0 0.2273 0; 0 0 .0040]' | 3-by-3 array | 3-by-3-by-numSat array
Default: '[0.2273, 0, 0; 0 0.2273 0; 0 0 .0040]'

Empty (dry) inertia tensor matrix, specified as a 3-by-3 array for a single spacecraft or a 3-by-3-by-numSat array for multiple spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Mass type to Simple variable.

Programmatic Use

Block Parameter: emptyInertia
Type: character vector
Values: 3-by-3 array | 3-by-3-by-numSat array
Default: [0.1989, 0, 0; 0 0.1989 0; 0 0 .0035]

Full (wet) inertia tensor matrix, specified as a 3-by-3 array for a single spacecraft or a 3-by-3-by-numSat array for multiple spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Mass type to Simple variable.

Programmatic Use

Block Parameter: fullInertia
Type: character vector
Values: 3-by-3 array | 3-by-3-by-numSat array
Default: [0.2273, 0, 0; 0, 0.2273, 0; 0, 0, .0040]

To enable mass flow velocity to the block, select this check box. The mass flow velocity is the relative velocity in the body frame at which the mass is accreted or ablated. To disable mass flow velocity to the block, clear this check box.

Dependencies

To enable this parameter, set Mass type to Simple variable or Custom variable.

Programmatic Use

Block Parameter: useMassFlowRelativeVelocity
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Data Types: double

To limit the mass flow when the spacecraft mass is full or empty, select this check box. Otherwise, clear this check box.

Dependencies

To enable this parameter, set Mass type to Simple variable.

Programmatic Use

Block Parameter: limitMassFlow
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Data Types: double

To enable fuel tank status, select this check box. Otherwise, clear this check box.

Dependencies

To enable this parameter, set Mass type to Simple variable.

Programmatic Use

Block Parameter: outputFuelStatus
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Data Types: double

Orbit

Define the initial states of the spacecraft.

Input method for initial states of orbit, specified as Orbital elements, ICRF state vector, or Fixed-frame state vector.

Programmatic Use

Block Parameter stateFormatNum when propagator is set to High precision (numerical)
Type: character vector
Values: 'Orbital elements' | 'Orbital elements' | 'ICRF state vector' | 'Fixed-frame state' when propagator is set to 'High precision (numerical)'
Default: 'Orbital elements'

Orbit classification, specified as:

  • Keplerian — Model elliptical, parabolic, and hyperbolic orbits using six standard Keplerian orbital elements.

  • Elliptical equatorial — Fully define an equatorial orbit, where inclination is 0 or 180 degrees and the right ascension of the ascending node is undefined.

  • Circular — Define a circular orbit, where eccentricity is 0 and the argument of periapsis is undefined. To fully define a circular orbit, select Circular equatorial.

  • Circular equatorial — Fully define a circular orbit, where eccentricity is 0 and the argument of periapsis is undefined.

Dependencies

To enable this parameter, set Initial state format to Orbital elements.

Programmatic Use

Block Parameter: orbitType
Type: character vector
Values: 'Keplerian' | 'Elliptical equatorial' | 'Circular inclined' | 'Circular equatorial'
Default: 'Keplerian'

Half of ellipse major axis, specified as a 1D array of size numSat. numSat is the number of spacecraft.

  • For parabolic orbits, this block interprets this parameter as the periapsis radius (distance from periapsis to the focus point of orbit).

  • For hyperbolic orbits, this block interprets this parameter as the distance from periapsis to the hyperbola center.

Tunable: Yes

Dependencies

To enable this parameter, set Initial state format to Orbital elements.

Programmatic Use

Block Parameter: semiMajorAxis
Type: character vector
Values: scalar | 1D array of size numSat
Default: '6786000'

Deviation of the orbit from a perfect circle, specified as a scalar or 1D array of size numSat. numSat is the number of spacecraft.

If Orbit type is set to Keplerian, this value can be:

  • 1 for parabolic orbit

  • Greater than 1 for hyperbolic orbit

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements.

  • Set Orbit type to Keplerian or Elliptical equatorial.

Programmatic Use

Block Parameter: eccentricity
Type: character vector
Values: 0.01 | scalar | value between 0 and 1, or greater than 1 for Keplerian orbit type | 1D array of size numSat
Default: '0.01'

Vertical tilt of the ellipse with respect to the reference plane measured at the ascending node, specified as a scalar or 1D array of size numSat, in specified units. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements

  • Set Orbit type to Keplerian or Circular inclined

Programmatic Use

Block Parameter: inclination
Type: character vector
Values: 50 | scalar | 1D array of size numSat | degrees between 0 and 180 | radians between 0 and pi
Default: '50'

Right ascension of ascending node (RAAN), specified as a value between 0 and 360, specified as a scalar or 1D array of size numSat, in specified units. numSat is the number of spacecraft. RAAN is the angular distance along the reference plane from the International Celestial Reference Frame (ICRF) x-axis to the location of the ascending node — the point at which the spacecraft crosses the reference plane from south to north.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements.

  • Set Orbit type to Keplerian or Circular inclined.

Programmatic Use

Block Parameter: raan
Type: character vector
Values: '95' | scalar value between 0 and 360 | 1D array of size numSat
Default: '95'

Angle from the spacecraft ascending node to periapsis (closest point of orbit to the central body), specified as a 1D array of size numSat, in specified units. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements

  • Set Orbit type to Keplerian

Programmatic Use

Block Parameter: argPeriapsis
Type: character vector
Values: 93 | scalar value between 0 and 360 | 1D array of size numSat
Default: '93'

Angle between periapsis (closest point of orbit to the central body) and the initial position of spacecraft along its orbit at Start date/time, specified as a scalar or 1D array of size numSat, in specified units. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements.

  • Set Orbit type to Keplerian or Elliptical inclined.

Programmatic Use

Block Parameter: trueAnomaly
Type: character vector
Values: '203' | scalar value between 0 and 360 | 1D array of size numSat
Default: '203'

Angle between the ascending node and the initial position of spacecraft along its orbit at Start date/time, specified as a scalar or 3-element vector or 1D array of size numSat, in specified units. numSat is number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements.

  • Set Orbit Type to Circular inclined.

Programmatic Use

Block Parameter: argLat
Type: character vector
Values: '200' | scalar value between 0 and 360 | 1D array of size numSat
Default: '200'

Angle between the ICRF x-axis and the eccentricity vector, specified as a scalar or 3-element vector or 1D array of size numSat, in specified units. numSat is the number of spacecraft

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements.

  • Set Orbit type to Elliptical equatorial.

Programmatic Use

Block Parameter: lonPeriapsis
Type: character vector
Values: 100 | scalar value between 0 and 360 | 1D array of size numSat
Default: '100'

Angle between the ICRF x-axis and the initial position of spacecraft along its orbit at Start date/time, specified as a scalar or 1D array of size numSat or a numSat-by-3 vector, in specified units. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Initial state format to Orbital elements.

  • Set Orbit type to Circular equatorial.

Programmatic Use

Block Parameter: trueLon
Type: character vector
Values: '150' | scalar value between 0 and 360 | 1D array of size numSat | numSat-by-3 vector
Default: '150'

Cartesian position vector of spacecraft in ICRF coordinate system at Start date/time, specified as a 3-element vector for single spacecraft or a numSat-by-3 array for multiple spacecraft. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Initial state format to ICRF state vector.

Programmatic Use

Block Parameter: inertialPosition
Type: character vector
Values: [3649700.0 3308200.0 -4676600.0] | 3-element vector | numSat-by-3 array
Default: '[3649700.0 3308200.0 -4676600.0]'

Cartesian velocity vector of spacecraft in ICRF coordinate system at Start date/time, specified as a 3-element vector for single spacecraft or a numSat-by-3 array for multiple spacecraft. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Initial state format to ICRF state vector.

Programmatic Use

Block Parameter: inertialVelocity
Type: character vector
Values: [-2750.8 6666.4 2573.4] | 3-element vector | 2-D array of size numSat-by-3 array
Default: '[-2750.8 6666.4 2573.4]'

Cartesian position vector of spacecraft in fixed-frame coordinate system at Start date/time, specified as a 3-element vector for single spacecraft or a numSat-by-3 array for multiple spacecraft. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Initial state format to Fixed-frame state vector.

Programmatic Use

Block Parameter: fixedPosition
Type: character vector
Values: '[-4142689.0 -2676864.7 -4669861.6]' | 3-element vector for single spacecraft | numSat-by-3 array
Default: '[-2750.8 6666.4 2573.4]'

Cartesian velocity vector of spacecraft in fixed-frame coordinate system at Start date/time, specified as a 3-element vector for single spacecraft or a numSat-by-3 array for multiple spacecraft. numSat is the number of spacecraft.

Tunable: Yes

Dependencies

To enable this parameter, set Initial state format to Fixed-frame state vector.

Programmatic Use

Block Parameter: fixedVelocity
Type: character vector
Values: '[1452.7 -6720.7 2568.1]' | 3-element vector | numSat-by-3 array
Default: '[1452.7 -6720.7 2568.1]'

Attitude

Attitude and angular rate coordinate frame with respect to the attitude and angular rate initial conditions, specified as:

  • ICRF

  • Fixed-frame

  • NED

  • LVLH

Programmatic Use

Block Parameter: attitudeFrame
Type: character vector
Values: 'ICRF' | 'Fixed-frame' | 'NED' | 'LVLH'
Default: 'ICRF'

Data Types: string

Orientation format for spacecraft attitude (initial condition and output port), specified as Quaternion, DCM, or Euler angles.

Programmatic Use

Block Parameter: attitudeFrame
Type: character vector
Values: 'Quaternion' | 'DCM' | 'Euler angles'
Default: 'Quaternion'

Data Types: double

Spacecraft initial attitude (orientation) of the spacecraft provided as either a quaternion, DCM, or Euler angle set with respect to Attitude representation.

Tunable: Yes

Dependencies

This parameter name and value format changes depending on the Attitude representation parameter.

Parameter NameAttitude Representation SettingValue Format

Initial quaternion

Quaternion

  • 4-element vector

  • numSat-by-4 array

Initial DCM

DCM

  • 3-by-3 array

  • numSat-by-3-by-3 array

Initial Euler angles

Euler angles

  • 3-element vector

  • numSat-by-3 array

Programmatic Use

Block Parameter: attitude
Type: character vector
Values: 4-element vector | numSat-by-4 array | 3-by-3 array | numSat-by-3-by-3 array | 3-element array | numSat-by-3 array
Default: '[1, 0, 0, 0]'

Data Types: double

Rotation angle sequence for Euler angle attitude representation.

Tunable: Yes

Dependencies

To enable this parameter, set Attitude representation to Euler angles.

Programmatic Use

Block Parameter: rotationOrder
Type: character vector
Values: 'ZYX' | 'ZYZ' |'ZXY' | 'ZXZ' | 'YXZ' | 'YXY' | 'YZX' | 'YZY' | 'XYZ' | 'XYX' | 'XZY' | 'XZX'
Default: 'ZYX'

Data Types: double

Initial body-fixed angular rates (PQR) with respect to Attitude reference coordinate frame.

Tunable: Yes

Programmatic Use

Block Parameter: attitudeRate
Type: character vector
Values: | 3-element vector | numSat-by-3 array
Default: [0, 0, 0]

Data Types: double

Enable output total vehicle acceleration computed by the block with respect to the ICRF attitude reference coordinate frame. This acceleration includes all moments that act on the spacecraft.

Tunable: Yes

Programmatic Use

Block Parameter: angAccelOut
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Data Types: string

Select this check box to enable the use of the gravity gradient torque in the block rotational dynamics equations. Otherwise, clear this check box.

Tunable: Yes

Programmatic Use

Block Parameter: angAccelOut
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Data Types: double

Central Body

Celestial body, specified as Earth, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, or Custom, around which the spacecraft defined in the Orbit tab orbits.

Programmatic Use

Block Parameter: centralBody
Type: character vector
Values: 'Earth' | 'Moon' |'Mercury' | 'Venus' | 'Mars' | 'Jupiter' | 'Saturn' | 'Uranus' | 'Neptune' | 'Custom' |
Default: 'Earth'

Control the gravity model for the central body by specifying as Spherical harmonics, Point-mass, or Oblate ellipsoid (J2).

Dependencies

Available options are based on Central body settings.

Earth, Moon, Mars, or CustomMercury, Venus, Jupiter, Saturn, Uranus, or Neptune
Spherical harmonicsOblate ellipsoid (J2)
Point-massPoint-mass
Oblate ellipsoid (J2)

Programmatic Use

Block Parameter: gravityModel when centralBody set to 'Earth', 'Moon', 'Mars', or 'Custom' | gravityModelnoSH when centralBody set to Mercury, Venus, Jupiter, Saturn, Uranus, or Neptune
Type: character vector
Values: 'Spherical harmonics' | 'Point-mass' | 'Oblate ellipsoid (J2)' when centralBody set to 'Earth', 'Moon', 'Mars', or 'Custom'; 'Point-mass' | 'Oblate ellipsoid (J2)' when centralBody set to Mercury, Venus, Jupiter, Saturn, Uranus, or Neptune
Default: 'Spherical harmonics' when centralBody set to 'Earth', 'Moon', 'Mars', or 'Custom'; 'Oblate ellipsoid (J2)' when centralBody set to Mercury, Venus, Jupiter, Saturn, Uranus, or Neptune

Spherical harmonic gravitational potential model, specified according to the specified Central body.

Dependencies

Available options are based on Central body settings:

Central bodySpherical Harmonic Model Option
EarthEGM2008, EGM96, or EIGEN-GL04C
MoonLP-100K or LP-165P
MarsGMM2B

Programmatic Use

Block Parameter: 'earthSH' when centralBody set to 'Earth' | 'moonSH' when centralBody set to 'Moon' | 'marsSH' when centralBody set to 'Mars'
Type: character vector
Values: 'EGM2008' | 'EGM96' | 'EIGEN-GL04C' when centralBody set to 'earthSH'; 'LP-100K' | 'LP-165P' when centralBody set to 'moonSH'; 'GMM2B' when centralBody set to 'marsSH'
Default: 'Spherical harmonics'

Rotational rate of a custom central body, specified as a scalar.

Dependencies

To enable this parameter, set Central body to Custom.

Programmatic Use

Block Parameter: 'customOmega'
Type: character vector
Values: '4.06124975e-3' | scalar
Default: '4.06124975e-3'

Data Types: double

Harmonic coefficient MAT-file that contains definitions for a custom planetary model, specified as a character vector or string.

This file must contain these variables:

VariableDescription
Re

Scalar of planet equatorial radius in meters (m).

GM

Scalar of planetary gravitational parameter in meters cubed per second squared (m3/s2)

.
degree

Scalar of maximum degree.

C

(degree+1)-by-(degree+1) matrix containing normalized spherical harmonic coefficients matrix, C.

S

(degree+1)-by-(degree+1) matrix containing normalized spherical harmonic coefficients matrix, S.

Dependencies

To enable this parameter:

  • SetCentral body to Custom.

  • Set Gravitational potential model to Spherical harmonics.

Programmatic Use

Block Parameter: shFile
Type: character vector
Values: 'aerogmm2b.mat' | harmonic coefficient MAT-file
Default: 'aerogmm2b.mat'

Degree of harmonic model, specified as a scalar.

Planet ModelRecommended DegreeMaximum Degree

EGM2008

120

2159

EGM96

70

360

LP100K

60

100

LP165P

60

165

GMM2B

60

80

EIGENGL04C

70

360

Dependencies

To enable this parameter:

  • Set Central body to Earth, Moon, Mars, or Custom.

  • Set Gravitational potential model to Spherical harmonics.

Programmatic Use

Block Parameter: shDegree
Type: character vector
Values: '80' | scalar
Default: '80'

Select this check box to use Earth orientation parameters for the transformation between the ICRF and fixed-frame coordinate systems. Otherwise, clear this check box.

Dependencies

To enable this parameter, set Central body to Earth.

Programmatic Use

Block Parameter: useEOPs
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Custom list of Earth orientation data, specified in a MAT-file.

Dependencies

To enable this parameter:

  • Select the Use Earth orientation parameters (EOPs) check box.

  • Set Central body to Earth.

Programmatic Use

Block Parameter: eopFile
Type: character vector
Values: 'aeroiersdata.mat' | MAT-file
Default: 'aeroiersdata.mat'

To specify Euler libration angles (φ θ ψ) for Moon orientation, select this check box.

Dependencies

To enable this parameter, set Central body to Moon.

Programmatic Use

Block Parameter: useMoonLib
Type: character vector
Values: 'off' | 'on'
Default: 'off'

To add output transformation quaternion port for the quaternion transformation from the ICRF to the fixed-frame coordinate system, select this check box. Otherwise, clear this check box.

Programmatic Use

Block Parameter: outputTransform
Type: character vector
Values: 'off' | 'on'
Default: 'off'

Central body spin axis source, specified as Port or Dialog. The block uses the spin axis to calculate the transformation from the ICRF to the fixed-frame coordinate system for the custom central body.

Dependencies

To enable this parameter, set Central body to Custom.

Programmatic Use

Block Parameter: cbPoleSrc
Type: character vector
Values: 'Port' | 'Dialog'
Default: 'Port'

Right ascension of central body spin axis at J2000 (2451545.0 JD, 2000 Jan 1 12:00:00 TT), specified as a double scalar.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Central body spin axis source to Dialog.

Programmatic Use

Block Parameter: cbRA
Type: character vector
Values: '317.68143' | double scalar
Default: '317.68143'

Right ascension rate of the central body spin axis, specified as a double scalar, in specified angle units/century.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Central body spin axis source to Dialog.

Programmatic Use

Block Parameter: cbRARate
Type: character vector
Values: '-0.1061' | double scalar
Default: '-0.1061'

Declination of the central body spin axis at J2000 (2451545.0 JD, 2000 Jan 1 12:00:00 TT), specified as a double scalar.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Central body spin axis source to Dialog.

Programmatic Use

Block Parameter: cbDec
Type: character vector
Values: '52.88650' | double scalar
Default: '52.88650'

Declination rate of the central body spin axis, specified as a double scalar, in specified angle units/century.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Central body spin axis source to Dialog.

Programmatic Use

Block Parameter: cbDecRate
Type: character vector
Values: '-0.0609' | double scalar
Default: '-0.0609'

Rotation angle of the central body x axis with respect to the ICRF x-axis at J2000 (2451545.0 JD, 2000 Jan 1 12:00:00 TT), specified as a double scalar, in specified angle units.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Central body spin axis source to Dialog.

Programmatic Use

Block Parameter: cbRotAngle
Type: character vector
Values: '176.630' | double scalar
Default: '176.630'

Rotation rate of the central body x axis with respect to the ICRF x-axis (2451545.0 JD, 2000 Jan 1 12:00:00 UTC), specified as a double scalar, in angle units/day.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Central body spin axis source to Dialog.

Programmatic Use

Block Parameter: cbRotRate
Type: character vector
Values: '350.89198226' | double scalar
Default: '350.89198226'

Equatorial radius for a custom central body, specified as a double scalar.

Tunable: Yes

Dependencies

To enable this parameter, set Gravitational potential model to Point-mass or Oblate ellipsoid (J2).

Programmatic Use

Block Parameter: customR
Type: character vector
Values: '3396200' | double scalar
Default: '3396200'

Flattening ratio for custom central body, specified as a double scalar.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Gravitational potential model to Point-mass or Oblate ellipsoid (J2).

Programmatic Use

Block Parameter: customF
Type: character vector
Values: '0.00589' | double scalar
Default: '0.00589'

Gravitational parameter for a custom central body, specified as a double scalar.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Gravitational potential model to Point-mass or Oblate ellipsoid (J2).

Programmatic Use

Block Parameter: customMu
Type: character vector
Values: '4.305e13' | double scalar
Default: '4.305e13'

Most significant or largest spherical harmonic term, which accounts for oblateness of a celestial body, specified as a double scalar.

Tunable: Yes

Dependencies

To enable this parameter:

  • Set Central body to Custom.

  • Set Gravitational potential model to Oblate ellipsoid (J2).

Programmatic Use

Block Parameter: customJ2
Type: character vector
Values: '1.0826269e-03' | double scalar
Default: '1.0826269e-03'

Units

Parameter and port units, specified as shown here.

UnitsForcesMomentMassInertiaDistance UnitsVelocity UnitsAcceleration Units
Metric (m/s)NewtonNewton-meterKilogramsKilogram m2metersmeters/secmeters/sec2
Metric (km/s)NewtonNewton-meterKilogramsKilogram m2kilometerskilometers/seckilometers/sec2
Metric (km/h)NewtonNewton-meterKilogramsKilogram m2kilometerskilometers/hourkilometers/hour2
English (ft/s)Pound-forceFoot-poundSlugsSlug ft2feetfeet/secfeet/sec2
English (kts)Pound-forceFoot-poundSlugsSlug ft2nautical mileknotsknots/sec

Programmatic Use

Block Parameter: units
Type: character vector
Values: 'Metric (m/s)' | 'Metric (km/s)' | 'Metric (km/h)' | 'English (ft/s)' | 'English (kts)'
Default: 'Metric (m/s)'

Parameter and port units for angles, specified as Degrees or Radians.

Programmatic Use

Block Parameter: angleUnits
Type: character vector
Values: 'Degrees' | 'Radians'
Default: 'Degrees'

Time format for Start date/time (UTC Julian date) and output port tutc, specified as Julian date or Gregorian.

Programmatic Use

Block Parameter: timeFormat
Type: character vector
Values: 'Julian date' | 'Gregorian'
Default: 'Julian date'

Algorithms

expand all

References

[1] Vallado, David. Fundamentals of Astrodynamics and Applications. 4th ed. Hawthorne, CA: Microcosm Press, 2013.

[2] Vepa, Ranjan. Dynamics and Control of Autonomous Space Vehicles and Robotics. New York: Cambridge University Press, 2019.

[3] Stevens, Frank L., and Brian L. Stevens. Aircraft Control and Simulation. 2nd ed. Hoboken, NJ: John Wiley & Sons, 2003.

[4] Gottlieb, R. G. Fast Gravity, Gravity Partials, Normalized Gravity, Gravity Gradient Torque and Magnetic Field: Derivation, Code and Data. NASA Contractor Report 188243. Houston: NASA, February 1993.

[5] Konopliv, A. S., S. W. Asmar, E. Carranza, W. L. Sjogen, D. N. Yuan. "Recent Gravity Models as a Result of the Lunar Prospector Mission." Icarus 150, no. 1 (2001): 1–18.

[6] Lemoine, F. G. et al. "An Improved Solution of the Gravity Field of Mars (GMM-2B) from Mars Global Surveyor." Journal of Geophysical Research 106, no. E10 (2001): 23359–23376.

[7] Seidelmann, P. Kenneth et al. "Report of the IAU/IAG Working Group on Cartographic Coordinates and Rotational Elements: 2006." Celestial Mech Dyn Astr 98 (20017): 155–180 (2007).

[8] Standish, E. M. "JPL Planetary and Lunar Ephemerides." DE405/LE405. Interoffice memorandum. JPL IOM 312.F-98-048. August 26, 1998.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2021b