Demonstrate sail attitude plots that do not require a CAD model.

Since version 7.
------------------------------------------------------------------------
See also VisualizeSailAttitude, DrawSailAngles, DrawSailFrames, Cone,
Constant, Unit, El2RV, QSail, SteeringAnglesToQ
------------------------------------------------------------------------

Contents

%-------------------------------------------------------------------------------
%  Copyright (c) 2009 Princeton Satellite Systems, Inc.
%-------------------------------------------------------------------------------

Heliocentric orbit

Set an orbit with nontrivial inclination and eccentricity. Elements are [$a$ $i$ $\Omega$ $\omega$ $e$ $M$]

el = [Constant('au') 0.2 0 0 0.1 0.3];

Get the Cartesian position and velocity

[r,v] = El2RV(el);

The sun vector is just -rHat

s = -Unit(r);

Select a reference frame for measuring the angles

qRef = QSail( s, r, v, -1 );

Select random cone and clock angles

Specify a cone angle in the neighborhood of 30 degrees and a clock angle anywhere from 0 to 360 degrees. Use the cone and clock as steering angles for the sail normal.

cone = pi/6 + randn*0.2;
clock = rand*2*pi;
q = SteeringAnglesToQ( cone, clock, qRef );

Plot the sail attitude in 3D

VisualizeSailAttitude( q, s, qRef );

DrawSailAngles( s, qRef, cone, clock );

DrawSailFrames( qRef, cone, clock )
%--------------------------------------
% PSS internal file version information
%--------------------------------------