A Free Spacecraft Simulation Tool
Total Page:16
File Type:pdf, Size:1020Kb
Orbiter: AFreeSpacecraftSimulationTool MartinSchweiger DepartmentofComputerScience UniversityCollegeLondon www.orbitersim.com 2nd ESAWorkshoponAstrodynamics ToolsandTechniques ESTEC,Noordwijk 13-15September2004 Contents • Overview • Scope • Limitations • SomeOrbiterfeatures: • Timepropagation • Gravitycalculation • Rigid-bodymodelandsuperstructures • OrbiterApplicationProgrammingInterface: • Concept • Orbiterinstrumentation • TheVESSELinterfaceclass • Newfeatures: • Air-breatingengines:scramjetdesign • Virtualcockpits • Newvisualeffects • Orbiterasateachingtool • Summaryandfutureplans • Demonstration Overview · Orbiterisareal-timespaceflightsimulationforWindowsPC platforms. · Modellingofatmosphericflight(launchandreentry), suborbital,orbitalandinterplanetarymissions(rendezvous, docking,transfer,swing-byetc.) · Newtonianmechanics,rigidbodymodelofrotation,basic atmosphericflightmodel. · Planetpositionsfrompublicperturbationsolutions.Time integrationofstatevectorsorosculatingelements. · Developedsince2000asaneducationalandrecreational applicationfororbitalmechanicssimulation. · WritteninC++,usingDirectXfor3-Drendering.Public programminginterfacefordevelopmentofexternalmodule plugins. · WithanincreasinglyversatileAPI,developmentfocusis beginningtoshiftfromtheOrbitercoreto3rd partyaddons. Scope · Launchsequencefromsurfacetoorbitalinsertion(including atmosphericeffects:drag,pressure-dependentengineISP...) · Orbitalmanoeuvres(alignmentoforbitalplane,orbit-to-orbit transfers,rendezvous) · Vessel-to-vesselapproachanddocking.Buildingof superstructuresfromvesselmodules(includingsimplerules forupdatingtherigid-bodymodel). · Releaseandre-captureofsatellites. · Re-entry. · Interplanetarytransfers(includingHohmannorbits,slingshot manoeuvres) · Atmosphericflight(aerodynamicflightmodel,airfoildefinition, runwaytakeoff/landing,airbreathingengines) Limitations · Stabilityoftimepropagation:numericalaccuracylimitedby framerefreshrate(physicsengineandgraphicssubsystem competingforclockcycles) · Flightmodel:nonativesupportyetforradiationpressure, micro-dragathighaltitude.Simplerigid-bodymodel(nonative supportfortethers,internalmassdistributionchanges...) · Simpleatmosphericflightmodel · Nocollisiondetection · Nodamagemodelling · Nonativemulti-usersupport Timepropagation Real-timesimulationwithtimeaccelerationupto104 and variablesteplengthdeterminedbyprocessorspeed,graphics load,simulationcomplexityetc. Method1: Semi-analyticperturbationsolutionsforcelestialbodies (VSOP87,ELP2000...) Method2: → → th Propagationofstatevectorsr(ti) r(ti+1),v(ti) v(ti+1) with4 orderRunge-Kutta. Method3: Updatingelementsofosculatingorbitfromperturbationsofthe primarygravitationalfield. Gravitycalculation Orbiteraccomodatesperturbationsoftheradialsymmetryof gravitationalpotentialsourcesinasingle(polar)dimension usingaharmonicseries: » N 2 φ = GM − ≈ R ’ φ U (r, ) …1 ƒ J n ∆ ÷ Pn (sin ) r n=2 « r ◊ withLegendrepolynomialPn ofordern,andperturbation coefficientsJn.NumberoftermsN isadjustedautomaticallyas afunctionofdistancer. Earth J2=1082.63 J3=-2.51 J =-1.6 4 Afullsphericalharmonics J5=0.13 Mercury J2=60 expansionofthefield Venus J =27 x10-6 2 perturbationsinbothpolar(φ) Mars J =1964 2 andazimuthdirection(λ)is Jupiter J2=14750 Saturn J2=16450 plannedforafutureversion. Uranus J2=12000 Neptune J2=4000 Rigid-bodymodelandcompositestructures Orbiterusesasimplifiedmodelof Thesamplespi foreachvessel rigidbodymotiontoconstruct aretransformedintoacommon superstructuresbyconnecting referenceframepi',givenbythe vessels. superstructureconnectivity,and GivenEuler'sequationforangular transformedPMIareconstructed: motion,assumingdiagonalised ′ = ′2 + ′2 J x m yi zi inertiatensorswithPMIJx,Jy,Jz: i ω = − − ω ω ′ = ′2 + ′2 J x # x M x (J z J y ) y z J y m xi zi i J ω = M − (J − J )ω ω y # y y x z z x ′ = ′2 + ′2 J z m xi yi ω = − − ω ω J z # z M z (J y J x ) x y i ThePMIJ(S) ofthesuperstructure werepresenteachvesselby6 arethengivenbycollectingall ± ± samplesp1,2 =( x,0,0),p3,4=(0, y,0), vesselcontributions: ± p5,6 =(0,0, z) with J (S ) = J′(k ) = 1 − + + x 2 | J x J y J z | k y = 1 | J − J + J | Nooff-diagonalelementsare 2 x y z consideredinJ(S). = 1 + − z 2 | J x J y J z | OrbitermoduledesignandAPI Textures Instrument Meshes plugin Planet API Vessel parser parser definitionfile definitionfile Planet API callback Orbiter API callback Vessel core module APIrequest APIrequest module API: VESSELclass Ephemeris API derivedclass libraries(VSOP, ELP2000) Plugin vesselinstance module API Script Remote Externallinks wrapper (files,libraries, Orbiter applications Script Orbiterinstrumentation Multifunctionaldisplay(MFD)concept:seamlessextensionof instrumentationfunctionalityviapluginMFDmodes. Genericinstruments(selection): Surface-relativeandat- Alignorbitalplanewith Rendezvouswith Lineupdocking mosphericparameters. atargetorbitatanode. targetobject. approachpath. Drop-ininstrumentsfrompluginmodules: MFDplugin TransXMFDmode: interplanetarytransfer Orbiter Update() calculationwithpatched core Redraw() coneapproach. (courtesyDuncan Userinput() Sharpe) OrbiterAPI:TheVESSELinterface TheVESSELclassisagenericinterfacebetweenOrbiteranda vesselimplementation. classVESSEL classmyVessel:publicVESSEL clbkTimestep() clbkTimestep() overloaded callback callback functions clbkSaveState() clbkSaveState() ... ... functions GetAltitude() local_Functions() API SetThrusterLevel() get/set AddForce() ... UsingOrbiter'sbuilt-inflight Localcalculation,bypassing model: Orbiter'sflightmodel: Setup: Timestep: Define_thruster(r,d,f0,isp,...) Get_Positions() Define_airfoil(r,cL(...),cD(...),...) Get_Atmospheric_data() (F,r)=local_Calculate_forces() AddForce(F,r) Thevesseldesignerhasachoiceofusingbuilt-inflightmodels,or implementingalocalmodel(usingOrbiterasavisualisation frameworkonly). Air-breathingengines:scramjet(1) Scramjetdesignisanexampleforimplementingafeatureentirely externallywithoutnativesupportintheOrbitercore. Idealscramjet:temperatureandpressurerelationships γ /(γ −1) Diffuser:isentropic γ −1 T = + 2 = d compression Td T∞ 1 M ∞ pd p∞ 2 T∞ Combustionchamber: T = max(T ,T ) p = p isobaricexpansion b b0 d b d (γ −1)/γ Exhaustnozzle: p T = T e p = p isentropicexpansion e b e ∞ pb Jetenginepropulsionthrustequation: = + − + − F (m# a m# f )ve m# av∞ ( pe p∞ )Ae whereandaretheairandfuelmassrates,respectively,and m# a m# f ve v∞ aretheexhaustandfreestreamvelocities,andAeistheexhaustcross section. Air-breathingengines:scramjet(2) F Specificthrustisgivenby = ( + ) − Thrustvs.Machnumber: 1 D ve v∞ Enginethrus t 180 m# a = 160 whereDm#f/m#aisthefuel-to-airratio. 140 120 Theamountoffuelburnedinthecombustion 100 ] N k[ 80 chambermustbeadjustedsothattheburner F temperaturelimitisnotexceeded.Thisleads 60 40 tothefollowingexpressionforD: 20 0 − 0 1 2 3 4 5 6 7 8 9 T T Machnumber D = b d − Q / c p Tb TSFCvs.Machnumber: Thrus t-s pecificfuelcons umption whereQ isafuel-specificheatingvalueand 0.8 c isthespecificheatatconstantpressure, 0.7 p 0.6 givenbyc =γR/(γ-1). p 0.5 ] J k g/ k[ 0.4 Theexhaustvelocityvcanbeobtainedfrom C e F S theenergybalance T 0.3 0.2 0.1 2 0 = + 0 1 2 3 4 5 6 7 8 9 c pTb c pTe ve / 2 Machnumber Virtual3-DCockpit • Supportfor3-Dvirtual cockpitview • Headrotationimproves situationalawareness • “Eye-neck”offsetgenerates movementparallax • Camerareferencepoint androtationrangesdefined byAPIcalls • Dynamicdisplayupdates • Mouse-operated instruments • Viewpoint-correctedHUD display 3-DartworkcourtesyRogerLong Newvisualeffects(1) · Improvedrenderingof atmospherichazefromhigh altitude · Additionalconfiguration parametersforcolour distribution · Renderingofobjects throughatmospherelayers isnowadditive. Newvisualeffects(2) · Surfacelabels(launch sites,radiotransmitters, user-defined) · Surfaceshadowsupportfor structuresandvessels Orbiterasateachingtool(1) · Newhtml-basedhelpsystem(context-sensitive:scenario- and vessel-specific).Canbeextendedby3rd partyplugins. · New"kioskmode"forunsuperviseduseinpublicenvironments (limitedsimulationruntime,automaticscenarioselection). Helpsystem:scenario Helpsystem: Helpsystem:orbital instructions instrumentlayoutand mechanicsprimer documentation Orbiterasateachingtool(2) Datalogging:flightdatacanbeextractedforanalysisby: · Usingbuilt-inflightdataloggingfacilities · WritingcustomdataextractionmodulesusingtheAPIinterface · New:UsingDDE(dynamicdataexchange)protocol FDlDigEhtsDuaptapomrto:deuxlpeolrotigngginflgigahttmdoastaphtoerMicAdTaLtaAB Exportedtoafileforoffline analysis Summary · Orbiterisanaccessibletoolforatmospheric,orbitaland interplanetaryspaceflightsimulation. · Combininga(moderately)accuratephysicsenginewith3-D rendering,itsmainapplicationisasaneducationalor recreationaltool. · Theprogramminginterface(API)isaversatilewaytoextend thecoreOrbiterfunctionality.Featuresnotnativelysupported bythecorecanbeaddedbyexternalplugins. · TheAPIinterfaceincludes · statevectorupdatesforcelestialbodies · spacecraftimplementations · instrumentation · Developmentofthecoremoduleisongoing,andagrowing setof3rdpartycontributionsisavailable. Futuredevelopments Someofthefeaturesplannedforfuturereleasesinclude: · Improvementsoftheflightmodel(stabilityoftimeintegration, micro-drag,radiationpressure,atmosphericflightmodel). · Damageandcollisionmodelling. · Multi-usersupport(simulationrunningonservercontinuously, clientsconnecttemporarily). · Elevationmodellingofcelestialbodies. Acknowledgements Trajectorycode DuncanSharpe(TransXtransfertrajectoryplugin) Vesselcode RaduPoenaru,RobertConley 3-DModelling RogerLong,AndrewFarnaby,DonGallagher, DamirGulesich,DavidSundstrom,Jason Benson,ValerioOss Planettextures JamesHastings-Trew,BjörnJonsson,Dean Scott,PhilipStooke,ConstantineThomas, RobertStettner,JamesWilliams,Seth Hollingsead Thebetatestteam Theaddondeveloperbase Thesponsors M6.net,avsim.com Resources Orbitermainsite(includesdownloadlinksandrelatedsites): www.medphys.ucl.ac.uk/~martins/orbit/orbit.html www.orbitersim.com Contact: [email protected] Critique,suggestions andcollaborationsare verywelcome! <OrbiterDemonstration>.