Chandra.Maneuver

Chandra.Maneuver.NSM_attitude(att, time)

Calculate the closest normal sun mode attitude for the specified starting attitude att and time.

Parameters:
  • att – attitude that can initialize a Quat()
  • time – time in a valid Chandra.Time format
Returns:

NSM attitude quaternion

Return type:

Quat

Chandra.Maneuver.attitudes(att1, att2, step=300, tstart=0, exact_steps=False)

Calculate the maneuver profile of the spacecraft and return time, attitude quaternions, and sun pitch.

By default the time steps are calculated to be the closest possible to the specified step while maintaining an even spacing between the start and end of the maneuver. If exact_steps is True then the time steps are exactly as specified and there will be one uneven step at the end.

Example usage:

>>> import Chandra.Maneuver
>>> atts = Chandra.Maneuver.attitudes((0,0,0), (10,20,30))
>>> atts.pitch
array([ 79.64483   ,  81.90894478,  89.10262574,  95.10617367,  96.57590726])
>>> atts.q1
array([ 0.        ,  0.03083816,  0.13619809,  0.23923962,  0.26853582])
Parameters:
  • att1 – initial attitude (Quat, 3 element RA,Dec,Roll, or 4 element quaternion)
  • att2 – final attitude (Quat, 3 element RA,Dec,Roll, or 4 element quaternion)
  • step – time separation of returned attitudes (seconds)
  • tstart – maneuver start time (DateTime compatible)
  • exact_steps – use the exact time step
Return type:

numpy.recarray [ time, q1, q2, q3, q4, pitch]

Chandra.Maneuver.duration(att1, att2)

Calculate the duration of a maneuver.

Example usage:

>>> import Chandra.Maneuver
>>> Chandra.Maneuver.duration((0,0,0), (20,20,20))
1141.4469982300088
Parameters:
  • att1 – initial attitude (Quat, 3 element RA,Dec,Roll, or 4 element quaternion)
  • att2 – final attitude (Quat, 3 element RA,Dec,Roll, or 4 element quaternion)
Return type:

float seconds

Chandra.Maneuver.get_eigenaxis(A)

Calculate the rotation eigenaxis from first three components of quaternion A

Parameters:A – quaternion as a 4 element numpy
Return type:3 element numpy
Chandra.Maneuver.get_quaternions(atts)

Get a list of quaternions from the specified atts attitudes.

Parameters:atts – recarray of the attitudes, times and pitches
Returns:list of corresponding Quat objects
Chandra.Maneuver.inject_errors(atts, att_err, bias_err)

Inject errors into atts corresponding to an initial attitude error att_err and bias error bias_err.

Parameters:
  • atts – recarray of the attitudes, times and pitches
  • att_err – initial attitude error (roll, pitch, yaw in arcsec)
  • bias_err – bias error (roll, pitch, yaw in arcsec/sec)
Returns:

recarray array of the attitudes, times and pitches

Chandra.Maneuver.make_phi_dphi(delta, J, eps, tau, s)

Given a time array, the maneuver parameters, and a unit vector, calculate the manever phi and dphi in the different segments of the maneuver

Parameters:
  • delta
  • J
  • eps
  • tau
  • s – time array
Return type:

tuple (phi, dphi, d2phi)

Chandra.Maneuver.profile(q_init, q_final)

Calculate the parameters/profile of a maneuver, given initial and final attitude quaternions

Parameters:
  • q_init – initial quaternion (Quat)
  • q_final – final quaternion (Quat)
Return type:

tuple (duration, J, eps, tau, manvr_quat )

duration is the length of the maneuver in seconds

manvr_quat is q_final / q_init which defines the maneuver quaternion

Previous topic

Chandra.ECF

Next topic

Chandra.Time