Source Documentation

CADRE_assembly.py

class CADRE.CADRE_assembly.CADRE(n, m, solar_raw1=None, solar_raw2=None, comm_raw=None, power_raw=None)[source]

Bases: openmdao.main.assembly.Assembly

OpenMDAO implementation of the CADRE model

get_unconnected_inputs()[source]
make_connections()[source]

Collects the names of all input and output variables for all components within the assembly (drivers excluded). Then establishes connections between any output variable and input variable that has the same name so long as the variable name does not exist as an output to more than a single component (so excludes default outputs).

CADRE_launch.py

class CADRE.CADRE_launch.CADRE_Launch(n=200)[source]

Bases: openmdao.main.assembly.Assembly

Allows for analysis of the launch parameters of CADRE.

Considers multiple launch parameters and their effects on coverage of the Earth’s thermosphere.

Ultimately, a launch that provides the most uniform sampling is favorable, which is expected to be given by a polar orbit (Inclination near 90). Other launch parameters are probably not very useful in comparison.

class CADRE.CADRE_launch.GroundLOC(n)[source]

Bases: openmdao.main.component.Component

Gives the lat and lon location of the ground beneath a satellite.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
d_lat(a, b, c, d, x, y, z)[source]
d_lat_O_IE(a, b, c, d, x, y, z)[source]
d_lon(a, b, c, d, e, f, g, x, y, z)[source]
d_lon_O_IE(a, b, c, d, w, v, u, x, y, z)[source]
execute()[source]
linearize()[source]
Re = 6378.137
r2d = 57.29577951308232
class CADRE.CADRE_launch.Uniformity(n)[source]

Bases: openmdao.main.component.Component

execute()[source]
linearize()[source]
provideJ()[source]

Provide full Jacobian.

CADRE_mdp.py

class CADRE.CADRE_mdp.CADRE_Optimization(n=1500, m=300, npts=6)[source]

Bases: openmdao.main.assembly.Assembly

KS.py

class CADRE.KS.KSComp(n=2)[source]

Bases: openmdao.main.component.Component

Aggregates a number of functions to a single value via the Kreisselmeier-Steinhauser Function.

Float rho

Hyperparameter for the KS function

  • default: ‘0.1’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
Float KS

Value of the aggregate KS function

  • default: ‘0.0’
  • iotype: ‘out’
  • vartypename: ‘Float’
  • assumed_default: False
execute()[source]
linearize()[source]

Linearize around the last executed point

provideDer()[source]
class CADRE.KS.KSfunction[source]

Bases: object

Helper class that can be used inside other components to aggregate constraint vectors with a KS function.

compute(g, rho=50)[source]

Gets the value of the KS function for the given array of constraints.

derivatives()[source]

returns a row vector of [dKS_gd, dKS_drho]

attitude.py

Attitude discipline for CADRE

class CADRE.attitude.Attitude_Angular(n=2)[source]

Bases: openmdao.main.component.Component

Calculates angular velocity vector from the satellite’s orientation matrix and its derivative.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.attitude.Attitude_AngularRates(n=2)[source]

Bases: openmdao.main.component.Component

Calculates time derivative of angular velocity vector.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.attitude.Attitude_Attitude(n=2)[source]

Bases: openmdao.main.component.Component

Coordinate transformation from the interial plane to the rolled (forward facing) plane.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

dvx_dv = array([[[ 0., 0., 0.], [ 0., 0., -1.], [ 0., 1., 0.]], [[ 0., 0., 1.], [ 0., 0., 0.], [-1., 0., 0.]], [[ 0., -1., 0.], [ 1., 0., 0.], [ 0., 0., 0.]]])
class CADRE.attitude.Attitude_Roll(n=2)[source]

Bases: openmdao.main.component.Component

Calculates the body-fixed orientation matrix.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.attitude.Attitude_RotationMtx(n=2)[source]

Bases: openmdao.main.component.Component

Multiplies transformations to produce the orientation matrix of the body frame with respect to inertial.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.attitude.Attitude_RotationMtxRates(n=2)[source]

Bases: openmdao.main.component.Component

Calculates time derivative of body frame orientation matrix.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.attitude.Attitude_Sideslip(n=2)[source]

Bases: openmdao.main.component.Component

Determine velocity in the body frame.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.attitude.Attitude_Torque(n=2)[source]

Bases: openmdao.main.component.Component

Compute the required reaction wheel tourque.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

J = array([[ 0.018, 0. , 0. ], [ 0. , 0.018, 0. ], [ 0. , 0. , 0.006]])

battery.py

Battery discipline for CADRE

class CADRE.battery.BatteryConstraints(n=2)[source]

Bases: openmdao.main.component.Component

Some KS constraints for the battery. I believe this essentially replaces a cycle in the graph.

Float ConCh

Constraint on charging rate

  • default: ‘0.0’
  • iotype: ‘out’
  • units: ‘A’
  • vartypename: ‘Float’
  • assumed_default: False
Float ConDs

Constraint on discharging rate

  • default: ‘0.0’
  • iotype: ‘out’
  • units: ‘A’
  • vartypename: ‘Float’
  • assumed_default: False
Float ConS0

Constraint on minimum state of charge

  • default: ‘0.0’
  • iotype: ‘out’
  • units: ‘unitless’
  • vartypename: ‘Float’
  • assumed_default: False
Float ConS1

Constraint on maximum state of charge

  • default: ‘0.0’
  • iotype: ‘out’
  • units: ‘unitless’
  • vartypename: ‘Float’
  • assumed_default: False
apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.battery.BatteryPower(n=2)[source]

Bases: openmdao.main.component.Component

Power supplied by the battery

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.battery.BatterySOC(n_times)[source]

Bases: CADRE.rk4.RK4

Computes the time history of the battery state of charge.

n_time: int
number of time_steps to take
time_step: float
size of each timestep
df_dx(external, state)[source]

Output deriative

df_dy(external, state)[source]

State deriative

f_dot(external, state)[source]

Rate of change of SOC

list_deriv_vars()[source]

comm.py

Communications Discpline for CADRE

class CADRE.comm.Comm_AntRotation(n)[source]

Bases: openmdao.main.component.Component

Fixed antenna angle to time history of the quaternion.

Float antAngle
  • default: ‘0.0’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.comm.Comm_AntRotationMtx(n)[source]

Bases: openmdao.main.component.Component

Translate antenna angle into the body frame.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.comm.Comm_BitRate(n)[source]

Bases: openmdao.main.component.Component

Compute the data rate the satellite receives.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

Gr = 19.498445997580454
Ll = 0.6309573444801932
SNR = 3.1622776601683795
T = 500.0
alpha = 1679597068362.0796
c = 299792458
f = 437000000.0
k = 1.3806503e-23
pi = 3.1415926535897931
class CADRE.comm.Comm_DataDownloaded(n_times)[source]

Bases: CADRE.rk4.RK4

Integrate the incoming data rate to compute the time history of data downloaded from the satelite.

df_dx(external, state)[source]
df_dy(external, state)[source]
f_dot(external, state)[source]
list_deriv_vars()[source]
class CADRE.comm.Comm_Distance(n)[source]

Bases: openmdao.main.component.Component

Calculates distance from ground station to satellitle.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.comm.Comm_EarthsSpin(n)[source]

Bases: openmdao.main.component.Component

Returns the Earth quaternion as a function of time.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.comm.Comm_EarthsSpinMtx(n)[source]

Bases: openmdao.main.component.Component

Quaternion to rotation matrix for the earth spin.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.comm.Comm_GSposECI(n)[source]

Bases: openmdao.main.component.Component

Convert time history of ground station position from earth frame to inertial frame.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.comm.Comm_GSposEarth(n)[source]

Bases: openmdao.main.component.Component

Returns position of the ground station in Earth frame.

Float alt

Altitude of ground station in Earth-fixed frame

  • default: ‘0.0’
  • iotype: ‘in’
  • units: ‘rad’
  • vartypename: ‘Float’
  • assumed_default: False
Float lat

Latitude of ground station in Earth-fixed frame

  • default: ‘0.0’
  • iotype: ‘in’
  • units: ‘rad’
  • vartypename: ‘Float’
  • assumed_default: False
Float lon

Longitude of ground station in Earth-fixed frame

  • default: ‘0.0’
  • iotype: ‘in’
  • units: ‘rad’
  • vartypename: ‘Float’
  • assumed_default: False
apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

Re = 6378.137
d2r = 0.017453292519943295
class CADRE.comm.Comm_GainPattern(n, rawG=None)[source]

Bases: openmdao.main.component.Component

Determines transmitter gain based on an external az-el map.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives. (i.e., Jacobian)

class CADRE.comm.Comm_LOS(n)[source]

Bases: openmdao.main.component.Component

Determines if the Satellite has line of sight with the ground stations.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

Re = 6378.137
class CADRE.comm.Comm_VectorAnt(n)[source]

Bases: openmdao.main.component.Component

Transform from antenna to body frame

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.comm.Comm_VectorBody(n)[source]

Bases: openmdao.main.component.Component

Transform from body to inertial frame.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.comm.Comm_VectorECI(n)[source]

Bases: openmdao.main.component.Component

Determine vector between satellite and ground station.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.comm.Comm_VectorSpherical(n)[source]

Bases: openmdao.main.component.Component

Convert satellite-ground vector into Az-El.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

kinematics.py

CADRE.kinematics.arctan(x, y)[source]
CADRE.kinematics.computepositionrotd(n, vects, mat)[source]
CADRE.kinematics.computepositionrotdjacobian(n, v1, O_21)[source]
CADRE.kinematics.computepositionspherical(n, v)[source]
CADRE.kinematics.computepositionsphericaljacobian(n, nJ, v)[source]
CADRE.kinematics.fixangles(n, azimuth0, elevation0)[source]
CADRE.kinematics.modulo(a, p)[source]

orbit.py

Orbit discipline for CADRE

class CADRE.orbit.Orbit_Dynamics(n_times)[source]

Bases: CADRE.rk4.RK4

Computes the Earth to body position vector in Earth-centered intertial frame.

df_dx(external, state)[source]
df_dy(external, state)[source]
f_dot(external, state)[source]
list_deriv_vars()[source]
class CADRE.orbit.Orbit_Initial[source]

Bases: openmdao.main.component.Component

Computes initial position and velocity vectors of Earth to body position

Float Inc
  • default: ‘82.072’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
Float RAAN
  • default: ‘66.279’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
Float altApogee
  • default: ‘500.0’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
Float altPerigee
  • default: ‘500.0’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
Float argPerigee
  • default: ‘0.0’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
Float trueAnomaly
  • default: ‘337.987’
  • iotype: ‘in’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian

compute(altPerigee, altApogee, RAAN, Inc, argPerigee, trueAnomaly)[source]

Compute position and velocity from orbital elements

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives, (i.e., Jacobian)

parameters.py

Bspline module for CADRE

class CADRE.parameters.BsplineParameters(n, m)[source]

Bases: openmdao.main.component.Component

Creates a Bspline interpolant for several CADRE variables so that their time histories can be shaped with m control points instead of n time points.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

power.py

Power discipline for CADRE

class CADRE.power.Power_CellVoltage(n, dat=None)[source]

Bases: openmdao.main.component.Component

Compute the output voltage of the solar panels.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
setx()[source]
class CADRE.power.Power_SolarPower(n=2)[source]

Bases: openmdao.main.component.Component

Compute the output power of the solar panels.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

class CADRE.power.Power_Total(n=2)[source]

Bases: openmdao.main.component.Component

Compute the battery power which is the sum of the loads. This includes a 2-Watt constant power usage that accounts for the scientific instruments on the satellite and small actuator inputs in response to disturbance torques.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

reactionwheel.py

Reaction wheel discipline for CADRE

class CADRE.reactionwheel.ReactionWheel_Dynamics(n_times)[source]

Bases: CADRE.rk4.RK4

Compute the angular velocity vector of reaction wheel.

df_dx(external, state)[source]
df_dy(external, state)[source]
f_dot(external, state)[source]
list_deriv_vars()[source]
class CADRE.reactionwheel.ReactionWheel_Motor(n)[source]

Bases: openmdao.main.component.Component

Compute reaction wheel motor torque.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
class CADRE.reactionwheel.ReactionWheel_Power(n)[source]

Bases: openmdao.main.component.Component

Compute reaction wheel power.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
I0 = 0.017
V = 4.0
a = 0.00049
b = 450.0
class CADRE.reactionwheel.ReactionWheel_Torque(n)[source]

Bases: openmdao.main.component.Component

Compute torque vector of reaction wheel.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

rk4.py

RK4 time integration component

class CADRE.rk4.RK4[source]

Bases: openmdao.main.component.Component

Inherit from this component to use.

State variable dimension: (num_states, num_time_points)

External input dimension: (input width, num_time_points)

Array external_vars

List of names of variables that are external to the system but DO vary with time.

  • default: ‘[]’
  • iotype: ‘in’
  • comparison_mode: 1
  • vartypename: ‘Array’
  • assumed_default: False
Array fixed_external_vars

List of names of variables that are external to the system but DO NOT vary with time.

  • default: ‘[]’
  • iotype: ‘in’
  • comparison_mode: 1
  • vartypename: ‘Array’
  • assumed_default: False
Float h

Time step used for RK4 integration

  • default: ‘0.01’
  • iotype: ‘in’
  • units: ‘s’
  • vartypename: ‘Float’
  • assumed_default: False
Str init_state_var

Name of the variable to be used for initial conditions

  • default: ‘’
  • iotype: ‘in’
  • vartypename: ‘Str’
Str state_var

Name of the variable to be used for time integration

  • default: ‘’
  • iotype: ‘in’
  • vartypename: ‘Str’
applyJintT(arg, required_results)[source]

Apply derivatives with respect to state variables.

apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

df_dx(external, state)[source]

derivatives of states with respect to external vars external: array or external variables for a single time step state: array of state variables for a single time step.

This must be overridden in derived classes.

df_dy(external, state)[source]

Derivatives of states with respect to states.

external: array or external variables for a single time step

state: array of state variables for a single time step.

This must be overridden in derived classes.

execute()[source]

Solve for the states at all time integration points.

f_dot(external, state)[source]

Time rate of change of state variables.

external: array or external variables for a single time step

state: array of state variables for a single time step.

This must be overridden in derived classes.

initialize()[source]

Set up dimensions and other data structures.

provideJ()[source]

Linearize about current point.

solar.py

Solar discipline for CADRE

class CADRE.solar.Solar_ExposedArea(n, raw1=None, raw2=None)[source]

Bases: openmdao.main.component.Component

Exposed area calculation for a given solar cell

p: panel ID [0,11]

c: cell ID [0,6]

a: fin angle [0,90]

z: azimuth [0,360]

e: elevation [0,180]

LOS: line of sight with the sun [0,1]

Float finAngle

Fin angle of solar panel

  • default: ‘0.0’
  • iotype: ‘in’
  • units: ‘rad’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
apply_deriv(arg, result)[source]

Matrix-vector product with the Jacobian.

apply_derivT(arg, result)[source]

Matrix-vector product with the transpose of the Jacobian.

execute()[source]

Calculate output.

list_deriv_vars()[source]
provideJ()[source]

Calculate and save derivatives (i.e., Jacobian).

setx()[source]

Sets our state array

sun.py

Sun discipline for CADRE

class CADRE.sun.Sun_LOS(n=2)[source]

Bases: openmdao.main.component.Component

Compute the Satellite to sun line of sight.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
class CADRE.sun.Sun_PositionBody(n=2)[source]

Bases: openmdao.main.component.Component

Position vector from earth to sun in body-fixed frame

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
class CADRE.sun.Sun_PositionECI(n=2)[source]

Bases: openmdao.main.component.Component

Compute the position vector from Earth to Sun in Earth-centered inertial frame.

Float LD
  • default: ‘0.0’
  • iotype: ‘in’
  • units: ‘unitless’
  • vartypename: ‘Float’
  • assumed_default: False
  • copy: None
apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
d2r = 0.017453292519943295
class CADRE.sun.Sun_PositionSpherical(n=2)[source]

Bases: openmdao.main.component.Component

Compute the elevation angle of the Sun in the body-fixed frame.

apply_deriv(arg, result)[source]
apply_derivT(arg, result)[source]
execute()[source]
list_deriv_vars()[source]
provideJ()[source]
CADRE.sun.crossMatrix(v)[source]

speeds.py

test_CADRE_derivs.py

class CADRE.test.test_CADRE_derivs.Testcase_CADRE_deriv(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test run/step/stop aspects of a simple workflow.

test_RK4_issue()[source]

test_assembly.py

class CADRE.test.test_assembly.Testcase_CADRE_assembly(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests the CADRE assembly.

compare(compname, inputs, outputs)[source]
test_Attitude_Angular()[source]
test_Attitude_AngularRates()[source]
test_Attitude_Attitude()[source]
test_Attitude_Roll()[source]
test_Attitude_RotationMtx()[source]
test_Attitude_RotationMtxRates()[source]
test_Attitude_Torque()[source]
test_BatteryConstraints()[source]
test_BatteryPower()[source]
test_BatterySOC()[source]
test_Comm_AntRotation()[source]
test_Comm_BitRate()[source]
test_Comm_DataDownloaded()[source]
test_Comm_Distance()[source]
test_Comm_EarthsSpin()[source]
test_Comm_EarthsSpinMtx()[source]
test_Comm_GSposECI()[source]
test_Comm_GSposEarth()[source]
test_Comm_GainPattern()[source]
test_Comm_LOS()[source]
test_Comm_VectorAnt()[source]
test_Comm_VectorBody()[source]
test_Comm_VectorECI()[source]
test_Comm_VectorSpherical()[source]
test_Power_CellVoltage()[source]
test_Power_SolarPower()[source]
test_Power_Total()[source]
test_ReactionWheel_Dynamics()[source]
test_ReactionWheel_Power()[source]
test_ReactionWheel_Torque()[source]
test_Solar_ExposedArea()[source]
test_Sun_LOS()[source]
test_Sun_PositionBody()[source]
test_Sun_PositionECI()[source]
test_Sun_PositionSpherical()[source]
test_ThermalTemperature()[source]

test_components.py

class CADRE.test.test_components.Testcase_CADRE(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test run/step/stop aspects of a simple workflow.

compare_results(outputs)[source]
run_model()[source]
setUp()[source]

Called before each test.

setup(compname, inputs)[source]
tearDown()[source]

Called after each test.

test_Attitude_Angular()[source]
test_Attitude_AngularRates()[source]
test_Attitude_Attitude()[source]
test_Attitude_Roll()[source]
test_Attitude_RotationMtx()[source]
test_Attitude_RotationMtxRates()[source]
test_Attitude_Sideslip()[source]
test_Attitude_Torque()[source]
test_BatteryConstraints()[source]
test_BatteryPower()[source]
test_BatterySOC()[source]
test_Comm_AntRotation()[source]
test_Comm_BitRate()[source]
test_Comm_DataDownloaded()[source]
test_Comm_Distance()[source]
test_Comm_EarthsSpin()[source]
test_Comm_EarthsSpinMtx()[source]
test_Comm_GSposECI()[source]
test_Comm_GSposEarth()[source]
test_Comm_GainPattern()[source]
test_Comm_LOS()[source]
test_Comm_VectorAnt()[source]
test_Comm_VectorBody()[source]
test_Comm_VectorECI()[source]
test_Comm_VectorSpherical()[source]
test_Power_CellVoltage()[source]
test_Power_SolarPower()[source]
test_Power_Total()[source]
test_ReactionWheel_Dynamics()[source]
test_ReactionWheel_Motor()[source]
test_ReactionWheel_Power()[source]
test_ReactionWheel_Torque()[source]
test_Solar_ExposedArea()[source]
test_Sun_LOS()[source]
test_Sun_PositionBody()[source]
test_Sun_PositionECI()[source]
test_Sun_PositionSpherical()[source]
test_ThermalTemperature()[source]

test_derivatives.py

class CADRE.test.test_derivatives.Testcase_CADRE(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test run/step/stop aspects of a simple workflow.

compare_derivatives(var_in, var_out, rel_error=False)[source]
run_model()[source]
setUp()[source]

Called before each test.

setup(compname, inputs, state0)[source]
tearDown()[source]

Called after each test.

test_AAOrbit_Dynamics()[source]
test_Attitude_Angular()[source]
test_Attitude_AngularRates()[source]
test_Attitude_Attitude()[source]
test_Attitude_Roll()[source]
test_Attitude_RotationMtx()[source]
test_Attitude_RotationMtxRates()[source]
test_Attitude_Torque()[source]
test_BatteryConstraints()[source]
test_BatteryPower()[source]
test_BatterySOC()[source]
test_Comm_AntRotation()[source]
test_Comm_AntRotationMtx()[source]
test_Comm_BitRate()[source]
test_Comm_DataDownloaded()[source]
test_Comm_Distance()[source]
test_Comm_EarthsSpin()[source]
test_Comm_EarthsSpinMtx()[source]
test_Comm_GSposECI()[source]
test_Comm_GSposEarth()[source]
test_Comm_GainPattern()[source]
test_Comm_LOS()[source]
test_Comm_VectorAnt()[source]
test_Comm_VectorBody()[source]
test_Comm_VectorECI()[source]
test_Comm_VectorSpherical()[source]
test_Orbit_Initial()[source]
test_Power_CellVoltage()[source]
test_Power_SolarPower()[source]
test_Power_Total()[source]
test_ReactionWheel_Dynamics()[source]
test_ReactionWheel_Power()[source]
test_ReactionWheel_Torque()[source]
test_Solar_ExposedArea()[source]
test_Sun_LOS()[source]
test_Sun_PositionBody()[source]
test_Sun_PositionECI()[source]
test_Sun_PositionSpherical()[source]
test_ThermalTemperature()[source]
test_bspline_parameters()[source]

test_rk_deriv.py

class CADRE.test.test_rk_deriv.RKTest(n_times)[source]

Bases: CADRE.rk4.RK4

Simple case with 2 states, 2 time points, and a 2-wide time-invariant input

df_dx(external, state)[source]
df_dy(external, state)[source]
f_dot(external, state)[source]
class CADRE.test.test_rk_deriv.Testcase_RK_deriv(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test run/step/stop aspects of a simple workflow.

compare_derivatives(var_in, var_out)[source]
run_model()[source]
setUp()[source]

Called before each test.

setup(compname, inputs, state0)[source]
tearDown()[source]

Called after each test.

test_with_time_invariant()[source]

thermal_temperature.py

Thermal discipline for CADRE

class CADRE.thermal_temperature.ThermalTemperature(n_times)[source]

Bases: CADRE.rk4.RK4

Calculates the temperature distribution on the solar panels.

df_dx(external, state)[source]
df_dy(external, state)[source]
f_dot(external, state)[source]
list_deriv_vars()[source]