Open-Source, Extensible Spacecraft Simulation and Modeling Environment Framework
Total Page:16
File Type:pdf, Size:1020Kb
Open-Source, Extensible Spacecraft Simulation And Modeling Environment Framework Andrew Turner Masters Thesis Presentation July 17th, 2003 Outline of Presentation Introduction Background Purpose Architecture Design Software Implementation Verification and Validation Simulation Examples Conclusions 2 Introduction Open-SESSAME Framework Open-Source Extensible Spacecraft Simulation And Modeling Environment Framework Adapted by J. Schwartz from http://www.jenn98.com/bugs/1957-1.html 3 Section: Background Spacecraft Simulation Software Alternatives Project Background Purpose Object-Oriented Programming Introduction Background Architecture Design Software Implementation Verification and Validation Simulation Examples Conclusions 4 Spacecraft Simulation Aerospace Engineering Computer Science / Software Engineering - Attitude dynamics - Object-Oriented Design - Orbit dynamics - Computational Speed - Satellite environment - Networking - Terminology - Data Handling - Aerospace tools - Extensibility - Typical use cases - Software development tools - Satellite Community - Open-Source Community 5 Project Background Developing attitude control algorithms No current solution Performs necessary tasks Understandable and inspectable Need to redevelop solution every time 6 Software Alternatives Package Manufacturer Benefits Negatives AutoCon NASA Goddard Heritage Not maintained, not readily available DSHELL NASA JPL Free to academic institutions Not readily available dshell.jpl.nasa.gov Formation Flying NASA Goddard Well supported, ties in with hardware Expensive, limited availability, aimed Testbed towards formations FreeFlyer www.ai- a.i. solutions Scriptable, good user interface, her- Expensive, limited integration with ex- solutions.com itage, 2D/3D visualization isting software MultiSatSim Princeton Satel- Good graphics, easy to use interface, Apple hardware only, limited to 8 satel- www.psatellite.com lite Systems scriptable lites, limited expandability ORSA Open-Source multiple platforms, active development Not complete, limited functionality, or- orsa.sourceforge.net bits only Open-SESSAME Open-Source multiple platforms, extensible, well No graphical user interface, requires space- documented, active development, orbit knowledge of C++ programming craft.sourceforge.net and attitude, seperate libraries SATCOS SAIC Heritage Orbit and constellations only 1 www.saic.com/space/ SaVi Open-Source Good user interface, in development Only models orbits, made for constel- savi.sourceforge.net lations, single developer SC Modeler AVM Dynamics - No longer supported www.avmdynamics.com Spacecraft Con- Princeton Satel- Well developed, documented MatLab only, attitude only trol Toolbox lite Systems www.psatellite.com Satellite ToolKit Analytical Easy to use, 2D/3D visualization, her- Expensive, not extensible, complex www.stk.com Graphics itage, large number of modules, good support, external communcations, va- riety of operating systems Swingby Computer Sci- – – ences Corpora- tion WinOrbit www.sat- Carl Gregory, Free of cost, graphical user interface Windows only, not extensible, user in- net.com/winorbit/ Univ. Illinois terface difficult 7 Purpose Provide a useful spacecraft simulation modeling tool to engineers Complement existing engineering tools Include underdeveloped methodologies Allow for infinite extensibility Educate students and other users how to design and implement simulation in software Readable and useful documentation and software Logical architecture design Develop an open-source framework that can be maintained and extended longer than the original project’s lifetime Host on a public repository and include developers in the community Foster communication between developers and users 8 Object-Oriented Programming Objects = Classes Encapsulate Physical Objects Abstract Functionality Data-Hiding UML Diagram Object-Oriented Design Composition Inheritance 9 Section: Architecture Design Software Architecture Component Libraries Building an Application Introduction Background Architecture Design Software Implementation Verification and Validation Simulation Examples Conclusions 10 Architecture Design Collections of libraries Dynamics Library Interchangeable components Application framework ‘Assemble’ to build an application Attitude Library Orbit Library Suggested Architecture Reconfigurable Rotation Library Environment Library Communications Data Handling 11 Rotation Library Rotation Class Rotation DirectionCosine -Quaternion Matrix Abstract Matrix +SetDCM +SetEulerAngles Conversion Routines +SetEulerAxisAngle +SetMRP 1 Quaternion +SetQuaternion Stored as a Quaternion +GetDCM +GetEulerAxisAngle Vector +GetMRP ModifiedRodriguez +GetQuaternion Parameters Other Representations 12 Attitude Library AttitudeState odeFunctor * AttitudeFrame Composition 1 Rotation, Frame, AngVel 1..n Vector Attitude AttitudeState 1 AngularVelocity Attitude Quaternion AngularVelocity 1 Larger composition ModifiedRodriguez Rotation AngularMomentum AttitudeState Any Kinematic or Kinematics & Dynamics Kinetic EOM History Kinematic & Kinetic Equations of Motion 13 Orbit Library Orbit 1..n OrbitState OrbitState Local Composite 1 1 OrbitState- OrbitFrame OrbitStateRep Representation OrbitFrame PositionVelocity OrbitFrameECEF Orbit Poincaré OrbitFramePQW Larger Composite Keplerian OrbitFrameIJK Dynamics History Delauney OrbitFrameRSW Other State Other OrbitFrames Representations 14 Dynamics Library Propagator Propagator Abstract interface Types of propagators Numeric NumericPropagator AnalyticPropagator Analytic Combined- EnkeCombined- AnalyticPropagator NumericPropagator NumericPropagator Schemes Other Numeric Propagators 15 Environment Environment Library 1 0,1..n CentralBody EnvFunction Environment Composition and interface EarthCentralBody TwoBodyGravity GravityGradient CentralBody SimpleAeroDrag MagneticDipole MoonCentralBody Physical parameters SimpleSolar Aerodynamic RadiationPressure Torque MarsCentralBody Defines frames Force Environmental Torque Environmental Disturbance Functions Disturbance Functions Location with respect to other celestial Other CentralBodies Complex bodies J2GravityModel GravityGradient EnvFunctions ComplexAeroDrag Complex MagneticDipole Interface to force and torque functions Other Environment Other Environment Force Functions Torque Functions Parameters: time, orbit state, attitude state 16 Data Handling Utilities History Vectors of data 0,1..n History ssfTime Associated with times Interpolation ControlHistory Other History AttitudeHistory OrbitHistory (Torque / Force) Collections Data Conversion 0,1..n 0,1..n 0,1..n 0,1..n Applicable Data AttitudeState OrbitState ControlState or State 17 Math Library Numerical Integration Integrator Interpolator Fixed step Variable step FixedStep VariableStep Linear Integrator Integrator Interpolator Data Interpolation CubicSpline RungeKutta AdamsBashforth Interpolator Integrator Integrator NaturalCubicSpline Interpolator Other FixedStep Other VariableStep Integrators Integrators Other Interpolators 18 Linear CubicSpline AttitudeFrame Vector Open-SESSAME Interpolator Interpolator Rotation Quaternion Application 0..n Interpolator A 1. Choose Equations of Motion AttitudeState MarsCB MoonCB 2. Add Dynamic Components AttitudeHistory Attitude EarthCB MatLab Attitude 3. Choose Orbit Characteristics STK Export A Dynamics XML Export 4. Choose Attitude Characteristics Converter History Propagator Environment CentralBody Orbit B 5. Add Environment Effects Dynamics OrbitHistory Orbit EnvFunction 6. Add History B OrbitState 7. Choose Interpolators Keplerian 0,1,2 Integrator Position OrbitRep 8. Simulate! Velocity Runge-Kutta Runge-Kutta OrbitFrame Fehlberg Integrator 19 Section: Software Implementation Software Implementation Code Metrics Implementation Artifacts Documentation Introduction Background Architecture Design Software Implementation Verification and Validation Simulation Examples Conclusions 20 Software Implementation C++ software language Open-source libraries and toolkits Matrix Network Communications Documentation Verbose coding Doxygen 21 Code Metrics Lines of code: 4810 Library Size Lines of documentation: 8112 Attitude 335k Data Handling 749k Number of classes: 44 Dynamics 697k Functions: 498 Environment 518k Avg executable size: ~4 MB Math 430k Matrix 1.88M Orbit 658k Rotation 255k Utils 223k 22 Implementation Artifacts Framework bundle 9 libraries Source code Example applications Documentation User’s Manual Master’s Thesis Conference paper Public repository Forums, documentation, Source (CVS) 23 Documentation Doxygen Automatic document generation Produces html, xml, latex (pdf) Includes equations Verbose coding ‘Hungarian Notation’ Inline comments Cite references Programming primer 24 Section: Verification and Validation Verification Purpose Methods Results Validation Introduction Purpose Background Methods Architecture Design Software Implementation Results Verification and Validation Simulation Examples Conclusions 25 Verification Show that the software is implemented correctly - Verify Computational results from software match analytical analysis Output is compared to alternative, industry accepted, solutions 26 Orbit Verification Conservation of Angular Momentum ri [1131.34, 2282.343, 6672.423]T km 0 − Keplerian Equation vi [ 5.64305, 4.30333, 2.42879]T km/s 0 − t 2400 sec Integrator RK-4(5), tol: 10 10 9 × − Output Running Time 0.59 sec i T rKep(t) [ 4219.853, 4363.116, 3958.789] km i − − T vKep(t) [3.689736, 1.91662, 6.112528] km/s i − − T rSim(t) [ 4219.752, 4363.029, 3958.766] km i − − T vSim(t)