Contents
Build a 6U Sail.
Design the mission
c = Constant('speed of light');
mu = Constant('mu earth');
muSun = Constant('mu sun');
aU = Constant('au');
lSail = 5;
date = [2015 5 7 0 0 0];
jD = Date2JD(date);
mTotal = 20;
dVTotal = 8;
massICONS = 0.5;
wICONS = 0.1;
effConv = 0.8;
powerComm = 7.3;
fComm = 200e6;
aAsteroid = 1.3;
hParking = 850;
u = 0.1;
zBox = 1.4*u;
xBox = 3*u;
yBox = 2*u;
panelThickness = 0.004;
lCore = zBox;
busDim = sprintf('%4.1f $\\times$ %4.1f $\\times$ %4.1f',xBox*100,yBox*100,zBox*100);
powerRWA = 2;
massOmni = 0.2;
powerOmni = 2;
xOmni = [xBox -yBox; yBox yBox; zBox zBox];
rOmni = 0.002;
lOmni = 0.5*c/fComm;
dimProc = [.293 .07 .005];
massBoard = .1261;
powerBoard = 2;
dimCPU = [.09, .096, .036];
massCPU = .35;
powerCPU = 5.75;
nRWA = 3;
wRWA = 0.04;
massRWA = 0.1;
xRWA = [ xBox/2-wRWA -xBox/2+wRWA -xBox/2+wRWA;...
-2*wRWA+panelThickness 0 2*wRWA-panelThickness;...
wRWA/2 wRWA/2 wRWA/2];
inToM = 0.0254;
strutLength = yBox/2;
nPanels = 1;
panelLength = 0.4/nPanels;
panelWidth = 0.4;
solarPanelEff = 0.295;
zSolarWing = zBox/2;
rhoPanel = 0.23;
yPanel = strutLength + yBox/2;
a = linspace(1,aAsteroid);
solarConstant = 1367*(1./a).^2;
power = 2*effConv*nPanels*panelLength*panelWidth*solarPanelEff*solarConstant;
Plot2D(a,power,'AU','Power (W)','Power');
y = get(gca,'ylim');
set(gca,'ylim',[0 y(2)]);
dOD = 0.8;
sma = 6378.165 + hParking;
inc = 28.4667*pi/180;
rhoM = 133;
rhoV = 263;
[massBattery, volumeBattery, capacityBattery] = BatterySize( sma, inc, power(1), jD, dOD, rhoM, rhoV );
arrayMass = nPanels*panelLength*panelWidth*rhoPanel;
bX = [ 1 0 0;0 0 -1;0 1 0]';
bY = [-1 0 0;0 1 0;0 0 -1];
aEarth = aU;
r = 6378.165 + hParking;
Print
clear s
k = 1;
s{k,1} = '\textbf{Mission Plan}'; k = k + 1;
s{k,1} = 'Parking Altitude'; s{k,2} = hParking; s{k,3} = 'km'; k = k + 1;
s{k,1} = 'Maximum Heliocentric Orbit'; s{k,2} = aAsteroid; s{k,3} = 'AU'; k = k + 1;
s{k,1} = '\textbf{Power Subsystem}'; k = k + 1;
s{k,1} = 'Maximum Power'; s{k,2} = power(1); s{k,3} = 'W'; k = k + 1;
s{k,1} = 'Minimum Power'; s{k,2} = power(end); s{k,3} = 'W'; k = k + 1;
s{k,1} = 'Solar cells'; s{k,2} = 'Emcore ZTJ'; k = k + 1;
s{k,1} = 'Solar cell efficiency'; s{k,2} = solarPanelEff; k = k + 1;
s{k,1} = 'Battery mass'; s{k,2} = massBattery; s{k,3} = 'kg'; k = k + 1;
s{k,1} = 'Battery volume'; s{k,2} = volumeBattery; s{k,3} = 'L'; k = k + 1;
s{k,1} = 'Battery capacity'; s{k,2} = capacityBattery; s{k,3} = 'W-h'; k = k + 1;
s{k,1} = '\textbf{Mass}'; k = k + 1;
s{k,1} = 'Bus dimensions'; s{k,2} = busDim; s{k,3} = 'cm'; k = k + 1;
s{k,1} = 'Mass Total'; s{k,2} = mTotal; s{k,3} = 'kg'; k = k + 1;
s{k,1} = '\textbf{Communications Subsystem}'; k = k + 1;
s{k,1} = 'Communications'; s{k,2} = 'S Band'; k = k + 1;
s{k,1} = 'Comm Power'; s{k,2} = powerComm; s{k,3} = 'W'; k = k + 1;
CreateLatexTable(s,'Parameters')
Initialize
BuildCADModel( 'initialize' );
BuildCADModel( 'set name' , '6U Sail' );
BuildCADModel( 'set units', 'mks' );
Core
m = [];
m.name = 'Core';
m.rHinge = [0;0;0];
m.bHinge.b = eye(3);
m.previousBody = [];
BuildCADModel('add body', m );
m.name = 'SolarWing1';
m.rHinge = [0;0;0];
m.bHinge.b = eye(3);
m.previousBody = 1;
BuildCADModel('add body', m );
m.name = 'SolarWing2';
m.rHinge = [0;0;0];
m.bHinge.b = eye(3);
m.previousBody = 1;
BuildCADModel('add body', m );
This creates the connections between the bodies
BuildCADModel( 'compute paths' );
Solar Array 1
m = CreateComponent( 'make', 'solar array front', 'z', panelLength, 'x', panelWidth,...
'nZ', nPanels, 'nX', nPanels, 'dirZ', 1, 'inside', 0, ...
'theta', [0 0], 'electricalConversionEfficiency', solarPanelEff, 'b', bY*bX,...
'rA', [0;yPanel;zSolarWing], 'mass', arrayMass/2, 'cM', [0;0;0],...
'name', 'Solar Array Plus Y Front', 'body', 2, 'faceColor', 'solar cell' );
BuildCADModel( 'add component', m );
m = CreateComponent( 'make', 'solar array back', 'z', panelLength, 'x', panelWidth,...
'nZ', nPanels, 'nX', nPanels, 'dirZ', 1,...
'theta', [0 0], 'b', bY*bX, 'inside', 0, ...
'rA', [0;yPanel;zSolarWing], 'mass', arrayMass/2, 'cM', [0;0;0],...
'name', 'Solar Array Plus Y Back', 'body', 2, 'faceColor', 'black' );
BuildCADModel( 'add component', m );
Solar Array 2
m = CreateComponent( 'make', 'solar array front', 'z', panelLength, 'x', panelWidth,...
'nZ', nPanels, 'nX', nPanels, 'dirZ', 1,'inside', 0, ...
'theta', [0 0], 'electricalConversionEfficiency', solarPanelEff, 'b', bX',...
'rA', [0;-yPanel;zSolarWing], 'mass', arrayMass/2, 'cM', [0;0;0],...
'name', 'Solar Array Minus Y Front', 'body', 3, 'faceColor', 'solar cell' );
BuildCADModel( 'add component', m );
m = CreateComponent( 'make', 'solar array back', 'z', panelLength, 'x', panelWidth,...
'nZ', nPanels, 'nX', nPanels, 'dirZ', 1,...
'theta', [0 0], 'b', bX','inside', 0, ...
'rA', [0;-yPanel;zSolarWing], 'mass', arrayMass/2, 'cM', [0;0;0],...
'name', 'Solar Array Minus Y Back', 'body', 3, 'faceColor', 'black' );
BuildCADModel( 'add component', m );
Solar array drives
driveThickness = .01;
rD = [0 0;-yBox+driveThickness*2 yBox;zBox zBox]/2;
for k = 1:size(rD,2)
n = sprintf('Solar Array Drive %d',k);
m = CreateComponent( 'make', 'cylinder', 'rUpper', 0.04, 'rLower', 0.04, 'h', 0.01,'n',20,...
'inside', 0, 'b', [1 0 0;0 0 -1;0 1 0], 'rA', rD(:,k), 'mass', 0.1,...
'name', n, 'body', 1, 'faceColor', 'aluminum' );
BuildCADModel( 'add component', m );
end
Frame
[v, f] = PanelFrame( xBox, yBox, panelThickness, panelThickness );
m = CreateComponent( 'make', 'generic', 'vertex', v, 'face', f,...
'faceColor', 'aluminum','rA', [0;0;zBox-2*panelThickness],...
'mass', .1, 'name', 'Top Frame', 'body', 1, 'inside', 0 );
BuildCADModel( 'add component', m );
v = ([1 0 0; 0 1 0; 0 0 -1]*v')';
m = CreateComponent( 'make', 'generic', 'vertex', v, 'face', f,...
'faceColor', 'aluminum','rA', [0;0;2*panelThickness],...
'mass', .1, 'name', 'Bottom Frame', 'body', 1, 'inside', 0 );
BuildCADModel( 'add component', m );
z1 = 2*panelThickness;
z2 = z1 + zBox-2*panelThickness;
c = [];
c.x = [ -0.250 0 0 0.250 0.250 0 0 -0.250]*inToM;
c.y = [ 0.375 0.375 0.125 0.125 -0.375 -0.375 -0.125 -0.125]*inToM;
[v, f] = ShapedStrut( [0;0;z1], [0;0;z2], c );
angle = 0;
sX = [1 1 -1 -1];
sY = [1 -1 -1 1];
for k = 1:4
angle = angle + pi/2;
xF = sX(k)*(xBox/2 - panelThickness/2);
yF = sY(k)*(yBox/2 - panelThickness/2);
b = [cos(angle) sin(angle) 0;-sin(angle) cos(angle) 0;0 0 1];
vR = (b*v')';
m = CreateComponent( 'make', 'generic', 'vertex', vR, 'face', f,...
'faceColor', 'aluminum','rA', [xF;yF;0], ...
'mass', .1, 'name', ['z strut' num2str(k)], 'body', 1,...
'inside',0 );
BuildCADModel( 'add component', m );
end
Panels
panelName = {'+X' '-X' '+Y' '-Y' '+Z' '-Z'};
color = {'gold foil' 'gold foil' 'radiator' 'radiator' 'aluminum' 'aluminum'};
xLoc = (xBox - panelThickness)/2;
yLoc = (yBox - panelThickness)/2;
zLoc = (zBox - panelThickness)/2;
wX = xBox - 2*panelThickness;
wY = yBox - 2*panelThickness;
wZ = zBox - 2*panelThickness;
th = panelThickness;
zH = zBox/2;
rAP = [ xLoc -xLoc 0 0 0 0 ;...
0 0 yLoc -yLoc 0 0;...
zH zH zH zH zBox 0];
dP = [ th th wX wX wX wX ;...
wY wY th th wY wY;...
wZ wZ wZ wZ th th];
for k = 1:6
m = CreateComponent( 'make', 'box', 'x', dP(1,k), 'y',dP(2,k), 'z',dP(3,k),...
'faceColor', color{k}, 'rA', rAP(:,k), 'mass', .1,...
'name', ['Panel ' panelName{k}], 'body', 1,...
'inside', 0 );
BuildCADModel( 'add component', m );
end
Batteries
wB = .065;
lB = .018;
hB = .065;
rB = [-xBox/2+wB/2;-yBox/2+lB*2/2+driveThickness;zBox-hB*2/2];
m = CreateComponent( 'make', 'box','x', wB, 'y', lB*2, 'z', hB*2,...
'faceColor', [0 1 0] ,'rA', rB,'mass',0.1,...
'name', 'Battery Pack','inside',1);
BuildCADModel( 'add component', m );
rB = [-xBox/2+wB/2;yBox/2-lB/2-driveThickness;zBox-hB*2/2];
m = CreateComponent( 'make', 'box','x', wB, 'y', lB, 'z', hB*2,...
'faceColor', [0 1 0] ,'rA', rB,'mass',0.1,...
'name', 'Battery Pack','inside',1);
BuildCADModel( 'add component', m );
Antenna
m = CreateComponent( 'make', 'ellipsoid', 'name', 'Antenna',...
'body', 1, 'abc', [0.25 0.25 0.1], 'thetaUpper',pi/4,'b',[0 0 1;0 1 0;-1 0 0],...
'n',10, 'rA',[-xBox/2-0.1;0;zBox/2], 'faceColor', [0.5 0.5 0], 'edgeColor',[1 1 1]);
BuildCADModel('add component', m );
Processors
xProc = 0.5*(xBox-dimProc(1));
yProc = -0.5*(yBox-dimProc(2));
m = CreateComponent( 'make', 'box', 'x', dimProc(1), 'y', dimProc(2), 'z', dimProc(3), 'rA',[xProc-panelThickness;-yProc-panelThickness;.5*dimProc(3)+panelThickness],...
'name', 'processors', 'body', 1, 'mass', massBoard,'power',powerBoard, ...
'faceColor', [1 0 0], 'inside', 1);
BuildCADModel( 'add component', m );
Single Board Computer
xCPU = .5*(xBox-dimCPU(1));
yCPU = 0.5*(yBox-dimCPU(2));
zCPU = .5*dimCPU(3)+dimProc(3);
m = CreateComponent( 'make', 'box', 'x', dimCPU(1), 'y', dimCPU(2), 'z', dimCPU(3), 'rA',[xCPU-panelThickness;yCPU-panelThickness;zCPU-panelThickness],...
'name', 'computer', 'body', 1, 'mass', massCPU,'power',powerCPU, ...
'faceColor', [0 1 1], 'inside', 1);
BuildCADModel( 'add component', m );
Reaction wheels
for k = 1:nRWA
m = CreateComponent( 'make', 'box', 'x', wRWA, 'y', wRWA, 'z', wRWA, 'rA',xRWA(:,k),...
'name', sprintf('RWA %d',k), 'body', 1, 'mass', massRWA,'power',powerRWA, ...
'faceColor', [1 1 0], 'inside', 1);
BuildCADModel( 'add component', m );
end
Omni antennas
for k = 1:2
m = CreateComponent( 'make', 'cylinder', 'rUpper', rOmni, 'rLower', rOmni, 'h', lOmni, 'n', 24, 'rA',xOmni(:,k),...
'name', sprintf('Omni %d',k), 'body', 1, 'mass', massOmni,'power',powerOmni, ...
'faceColor', [0 0 0], 'inside', 1);
BuildCADModel( 'add component', m );
end
ICONS sensor and deployment box
[v, f] = ICONS;
m = CreateComponent( 'make', 'generic', 'vertex', v, 'face', f, 'rA', [xBox-wICONS*2;yBox-wICONS*3/2;zBox],...
'name', 'ICONS', 'body', 1, 'mass', massICONS,'power',5*0.7+4, ...
'faceColor', [1 0.2 0.7], 'inside', 0);
BuildCADModel( 'add component', m );
m = CreateComponent( 'make', 'box', 'x', wICONS, 'y', wICONS, 'z',wICONS, 'rA', [xBox-wICONS*2-panelThickness;yBox-wICONS*3/2-panelThickness;zBox-wICONS/2],...
'name', 'ICONS Launch Box', 'body', 1, 'mass', 0.1,'power',0, ...
'faceColor', [0.2 0.2 0.7], 'inside', 1);
BuildCADModel( 'add component', m );
Sails
dZ = lSail/10;
v = [ 0 lSail/2 -lSail/2;...
0 lSail/2 lSail/2;...
dZ dZ dZ ]';
sailName = {'+Y' '-Y' '+X' '-X'};
f = [1 2 3];
x = lSail/30;
z = -lCore/3;
rSail = {[0 x z]' [0 -x z]' [x 0 z]' [-x 0 z]' };
bSail = { eye(3) Eul2Mat([0 0 pi]) Eul2Mat([0 0 pi/2]) Eul2Mat([0 0 -pi/2]) };
mass = 0.001*lSail^2/4;
for k = 1:4
m = CreateComponent( 'make', 'generic', 'name', ['Sail ' sailName{k}],...
'rA', rSail{k}, 'mass', mass ,'inside',0,...
'faceColor', [1 0.9 0.5], 'edgeColor', [1 0.8 0.34], 'b', bSail{k}, ...
'specularStrength', 1, 'diffuseStrength', 0.3,...
'vertex', v, 'face', f, ...
'body', 1 );
BuildCADModel( 'add component', m );
end
MultiSpectral Imager
xMSI = .12;
yMSI = .12;
zMSI = .125;
massMSI = .8;
powerMSI = 12;
m = CreateComponent( 'make', 'box', 'x', xMSI, 'y', yMSI, 'z', zMSI, 'rA', [.5*(xBox-xMSI)-panelThickness;.5*(-yBox+yMSI)+panelThickness;zBox-.5*zMSI-panelThickness],...
'name', 'MultiSpectral Imager', 'body', 1, 'mass', massMSI,'power',powerMSI, ...
'faceColor', [.2 0 0.7], 'inside', 1);
BuildCADModel( 'add component', m );
Add subsystems
BuildCADModel( 'add subsystem', 'acs', {'ICONS','rwa'} );
BuildCADModel( 'add subsystem', 'payload', {'MultiSpectral Imager'});
BuildCADModel( 'add subsystem', 'tt&c', {'computer', 'omni', 'signal','processors', 'antenna'} );
BuildCADModel( 'add subsystem', 'mechanism', {'drive'} );
BuildCADModel( 'add subsystem', 'power', {'solar array', 'battery'} );
BuildCADModel( 'add subsystem', 'structure', {'support', 'frame', 'strut', 'panel'} );
Update the mass properties to produce the tables
BuildCADModel( 'update body mass properties' );
g = BuildCADModel( 'get model');
BuildCADModel('show vehicle')
view(0,-90)
CreateReport( g, 'tex', FileFullpath('6USailMassReport'), 'mass', 1, 1, 1 )
CreateReport( g, 'tex', FileFullpath('6USailPowerReport'), 'power', 1, 1, 1 )
Export to obj
ExportOBJ(g,FileFullpath('6USail'));