QSail:
--------------------------------------------------------------------------
Quaternion from inertial to the local rotating sun-sail frame.
The X axis is along the sun line s; this may be towards or away from the
sun depending on user preference. The remaining axes are defined by the
cross product of X with either the orbit normal or the velocity vector.
Clock angles are always measured from the resulting Y axis.
For sun-pointing/orbit normal coordinates:
x is along s
y is perpendicular to the orbit normal, (h x uSun)
z completes the set and is as close to the orbit normal as possible
For sun-pointing/velocity coordinates:
x is along s
z is perpendicular to the velocity, (s x v)
y completes the set and is in the same hemisphere as velocity
For the second option pass in [] for r. For a heliocentric orbit, both
frames have the orbit normal along z.
Since version 7.
--------------------------------------------------------------------------
Form:
q = QSail( s, r, v ) Sun-pointing frame
q = QSail( s, r, v, -1 ) Flux-aligned frame
q = QSail( s, [], v )
q = QSail( s, [], v, -1 )
--------------------------------------------------------------------------
------
Inputs
------
uSun (3,n) or (3,1) Unit vectors to sun
r (3,n) Position vectors
v (3,n) Velocity vectors
c (1,1) Sign convention for s to X axis, optional
-------
Outputs
-------
q (4,n) Quaternions
--------------------------------------------------------------------------
Children:
Common: Database/Constant
Common: Graphics/AddAxes
Common: Graphics/Plot2D
Common: Graphics/Plot3D
Common: Quaternion/Mat2Q
Math: Linear/Cross
Math: Linear/Mag
Math: Linear/Unit
SC: BasicOrbit/Period
SC: BasicOrbit/RVFromKepler