Demonstrate sail reference frames in different orbits.
Since version 7.
------------------------------------------------------------------------
See also Constant, AddAxes, Plot3D, PlotPlanet, Mag, Unit, Date2JD,
Period, RVFromKepler, SunV1, QSail
------------------------------------------------------------------------
Contents
Heliocentric Demo.
sma = Constant('au');
mu = Constant('mu sun');
p = Period( sma, mu );
t = linspace(0,p,11);
[r,v] = RVFromKepler([sma 0.3 0 0 0.3 0],t,mu);
uSun = -Unit(r);
q = QSail( -uSun, r, v );
[hF,hA] = Plot3D(r,[],[],[],'Sail-Centered Anti-Sun Pointing Frame, Helio');
set(hA,'linewidth',1)
lengthA = 0.15*max(Mag(r));
for k = 1:size(r,2)
AddAxes( lengthA, r(:,k), q(:,k), hF );
end
hold on
hM = plot3(0,0,0,'yo','markersize',12);
set(hM,'markerfacecolor','y');
q = QSail( uSun, [], v );
[hF,hA] = Plot3D(r,[],[],[],'Sail-Centered Sun/Velocity Frame, Helio');
set(hA,'linewidth',1)
lengthA = 0.15*max(Mag(r));
for k = 1:size(r,2)
AddAxes( lengthA, r(:,k), q(:,k), hF );
end
hold on
hM = plot3(0,0,0,'yo','markersize',12);
set(hM,'markerfacecolor','y');
Geocentric Demo.
sma = 40000;
mu = Constant('mu earth');
p = Period( sma, mu );
t = linspace(0,p,11);
[r,v] = RVFromKepler([sma 0.5 0 0 0.3 0],t,mu);
uSun = SunV1(Date2JD);
q = QSail( uSun, r, v );
[hF,hA] = Plot3D(r,[],[],[],'Sail-Centered Sun Pointing Frame, Geo');
PlotPlanet([0;0;0],6378);
lt = light('position',uSun);
set(hA,'linewidth',1)
lengthA = 0.15*max(Mag(r));
for k = 1:size(r,2)
AddAxes( lengthA, r(:,k), q(:,k), hF );
end
hold on
R = max(Mag(r));
hM = plot3([0 R*uSun(1)],[0 R*uSun(2)],[0 R*uSun(3)],'y','linewidth',3);
q = QSail( -uSun, [], v );
[hF,hA] = Plot3D(r,[],[],[],'Sail-Centered Anti-Sun/Velocity Frame, Geo');
PlotPlanet([0;0;0],6378);
lt = light('position',uSun);
set(hA,'linewidth',1)
lengthA = 0.15*max(Mag(r));
for k = 1:size(r,2)
AddAxes( lengthA, r(:,k), q(:,k), hF );
end
hold on
R = max(Mag(r));
hM = plot3([0 R*uSun(1)],[0 R*uSun(2)],[0 R*uSun(3)],'y','linewidth',3);
Lagrangian - TBD