A billowed quadrant sail demonstrating SailMesh. Uses CP1 properties.

This example has the sail front along +x.

Since version 7.
------------------------------------------------------------------------
See also: SailMesh, HQuadrantBillow, BuildCADModel, CreateBody,
CreateComponent, DrawSCPlanPlugIn, Inertias, Eul2Mat, FindDirectory,
SaveStructure, AddAxes, CP1Props
------------------------------------------------------------------------

Contents

%-------------------------------------------------------------------------------
%  Copyright (c) 2006,2009 Princeton Satellite Systems, Inc. All rights reserved.
%-------------------------------------------------------------------------------

Script control

%---------------
createFiles = 1;

Properties

%-----------
sailWidth     = 100;
arealMass     = 0.004;
sailMass      = arealMass*sailWidth^2;
massBus       = 250;

Create the sail mass structure

%-------------------------------
inertiaSail   = Inertias( sailMass, [sailWidth sailWidth], 'plate', 1 );
bXToZ         = [0 0 -1;0 1 0;1 0 0];
massSail      = struct('inertia', bXToZ*inertiaSail*bXToZ', 'mass', sailMass, 'cM', [0;0;0] );

Initialize

%-----------
BuildCADModel( 'initialize' );

Add general properties

%-----------------------
BuildCADModel( 'set name' ,  'Quad Billowed Sail' );
BuildCADModel( 'set units',  'mks'  );

%------------------------------------------------------------------

Create CAD bodies first

%------------------------------------------------------------------

Core

%-----
m = CreateBody( 'make', 'name', 'Core' );
BuildCADModel('add body', m );

This creates the connections between the bodies

%------------------------------------------------
BuildCADModel( 'compute paths' );

%------------------------------------------------------------------

Create CAD Components second

%------------------------------------------------------------------

[optical, infrared, thermal] = CP1Props;

Sail

%-----
x = sailWidth/2*[1 -1 -1 1];
y = sailWidth/2*[1 1 -1 -1];
B = sin(pi/4)*[1 1; -1 1];
p = B*[x;y];
lQuadrant = sailWidth/sqrt(2);
billow = struct('L',lQuadrant,'b',0.1);
[v,f] = SailMesh( p(1,:), p(2,:), 'HQuadrantBillow', billow, 4 );
% rotate mesh in x/y plane to standard sail body frame with x axis out
% front
bSail = Eul2Mat([0,-pi/2,0]);
m = CreateComponent( 'make', 'sail','name','Sail','body',1,...
                     'mass', massSail, 'faceColor', 'mirror',...
                     'rA',[0;0;0],'b',bSail,...
                     'sigmaA', optical.sigmaA,...
                     'sigmaD', optical.sigmaD,...
                     'sigmaS', optical.sigmaS,...
                     'sigmaT', optical.sigmaT,...
                     'emissivity', thermal.emissivity,...
                     'sigmaRS',infrared.sigmaRS,'sigmaRD',infrared.sigmaRD,'sigmaRA',infrared.sigmaRA,...
                     'vertex',v ,'face', f, 'inside', 0 );
BuildCADModel( 'add component', m );

Spacecraft

%-----------
m = CreateComponent( 'make', 'box','name','Bus','body',1,...
                     'mass', massBus, 'faceColor', 'gold foil','rA',[1;0;0],...
                     'x', 2,'y', 2, 'z',2,  'inside', 1 );
BuildCADModel( 'add component', m );


%------------------------------------------------------------------

Export

%------------------------------------------------------------------
g = BuildCADModel( 'get cad model' );
if( createFiles )
  cd(FindDirectory('SailData'));
  SaveStructure( g, sprintf('QuadSail_%d',sailWidth) );
end

3D View

%--------
DrawSCPlanPlugIn( 'initialize', g );
set(gca,'xcolor',[0 0 1])
set(gca,'ycolor',[0 1 0])
set(gca,'zcolor',[1 0 0])
AddAxes(1.1*lQuadrant,[],[],gcf)

%--------------------------------------
% PSS internal file version information
%--------------------------------------
ans = 
  Figure (2: 3D Vehicle Plan) with properties:

      Number: 2
        Name: '3D Vehicle Plan'
       Color: [1 1 1]
    Position: [500 470 460 460]
       Units: 'pixels'

  Use GET to show all properties