Sail Functions

Sail Module

Directory List

Actuator

 CMToMassPositions Determine mass positions from a desired center of mass. GimbalRates Compute commanded gimbal rates based on commanded angles and a fixed rate. SearchVaneAngles Solve a three-axis control vane problem using fminsearch. SolveVaneAngles Solve a two-axis control vane problem using Newton's method. TorqueToCM Sail actuation function computing needed CM to produce a given torque. VaneAngles Compute angle commands for roll control using sail vanes.

Analysis

 LunarDisplacement Compute the sail acceleration needed for a displaced lunar Lagrange halo. LunarHalo Initial conditions for a Sail halo in the Earth-Moon system. NKPlanetPeriod Compute non-Kepler orbit periods from parameters in planetary radii. NonKeplerianPlanet Sail parameters for non-Keplerian orbits near a planet. NonKeplerianSun Sail lightness and pitch for a sun-centered displaced non-Keplerian orbit. OptimalPeriodNonKepler Optimal orbit rate for minimizing required sail lightness parameter.

AttitudeDynamics

 FCoreAndMoving Example system RHS which incorporates FMovingBody. FMovingBody Moving body dynamics model with instantaneous velocities. FSailRB Rigid body right-hand-side for Sail module. FSailTB Rewrite of FTB in preferred sail module format FTimeVaryingI Attitude RHS with time varying inertia of a single body. HGimballedBoom Calculate angular momentum of boom system and update the body rates. MassVehicle Compute the mass data structure. TwoBodyRateModel Gimballed boom dynamics model for fixed gimbal rates.

Control

 FPlanetControl Sail planet-centered RHS with rho/z control via sail pitch angle. FixedPitchControl Correct sail pitch using elevation, dElevation = -dPitch.

Coordinates

 AnglesMcInnesToU Angles to unit vector using McInnes' convention. u will be AWAY from the sun. AnglesRotToU Angles and a reference frame to unit vector. AttitudeProfileToTorque Compute an equivalent torque sequence from an attitude profile. BConeClock Compute a rotation matrix for cone and clock from the reference frame CartToI Computes inclination from cartesian elements ClockConversion Apply a clock angle convention between McInnes, PSS, and JPL. ConeClockConvention Apply a selected cone/clock sign convention for angle ranges. ConeClockToQConstrained Compute a quaternion from cone and clock angles. ConeClockToU Compute a unit vector from cone and clock angles. ElToMEq Transforms modified Keplerian elements to equinoctial elements. MEQToECI Transform to ECI frame from tangential coordinates. MEQToI Compute inclination from modified equinoctial coordinates. MEqToEl Transforms modified equinoctial elements to Keplerian elements. MEqToRV Transforms modified equinoctial elements to r and v. PlanetRot Transform from ECI to planet-fixed axes. QSail Quaternion from inertial to the local rotating sun-sail frame. QSteeringYAligned Compute the steering rotation keeping the body axis aligned with Y. QToConeClock Computes cone and clock angles from an inertial to body quaternion. QXToAlphaDelta Cone and clock angles (alpha,delta) to inertial quaternion. RVToMEq Transforms elements r and v to modified equinoctial. SteeringAnglesToQ Convert sail steering angles to a quaternion. UToConeClock Computes cone and clock angles from a unit vector.

DemoFuns

 FCartOrbD Right hand side for cartesian orbital equations. Accepts a data structure FHingeOrbit Combined point-mass orbit and fixed-rate moving body dynamics model. FS4Deployment S4 Sail simplified deployment dynamics from reference. Quadratic The function f = x'*x RHSHelio2DOrbit Planar heliocentric orbit problem with specular solar disturbance force. SARosenbrock The function f = 100*(x(1)^2-x(2))^2 + (1-x(1))^2 SATestFun Minimize the function f = 3x^3 + 5x^2 -2x + 3 SailClosedLoopNLEqns Nonlinear sail RHS with area control. ZermeloAnalyticalCost Computes the analytical cost for Zermelo's problem. ZermeloAnalyticalLambda Computes the analytical lambda for Zermelo's problem. ZermeloCost Cost function of Zermelo's differential equations.

Demos/Actuator

 MovingMassDemo Demonstrate computing moving mass positions SailVanesDemo Demonstrate computing angles for a sail with a pair of vanes. TwoBodyBoom Demonstrate boom dynamics and control using TBModel/FTB functions. VaneAnglesDemo Demonstrate VaneAngles for a CAD model VaneSearchDemo Demonstrate computing angles for a sail with four vanes.

Demos/Control

 BallastMass2Axis Attitude control of a sail using ballast masses in-plane. BoomControl Demonstrate gimballed boom control. BoomGimbalActuation Demonstrate gimballed boom actuation with set gimbal commands. BoomQCRDemo Demonstrate boom dynamics and control using TBModel/FTB functions. VaneControl1Axis Attitude control of a sail using control vanes.

Demos/Coordinates

 McInnesAngles Demonstrate McInnes' guidance and coordinate functions. QSailDemo Demonstrate sail reference frames in different orbits.

Demos/Disturbances

 CompareSailBillow Compare the solar pressure force for flat and billowed circular sails. CompareSailOptical Compare the solar pressure force for ideal and nonideal circular sails. EarthOrbitDisturbances Demonstrate the solar sail disturbance model in Earth orbit. HelioDisturbances Demonstrate the solar sail disturbance model in heliocentric orbit. SailForceImperfectMaterial Compare the solar pressure force for uniform and irregular materials. SailForceWithIncidenceAngle Compute sail force over incidence angle. SolarForceDemo Demonstrate the solar pressure force function using a striped sail quadrant.

Demos/Dynamics

 AsteroidOrbitDemo Example orbit propagation problem from an AIAA student challenge. AttitudeDemo Sail attitude evolution under disturbances. No orbit dynamics. BoomMomentumDemo Verify momentum conservation and rate adjustment for gimbal commands. LunarHaloSim Simulate a sail halo about a Lunar Lagrange point. The orbit is unstable. MovingBodyDemo Demonstrate the moving body attitude RHS. NKPlanetSim Simulate a non-Keplerian orbit in a cylindrical planet-centered frame. NonKeplerSunSim Simulate a non-Keplerian sail orbit in a cylindrical sun-centered frame. SailCombinedDemo Demonstrate combined simulation for a sail orbiting the Earth. SampleOrbitContours Sail orbit contours.

Demos/Graphics

 PatchesDemo Draw representative patches for a sail rotated by cone/clock angles SailAttitudePlots Demonstrate sail attitude plots that do not require a CAD model. SailForcePlots Demonstrate sail force plotting functions. SailSimulationPlots Demonstrate sail simulation plots ViewSailForceDemo Demonstrate DrawSailMeshVectors for different sail models.

Demos/Guidance

 EarthOrbitLVLH Earth-orbit sail analysis with sail aligned to LVLH. GeoOptimalDemo Simulate a geocentric locally optimal trajectory using the control laws HeliopauseSimulation Planar heliopause mission simulation. HeliopauseWithLaserSimulation Planar heliopause mission simulation. L1Diamond L1 Diamond formation LocalOptimalSim Simulate a heliocentric locally optimal trajectory. OptimalSMADemo Computes optimal semi-major axis and eccentricity control. SailSMAChangeDemo Sail SMA change demo

Demos/Integrated

 SMAGuidanceWithBoom Combined guidance and control demo with fixed rate two-body dynamics.

Demos/Missions

 EarthMagnetotail Fly near an invariant parabolic manifold and control to the displaced orbit. GEOGraveyard Simulate raising to graveyard orbit from GEO. GeoInclinationKite Simulate inclination change in GEO orbit. LEOCombinedDemo Demonstrate combined simulation for a sail in a LEO 28.5 degree orbit. LunarHaloDemo Simulate a solar sail in orbit near the earth and moon. SPICombinedDemo Demonstrate combined simulation for the Solar Polar Imager mission. SPITrajectoryDemo Solar Polar Imager demo with JPL optimal trajectory data. ST9CombinedDemo Demonstrate combined simulation for a sail in ST9 orbit. ST9Orbit Simulate semi-major axis change in a dawn-dusk sun-synchronous orbit. SunCombinedDemo Demonstrate combined simulation for a sail in interplanetary orbit.

Demos/Optimization

 LocallyOptimalTrajectories Demonstrate locally optimal trajectories. Uses equinoctial elements. NLEqSADemo Test a nonlinear equation solver for computing cone and clock. OptimizationTestGrid Do 10 tests on GAOT, simulated annealing and downhill simplex. PlotDeJong Plot the 5 De Jong functions. PropagationDemo Orbit propagation test. Sail2DOptimization Demonstrate the Trajectory optimization function for sails in 2D orbits. Sail3DOptimization Demonstrate 3D optimization. TrajectoryOptimizationDemo Demonstrate the trajectory optimization function for low thrust. ZermeloCostDemo Compute the Zermelo cost function as a function of costate. ZermeloOptimization Demonstrate the Trajectory optimization using the Zermelo problem

Demos/SailDesigns

 BillowedSquareSail A billowed, square, nonideal sail in the Y/Z plane. Build6USail Build a 6U Sail. CircularSail Design a circular nonideal sail with billow using SailMesh. ConeSail Cone sail model Cosmos1 CAD model of the Cosmos-1 solar sail. ECHOModel A specular spherical sail, i.e. ECHO-2 FlatCP1Sail A flat, square, nonideal sail in the Y/Z plane, using CP1 properties FlatPlate A flat, square, specular sail in the Y/Z plane. PlateWithBoom Design a gimbaled boom specular sail model with two bodies. PlateWithBoomAndVanes Design a specular sail model with a control boom and vanes. PlateWithMasses Design a specular (plate) sail model with two transverse control masses. PlateWithVanes Design a specular (plate) sail model with two control vanes. QuadBillowedSail A billowed quadrant sail demonstrating SailMesh. Uses CP1 properties. S4Deploy 40 m Scalable Sail, for deployment analysis. SailWithBoom Design a gimbaled boom sail model with two bodies. SailWithFourVanes Design a nonideal sail model with four control vanes. SquareGEOSail A flat, specular sail for GEO simulations. StripedSail Design a square sail with four striped quadrants. Uses CP1.

Demos/SailEphem

 PlanetDemo Demonstrate JPL ephemeris for the solar system.

Demos/SailModeling

 S4Deployment S4 (ATK's scalable sail) deployment demo. SailMassAndArea Sail dimensions as a function of payload mass

Disturbances

 DisturbanceStruct Return a default data structure for SailDisturbance. EnvironmentStruct Return a default data structure for SailEnvironment. HingeRotationMatrix Transformation matrix for an arbitrary number of single axis rotations. OpticalMcInnesToPSS Convert McInnes optical coefficients to PSS format. ProfileStruct Return a default profile structure for SailDisturbance. SailDisturbance Compute the forces and torques on a solar sail vehicle. SailEnvironment Space environment models. Designed to work with SailDisturbance. SolarPressureForce Combined thermal and optical solar pressure force model.

Graphics

 ConeClockPatches Plot a patch of a sail oriented to the given cone and clock angles. DrawCircularPlane Represent the Y/Z plane with a circle with arrows for +X/+Y only. DrawSailAngles Draw cone and clock angles in 3D using translucent patches in a new figure. DrawSailAttitude View a rotated CAD model and the sun vector. DrawSailCADModel Draw the sail using DrawSCPlanPlugIn and then adjust colors and lighting. DrawSailFrames Draw cone and clock angles using one color per frame. DrawSailMeshVectors Draw a sail mesh with force vectors at each face. Plot2DTrajectory Propagate and plot the planar trajectory. Plot3DOrbit Plot a trajectory in 3D with initial and final orbits marked. Plot3DTrajectory Propagate and plot a 3D trajectory using outputs from optimization. PlotSailClock2D Plot clock angle and relevant vectors in the 2D clock plane. PlotSailForce Plot the solar sail disturbance forces from the force structure. PlotSailForce2D Plot relationship between force, normal, and sun vectors in 2D PlotSailProfile Default plots for the information stored in the sail orbit profile. PlotZermelo Propagate and plot the Zermelo trajectory. PlottingParabolas Compute parabolic bounding surfaces for manifolds. SailDefaultColors Define default colors for all sail plots. SailForceSubplots View a single force vector in two planes using four subplots. SailOrbitContours Create and draw sail orbit contours. SailPatchVertices Sail vertices for a default sail in the Y/Z plane VisualizeSailAttitude Visualize the attitude of a sail in 3D using a patch and sun vector.

Guidance

 EarthGuidance Guidance law for planet-centered missions. HeliopauseSailAngle Generates a constant angle to get a velocity reversal trajectory. LambdaToConeClock3D Generates the optimal cone and clock angles for 3D problems. LocallyOptimalConeClock3D Generates locally optimal cone and clock angles for 3D problems. LocallyOptimalTraj Computes locally optimal solar sail control angles. PlanetOptimalTraj Computes locally optimal solar sail control angles for planet-centric. SPIGuidance Guidance law for Solar Polar Imager using locally optimal control. SailSMAChange Form: SubL1Accel Find a sail acceleration to maintain a Sub-L1 station. SunGuidance Guidance laws for common sun-centered profiles. TwoDOptimalSailAngle Generates the optimal sail angle for planar problems.

Missions

 AsteroidTrajectory Example problem from AIAA challenge. GeoOptimalMission Simulate a geocentric locally optimal trajectory. GeoSwitchingMission Simulate a geocentric trajectory with on/off switching.

OptTestFuns

 NewtonDemoFun Returns the values of the equations OptTestFun 10 test functions for optimization routines. The available functions are: OptTestFunEcon There are two optima: OptTestFunParabola A simple parabola, the function f = x^2 OptTestFunRosenbrock Rosenbrock test function. RHSZermelo Zermelo's differential equation right hand side.

Optimization

 BoundedMutation GA mutation function where change is bounded within a fraction of the range. ControlAngles3D Computes the control angles for a 3D problem given the costates of the Cost3D Function to be used for optimization. It computes an err magnitude CostLowThrust2D Cost function for 2D low thrust trajectory optimization. CostLowThrust3D Cost function for 3D low thrust trajectory optimization. CostSail2D Cost function for 2D solar sail trajectory optimization. CostSail3D Cost function for 3D solar sail trajectory optimization. FLambdaToConeClock Generates the optimal cone and clock angles for 3D problems. FLowThrust2D This function is for the planar orbit problem which includes FLowThrust3D This function is 3D orbit problem in equinoctial coordinates. FSolarSailAngles RHS for a Newton solver for sail angles. FractionalSelection GA selection function where a fixed fraction of the population survives. GAMin Applies a genetic algorithm to minimizing a function. GeneticAlgorithm Applies a genetic algorithm to minimizing fun. NewtonSolver Solves for the zeros of a set of n equations. SimulatedAnnealing Implements simulated annealing. SingleCrossover GA crossover function which switches a randomly selected parameter between TrajectoryOptimization Performs trajectory optimization.

OrbitDynamics

 FOrbitGeneral General gravity model allowing point mass and harmonic models. FOrbitSingle Gravity model allowing a point mass or harmonic models for a single body. FRotatingFrame Three-body dynamics in the rotating frame with a solar sail. FRotatingLagrange Sail orbit RHS in a 3 body dimensionless rotating frame. FRotatingPlanet Sail orbit RHS in a planet-centered cylindrical rotating frame. FRotatingSun Sail orbit equations in a sun-centered cylindrical rotating frame. FSailCombined Simulation right hand side. Calls all needed portions in order. FSailEarthMoon Sail dynamics with Earth and Moon gravity. FSailEarthSun Sail dynamics in the Earth-Sun three-body system. FSailGuidance Right-hand-side for sail with fixed cone and clock angles (McInnes). InitializeSailGravity Initialize the sail simulation gravity model. InitializeSailSim Initialize the sail simulation data for common cases. RHS2DOrbit This function is for the planar orbit problem. RHS3DOrbit This function is the right-hand-side for the 3D orbit optimization problem. RHSCartesian Right-hand-side for point-mass cartesian orbit with external acceleration. RHSCartesianRadialAccel Right-hand-side for point-mass cartesian orbit with radial acceleration. RHSEquinoctial Right-hand-side for equinoctial elements. RHSOpt2DOrbit Right-hand-side for the planar orbit optimization problem. RHSOpt3DOrbit This function is the right-hand-side for the 3D orbit optimization problem. VarEqSailPlanet Sail variational equations in state space form for a planet-centered orbit.

SailEphem

 SailEphemAlmanac Location of planets relative to Sun in ecliptic frame using the almanac. SailEphemEarth Location of Earth relative to Sun in the ecliptic frame. SailEphemJPL Location of planets relative to Sun in ecliptic frame using JPL ephemerides.

SailModeling

 CP1Props Front and back optical and thermal properties of CP1 (Lambertian) ComputeSailNormal Find all sail components and calculate their composite normal. HCircularBillow Circular billow height model HQuadrantBillow Models a single sail quadrant as a section of an oblique cone. HRakoczy Height function for a square sail with billow. IDotS4 Inertia derivative of S4 sail. MakeSquareSail Generate a flat, square, nonideal sail in the Y/Z plane, using CP1 properties S4DeployTorque Disturbances function for modeling deployment of scalable square sail. SailMesh Create a mesh with the height determined by a specified function. StripedQuadrant Create a striped sail quadrant, with billow, in the x, y plane. UpdateSailOpticalProps Look up all the sail class components and update their properties.