Advertisement
Guest User

SimpleKSPOrbitalMechanics0.003

a guest
Sep 3rd, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 33.97 KB | None | 0 0
  1. -- SimpleKSPOrbitalMechanics is a purely calculation based lua library, with some constants hardcoded for Kerbal Space Program
  2.  
  3. -- v0.003
  4.  
  5. -- v0.002 changes: added printSkomKSPCurrentVesselInfo, added elements to printSkomKSPCurrentOrbitalElements
  6.  
  7. -- v0.003 changes: added reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm(), reportSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween), printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween), coprintSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwn(TimeBeforeInitial, TimeBetween), and isSkomCurrentOrbitStable()
  8.  
  9. --[[ to use, put
  10.  
  11.  require "SimpleKSPOrbitalMechanics"
  12.  
  13.  ]]
  14.  
  15. --[[ in your lua script, or run it with
  16.  
  17.  dofile("SimpleKSPOrbitalMechanics")
  18.  
  19.  ]]
  20.  
  21. -- Original Work Copyright 2012, Nadrek, insofar as any elements that aren't obvious, trivial, or mathematics are concerned (none of which are copyrightable)
  22.  
  23. -- licensed under your choice of GPLv2, GPLv3, or Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)  http://www.gnu.org/licenses/gpl-2.0.html  or  http://www.gnu.org/licenses/gpl.html  or  http://creativecommons.org/licenses/by-sa/3.0/
  24.  
  25. -- KSP specific functions will have KSP in the name; other functions will not, and can be used for real life calculations as well.
  26.  
  27.  
  28.  
  29.  
  30.  
  31. -- This script requires SimpleOrbitalMechanics to do the heavy mathematical lifting.
  32.  
  33. -- This script contains KSP specific functions and calls useful to and reliant on Kerbal Space Program, MechJeb, and MechJeb's Autom8 module.
  34.  
  35.  
  36.  
  37. require "SimpleOrbitalMechanics"
  38.  
  39.  
  40.  
  41. function globalSkomKSPMainBodyResetBasedOnGuessing()
  42.  
  43.   -- prints body it guessed
  44.  
  45.   -- also sets the globalMainBody... variables to that body (or all to -1
  46.  
  47.   --   if the body is UNKNOWN)
  48.  
  49.   -- Essentially, this function, if called while in orbit around a given body (like the Mun, or Kerbin)
  50.  
  51.   --   sets some "background" variables so the rest of the functions know how to act based on what
  52.  
  53.   --   you're orbiting; you use different values for the Min and for Kerbin, because Kerbin is bigger,
  54.  
  55.   --   has more gravity, has an atmosphere, and has a much larger Hill sphere of influence.
  56.  
  57.   -- NOTE: Landed, on the launchpad, in ascent, in descent all count as being "in orbit"!
  58.  
  59.   -- no return value
  60.  
  61.   local GuessedMainBody = guessSkomKSPWhatBodyIsTheMainBodyCurrentlyBeingOrbited()
  62.  
  63.   globalSomMainBodyReset(GuessedMainBody)
  64.  
  65.   print GuessedMainBody
  66.  
  67. end
  68.  
  69.  
  70.  
  71.  
  72.  
  73. function guessSkomKSPWhatBodyIsTheMainBodyCurrentlyBeingOrbited()
  74.  
  75.   -- returns the SimpleOrbitalMechanics name of the body we think we're orbiting.
  76.  
  77.   --   suitable to pass to globalSomMainBodyReset, or returns UNKNOWN if it cannot tell
  78.  
  79.   --[[ Ex:
  80.  
  81.     print(guessSkomKSPWhatBodyIsTheMainBodyCurrentlyBeingOrbited())
  82.  
  83.     ]]
  84.  
  85.   -- NOTE: All warnings and notes for guessSomWhatBodyIsTheMainBodyFromaOvAltaslMoe apply.
  86.  
  87.   return guessSomWhatBodyIsTheMainBodyFromaOvAltaslMoe(vessel.orbitSemiMajorAxis, vessel.speedOrbital, vessel.altitudeASL, 0.01)
  88.  
  89. end
  90.  
  91.  
  92.  
  93.  
  94.  
  95. function calcSkomMolniyaApPeFromMainBodyCurrentlyBeingOrbitedFromMoe(MarginOfError)
  96.  
  97.   -- MarginOfError 0.001 means allow 0.1% for a "safety zone" above the minimum stable altitude, or below the Hill sphere of influence.
  98.  
  99.   --   Do this if you want to just barely scrape by!
  100.  
  101.   --   2 means allow a 200% "safety zone" above the minimum stable altitude, or below the Hill sphere of influence.
  102.  
  103.   --   Do this if you want to have a much less eccentric orbit - perhaps you want to keep certain orbits clear for other uses!
  104.  
  105.   --   If in doubt, try setting MarginOfError to 0.1
  106.  
  107.   -- Returns Ap and Pe of the best possible Molniya orbit for a given body
  108.  
  109.   --   Returns -1, -1 if no stable Molniya orbit is possible
  110.  
  111.   -- REQUIRES globalSomMainBodyReset to have been called properly
  112.  
  113.   --   the simple way is to run globalSkomKSPMainBodyResetBasedOnGuessing() first!
  114.  
  115.   --[[ Ex:
  116.  
  117.     do
  118.  
  119.     local localAp, localPe = calcSkomMolniyaApPeFromMainBodyCurrentlyBeingOrbitedFromMoe(0.1)
  120.  
  121.     print("Your Apoapsis should be " .. localAp .. " meters and your Periapsis should be " .. localPe .. " meters")
  122.  
  123.     print("  For a classical Molniya orbit, use an inclination of 63.4, 116.6, -63.4, or -116.6")
  124.  
  125.     print("  These values are chosen because oblate planets (like the Earth's fat equatorial bulge")
  126.  
  127.     print("  would change your orbit with other inclinations, since the planet isn't a sphere")
  128.  
  129.     end
  130.  
  131.     ]]
  132.  
  133.   -- For oblate celestial bodies, of course, the inclination of the actual orbit must be 63.4 or 116.6 degrees, so the effect of the oblate equitorial belt is nullified.
  134.  
  135.  
  136.  
  137.   -- Now we call our standard Molniya calculator, and pass in numbers based on the celestial body we claim we're currently in orbit of!
  138.  
  139.   return calcSomMolniyaApPeFromHsoiMsaMbrGmSrpMoe(globalSomMainBodyHillSphereOfInfluence, globalSomMainBodyMinStableAltitude, globalSomMainBodyEquatorialRadius, globalSomMainBodyGM, globalSomMainBodySiderealRotationalPeriod, MarginOfError)
  140.  
  141.  
  142.  
  143. end
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151. function printSkomKSPCurrentOrbitalElements()
  152.  
  153.   print("orbitApA " .. vessel.orbitApA)
  154.  
  155.   print("orbitPeA " .. vessel.orbitPeA)
  156.  
  157.   print("orbitPeriod " .. vessel.orbitPeriod)
  158.  
  159.   print("orbitTimeToAp " .. vessel.orbitTimeToAp)
  160.  
  161.   print("orbitTimeToPe " .. vessel.orbitTimeToPe)
  162.  
  163.   print("orbitLAN (RA/Long of Ascending Node) " .. vessel.orbitLAN)
  164.  
  165.   print("orbitArgumentOfPeriapsis " .. vessel.orbitArgumentOfPeriapsis)
  166.  
  167.   print("orbitInclination " .. vessel.orbitInclination)
  168.  
  169.   print("orbitEccentricity " .. vessel.orbitEccentricity)
  170.  
  171.   print("orbitSemiMajorAxis (a) " .. vessel.orbitSemiMajorAxis)
  172.  
  173.   print("speedOrbital " .. vessel.speedOrbital)
  174.  
  175.   print("speedSurface " .. vessel.speedSurface)
  176.  
  177.   print("speedVertical " .. vessel.speedVertical)
  178.  
  179.   print("speedHorizontal " .. vessel.speedHorizontal)
  180.  
  181.   print("vesselHeading " .. vessel.vesselHeading)
  182.  
  183.   print("vesselPitch " .. vessel.vesselPitch)
  184.  
  185.   print("vesselRoll " .. vessel.vesselRoll)
  186.  
  187.   print("altitudeASL " .. vessel.altitudeASL)
  188.  
  189.   print("altitudeTrue " .. vessel.altitudeTrue)
  190.  
  191.   print("altitudeBottom " .. vessel.altitudeBottom)
  192.  
  193.   print("latitude " .. vessel.latitude)
  194.  
  195.   print("longitude " .. vessel.longitude)
  196.  
  197.   print("radius " .. vessel.radius)
  198.  
  199.   print("localg " .. vessel.localg)
  200.  
  201.   print("atmosphericDensity " .. vessel.atmosphericDensity)
  202.  
  203.   print("time " .. vessel.time)
  204.  
  205. end
  206.  
  207.  
  208.  
  209. function reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm()
  210.  
  211.   -- added in v0.003
  212.  
  213.   -- Simply returns a set of variables for other use.
  214.  
  215.   -- Ms is the vessel mass in kg
  216.  
  217.   -- Msd is the vessel mass drag in ???
  218.  
  219.   -- Ap is the Apoapsis in meters
  220.  
  221.   -- Pe is the Periapsis in meters
  222.  
  223.   -- Sop is the sidereal orbital period in seconds
  224.  
  225.   -- Tmap is the time to Apoapsis in seconds
  226.  
  227.   -- Tmpe is the time to Periapsis in seconds
  228.  
  229.   -- Lan is the Longitude of the Ascending Node in degrees
  230.  
  231.   -- Aop is the Argument of Periapsis in ???
  232.  
  233.   -- Inc is the Inclination of the orbit in degrees
  234.  
  235.   -- Ecc is the eccentricity of the orbit in ???
  236.  
  237.   -- a is the semi-major axis in meters
  238.  
  239.   -- Ov is the orbital velocity in m/s
  240.  
  241.   -- Sv is the surface velocity in m/s
  242.  
  243.   -- Hv is the horizontal velocity in m/s
  244.  
  245.   -- Vv is the vertical velocity in m/s
  246.  
  247.   -- Hd is the heading in degrees
  248.  
  249.   -- Pi is the pitch in degrees
  250.  
  251.   -- Rl is the roll in degrees
  252.  
  253.   -- Altasl is the altitude above sea level in meters
  254.  
  255.   -- Alttru is the true altitude in meters
  256.  
  257.   -- Altbot is the altitude from the bottom of the vessel in meters ???
  258.  
  259.   -- Lat is the latitude in degrees
  260.  
  261.   -- Lng is the longitude in degrees
  262.  
  263.   -- Rfcb is the Radius From Central Body in meters, the distance in meters from the orbiting
  264.  
  265.   --   object to the center of gravity it's orbiting (i.e. the center of the planet)
  266.  
  267.   -- G is the local gravity in m/s
  268.  
  269.   -- Atmd is the atmospheric denisty in ???
  270.  
  271.   -- Tm is the time from ??? in seconds
  272.  
  273.   --[[ example:
  274.  
  275.     do
  276.  
  277.       local localMs, localMsd, localAp, localPe, localSop, localTmap, localTmpe, localLan, localAop, localInc, localEcc, locala, localOv, localSv, localVv, localHv, localHd, localPi, localRl, localAltasl, localAlttru, localAltbot, localLat, localLng, localRfcb, localG, localAtmd, localTm = reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm()
  278.  
  279.       print("mass " .. localMs)
  280.  
  281.       print("massDrag " .. localMsd)
  282.  
  283.       print("Ap " .. localAp)
  284.  
  285.       print("Pe " .. localPe)
  286.  
  287.       print("Sop " .. localSop)
  288.  
  289.       print("Tmap " .. localTmap)
  290.  
  291.       print("Tmpe " .. localTmpe)
  292.  
  293.       print("Lan " .. localLan)
  294.  
  295.       print("Aop " .. localAop)
  296.  
  297.       print("Inc " .. localInc)
  298.  
  299.       print("Ecc " .. localEcc)
  300.  
  301.       print("a " .. locala)
  302.  
  303.       print("Ov " .. localOv)
  304.  
  305.       print("Sv " .. localSv)
  306.  
  307.       print("Vv " .. localVv)
  308.  
  309.       print("Hv " .. localHv)
  310.  
  311.       print("Hd " .. localHd)
  312.  
  313.       print("Pi " .. localPi)
  314.  
  315.       print("Rl " .. localRl)
  316.  
  317.       print("Altasl " .. localAltasl)
  318.  
  319.       print("Alttru " .. localAlttru)
  320.  
  321.       print("Altbot " .. localAltbot)
  322.  
  323.       print("Lat " .. localLat)
  324.  
  325.       print("Lng " .. localLng)
  326.  
  327.       print("Rfcb " .. localRfcb)
  328.  
  329.       print("G " .. localG)
  330.  
  331.       print("Atmd " .. localAtmd)
  332.  
  333.       print("Tm " .. localTm)
  334.  
  335.     end
  336.  
  337.   ]]
  338.  
  339.   return vessel.mass, vessel.massDrag, vessel.orbitApA, vessel.orbitPeA, vessel.orbitPeriod, vessel.orbitTimeToAp, vessel.orbitTimeToPe, vessel.orbitLAN, vessel.orbitArgumentOfPeriapsis, vessel.orbitInclination, vessel.orbitEccentricity, vessel.orbitSemiMajorAxis, vessel.speedOrbital, vessel.speedSurface, vessel.speedVertical, vessel.speedHorizontal, vessel.vesselHeading, vessel.vesselPitch, vessel.vesselRoll, vessel.altitudeASL, vessel.altitudeTrue, vessel.altitudeBottom, vessel.latitude, vessel.longitude, vessel.radius, vessel.localg, vessel.atmosphericDensity, vessel.time
  340.  
  341. end
  342.  
  343.  
  344.  
  345. function reportSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)
  346.  
  347.   -- added in v0.003
  348.  
  349.   --   NOTE: Because this has wait() statements, it must be run synchronously with whatever uses the data it returns
  350.  
  351.   --   NOTE: Because this has wait() statements, it must be run asynchronously with the main game and any control processes!
  352.  
  353.   --   NOTE: Good luck.  It is possible to have the async process update global variables, which will be available to other processes
  354.  
  355.   --      after the async process finishes.  There is likely a much better way to handle this, however.
  356.  
  357.   --   USED BY: printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)
  358.  
  359.   -- TimeBeforeInitial is the time to wait prior to the initial measurement in seconds
  360.  
  361.   --   enter 0 if you're unsure; this is typically to allow engines to come to full throttle
  362.  
  363.   -- TimeBetweenMeasurements is the time between initial and final measurements in seconds
  364.  
  365.   -- Returns the same variables as reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm(),
  366.  
  367.   -- but instead of being instantaneous values, they're the difference between the final value and the initial value (the delta)
  368.  
  369.   --[[ example:
  370.  
  371.     do
  372.  
  373.       local localInitialMs, localFinalMs, localDiffMs, localDiffMsd, localDiffAp, localDiffPe, localDiffSop, localDiffTmap, localDiffTmpe, localDiffLan, localDiffAop, localDiffInc, localDiffEcc, localDiffa, localDiffOv, localDiffSv, localDiffVv, localDiffHv, localDiffHd, localDiffPi, localDiffRl, localDiffAltasl, localDiffAlttru, localDiffAltbot, localDiffLat, localDiffLng, localDiffRfcb, localDiffG, localDiffAtmd, localDiffTm = reportSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(0.5, 2)
  374.  
  375.       print("Initial mass " .. localInitialMs)
  376.  
  377.       print("Final mass " .. localFinalMs)
  378.  
  379.       print("mass " .. localDiffMs)
  380.  
  381.       print("massDrag " .. localDiffMsd)
  382.  
  383.       print("Ap " .. localDiffAp)
  384.  
  385.       print("Pe " .. localDiffPe)
  386.  
  387.       print("Sop " .. localDiffSop)
  388.  
  389.       print("Tmap " .. localDiffTmap)
  390.  
  391.       print("Tmpe " .. localDiffTmpe)
  392.  
  393.       print("Lan " .. localDiffLan)
  394.  
  395.       print("Aop " .. localDiffAop)
  396.  
  397.       print("Inc " .. localDiffInc)
  398.  
  399.       print("Ecc " .. localDiffEcc)
  400.  
  401.       print("a " .. localDiffa)
  402.  
  403.       print("Ov " .. localDiffOv)
  404.  
  405.       print("Sv " .. localDiffSv)
  406.  
  407.       print("Vv " .. localDiffVv)
  408.  
  409.       print("Hv " .. localDiffHv)
  410.  
  411.       print("Hd " .. localDiffHd)
  412.  
  413.       print("Pi " .. localDiffPi)
  414.  
  415.       print("Rl " .. localDiffRl)
  416.  
  417.       print("Altasl " .. localDiffAltasl)
  418.  
  419.       print("Alttru " .. localDiffAlttru)
  420.  
  421.       print("Altbot " .. localDiffAltbot)
  422.  
  423.       print("Lat " .. localDiffLat)
  424.  
  425.       print("Lng " .. localDiffLng)
  426.  
  427.       print("Rfcb " .. localDiffRfcb)
  428.  
  429.       print("G " .. localDiffG)
  430.  
  431.       print("Atmd " .. localDiffAtmd)
  432.  
  433.       print("Tm " .. localDiffTm)
  434.  
  435.     end
  436.  
  437.   ]]
  438.  
  439.  
  440.  
  441.   wait(TimeBeforeInitial)
  442.  
  443.  
  444.  
  445.   local localInitialMs, localInitialMsd, localInitialAp, localInitialPe, localInitialSop, localInitialTmap, localInitialTmpe, localInitialLan, localInitialAop, localInitialInc, localInitialEcc, localInitiala, localInitialOv, localInitialSv, localInitialVv, localInitialHv, localInitialHd, localInitialPi, localInitialRl, localInitialAltasl, localInitialAlttru, localInitialAltbot, localInitialLat, localInitialLng, localInitialRfcb, localInitialG, localInitialAtmd, localInitialTm = reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm()
  446.  
  447.  
  448.  
  449.   wait(TimeBetween)
  450.  
  451.  
  452.  
  453.   local localFinalMs, localFinalMsd, localFinalAp, localFinalPe, localFinalSop, localFinalTmap, localFinalTmpe, localFinalLan, localFinalAop, localFinalInc, localFinalEcc, localFinala, localFinalOv, localFinalSv, localFinalVv, localFinalHv, localFinalHd, localFinalPi, localFinalRl, localFinalAltasl, localFinalAlttru, localFinalAltbot, localFinalLat, localFinalLng, localFinalRfcb, localFinalG, localFinalAtmd, localFinalTm = reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm()
  454.  
  455.  
  456.  
  457.   return localInitialMs, localFinalMs, localFinalMs - localInitialMs, localFinalMsd - localInitialMsd, localFinalAp - localInitialAp, localFinalPe - localInitialPe, localFinalSop - localInitialSop, localFinalTmap - localInitialTmap, localFinalTmpe - localInitialTmpe, localFinalLan - localInitialLan, localFinalAop - localInitialAop, localFinalInc - localInitialInc, localFinalEcc - localInitialEcc, localFinala - localInitiala, localFinalOv - localInitialOv, localFinalSv - localInitialSv, localFinalVv - localInitialVv, localFinalHv - localInitialHv, localFinalHd - localInitialHd, localFinalPi - localInitialPi, localFinalRl - localInitialRl, localFinalAltasl - localInitialAltasl, localFinalAlttru - localInitialAlttru, localFinalAltbot - localInitialAltbot, localFinalLat - localInitialLat, localFinalLng - localInitialLng, localFinalRfcb - localInitialRfcb, localFinalG - localInitialG, localFinalAtmd - localInitialAtmd, localFinalTm - localInitialTm
  458.  
  459.  
  460.  
  461. end
  462.  
  463.  
  464.  
  465. function printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)
  466.  
  467.   -- added in v0.003
  468.  
  469.   -- see the core function reportSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)
  470.  
  471.   -- This function is designed to be called by a coroutine.
  472.  
  473.   -- First, a synchronous call to the differencing test.
  474.  
  475.   local localInitialMs, localFinalMs, localDiffMs, localDiffMsd, localDiffAp, localDiffPe, localDiffSop, localDiffTmap, localDiffTmpe, localDiffLan, localDiffAop, localDiffInc, localDiffEcc, localDiffa, localDiffOv, localDiffSv, localDiffVv, localDiffHv, localDiffHd, localDiffPi, localDiffRl, localDiffAltasl, localDiffAlttru, localDiffAltbot, localDiffLat, localDiffLng, localDiffRfcb, localDiffG, localDiffAtmd, localDiffTm = reportSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)
  476.  
  477.   -- Now, report the results
  478.  
  479.   print("Msi " .. localInitialMs)
  480.  
  481.   print("Msf " .. localFinalMs)
  482.  
  483.   print("Ms " .. localDiffMs)
  484.  
  485.   print("Msd " .. localDiffMsd)
  486.  
  487.   print("Ap " .. localDiffAp)
  488.  
  489.   print("Pe " .. localDiffPe)
  490.  
  491.   print("Sop " .. localDiffSop)
  492.  
  493.   print("Tmap " .. localDiffTmap)
  494.  
  495.   print("Tmpe " .. localDiffTmpe)
  496.  
  497.   print("Lan " .. localDiffLan)
  498.  
  499.   print("Aop " .. localDiffAop)
  500.  
  501.   print("Inc " .. localDiffInc)
  502.  
  503.   print("Ecc " .. localDiffEcc)
  504.  
  505.   print("a " .. localDiffa)
  506.  
  507.   print("Ov " .. localDiffOv)
  508.  
  509.   print("Sv " .. localDiffSv)
  510.  
  511.   print("Vv " .. localDiffVv)
  512.  
  513.   print("Hv " .. localDiffHv)
  514.  
  515.   print("Hd " .. localDiffHd)
  516.  
  517.   print("Pi " .. localDiffPi)
  518.  
  519.   print("Rl " .. localDiffRl)
  520.  
  521.   print("Altasl " .. localDiffAltasl)
  522.  
  523.   print("Alttru " .. localDiffAlttru)
  524.  
  525.   print("Altbot " .. localDiffAltbot)
  526.  
  527.   print("Lat " .. localDiffLat)
  528.  
  529.   print("Lng " .. localDiffLng)
  530.  
  531.   print("Rfcb " .. localDiffRfcb)
  532.  
  533.   print("G " .. localDiffG)
  534.  
  535.   print("Atmd " .. localDiffAtmd)
  536.  
  537.   print("Tm " .. localDiffTm)
  538.  
  539. end
  540.  
  541.  
  542.  
  543.  
  544.  
  545. function coprintSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwn(TimeBeforeInitial, TimeBetween)
  546.  
  547.   -- added in v0.003
  548.  
  549.   -- see the core function printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver
  550.  
  551.   --[[ ex.
  552.  
  553.     coprintSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwn(0,1)
  554.  
  555.   ]]
  556.  
  557.   local coPrintChangeOverTime = coroutine.create(printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver)
  558.  
  559.   coroutine.resume(coPrintChangeOverTime, TimeBeforeInitial, TimeBetween)
  560.  
  561. end
  562.  
  563.  
  564.  
  565.  
  566.  
  567. function isSkomCurrentOrbitStable()
  568.  
  569.   -- added in v0.003
  570.  
  571.   -- returns, technically, simple bit flags:
  572.  
  573.   -- 0 = stable
  574.  
  575.   -- 1 = burn up in atmosphere
  576.  
  577.   -- 2 = escape SOI
  578.  
  579.   -- 3 = both burn up and escape SOI (whichever comes first)
  580.  
  581.   -- 4 = your Apoapsis is greater than your Periapsis, which is just wrong.
  582.  
  583.  
  584.  
  585.   -- REQUIRES globalSomMainBodyReset to have been called properly
  586.  
  587.   --   the simple way is to run globalSkomKSPMainBodyResetBasedOnGuessing() first!
  588.  
  589.  
  590.  
  591.   -- First, let's reset our main body; perhaps we've switch orbits recently!
  592.  
  593.   globalSkomKSPMainBodyResetBasedOnGuessing()
  594.  
  595.  
  596.  
  597.   return isSomOrbitStableFromApPeHsoiMsa(vessel.orbitApA, vessel.orbitPeA, globalSomMainBodyHillSphereOfInfluence, globalSomMainBodyMinStableAltitude)
  598.  
  599. end
  600.  
  601.  
  602.  
  603.  
  604.  
  605. function printSkomKSPCurrentVesselInfo()
  606.  
  607.   print("CoM[1] " .. vessel.CoM[1])
  608.  
  609.   print("CoM[2] " .. vessel.CoM[2])
  610.  
  611.   print("CoM[3] " .. vessel.CoM[3])
  612.  
  613.   print("up[1] " .. vessel.up[1])
  614.  
  615.   print("up[2] " .. vessel.up[2])
  616.  
  617.   print("up[3] " .. vessel.up[3])
  618.  
  619.   print("north[1] " .. vessel.north[1])
  620.  
  621.   print("north[2] " .. vessel.north[2])
  622.  
  623.   print("north[3] " .. vessel.north[3])
  624.  
  625.   print("east[1] " .. vessel.east[1])
  626.  
  627.   print("east[2] " .. vessel.east[2])
  628.  
  629.   print("east[3] " .. vessel.east[3])
  630.  
  631.   print("forward[1] " .. vessel.forward[1])
  632.  
  633.   print("forward[2] " .. vessel.forward[2])
  634.  
  635.   print("forward[3] " .. vessel.forward[3])
  636.  
  637.   print("rotationSurface[1] " .. vessel.rotationSurface[1])
  638.  
  639.   print("rotationSurface[2] " .. vessel.rotationSurface[2])
  640.  
  641.   print("rotationSurface[3] " .. vessel.rotationSurface[3])
  642.  
  643.   print("rotationSurface[4] " .. vessel.rotationSurface[4])
  644.  
  645.   print("rotationVesselSurface[1] " .. vessel.rotationVesselSurface[1])
  646.  
  647.   print("rotationVesselSurface[2] " .. vessel.rotationVesselSurface[2])
  648.  
  649.   print("rotationVesselSurface[3] " .. vessel.rotationVesselSurface[3])
  650.  
  651.   print("rotationVesselSurface[4] " .. vessel.rotationVesselSurface[4])
  652.  
  653.   print("velocityMainBodySurface[1] " .. vessel.velocityMainBodySurface[1])
  654.  
  655.   print("velocityMainBodySurface[2] " .. vessel.velocityMainBodySurface[2])
  656.  
  657.   print("velocityMainBodySurface[3] " .. vessel.velocityMainBodySurface[3])
  658.  
  659.   print("velocityVesselSurface[1] " .. vessel.velocityVesselSurface[1])
  660.  
  661.   print("velocityVesselSurface[2] " .. vessel.velocityVesselSurface[2])
  662.  
  663.   print("velocityVesselSurface[3] " .. vessel.velocityVesselSurface[3])
  664.  
  665.   print("velocityVesselSurfaceUnit[1] " .. vessel.velocityVesselSurfaceUnit[1])
  666.  
  667.   print("velocityVesselSurfaceUnit[2] " .. vessel.velocityVesselSurfaceUnit[2])
  668.  
  669.   print("velocityVesselSurfaceUnit[3] " .. vessel.velocityVesselSurfaceUnit[3])
  670.  
  671.   print("velocityVesselOrbit[1] " .. vessel.velocityVesselOrbit[1])
  672.  
  673.   print("velocityVesselOrbit[2] " .. vessel.velocityVesselOrbit[2])
  674.  
  675.   print("velocityVesselOrbit[3] " .. vessel.velocityVesselOrbit[3])
  676.  
  677.   print("velocityVesselOrbitUnit[1] " .. vessel.velocityVesselOrbitUnit[1])
  678.  
  679.   print("velocityVesselOrbitUnit[2] " .. vessel.velocityVesselOrbitUnit[2])
  680.  
  681.   print("velocityVesselOrbitUnit[3] " .. vessel.velocityVesselOrbitUnit[3])
  682.  
  683.   print("angularVelocity[1] " .. vessel.angularVelocity[1])
  684.  
  685.   print("angularVelocity[2] " .. vessel.angularVelocity[2])
  686.  
  687.   print("angularVelocity[3] " .. vessel.angularVelocity[3])
  688.  
  689.   print("angularMomentum[1] " .. vessel.angularMomentum[1])
  690.  
  691.   print("angularMomentum[2] " .. vessel.angularMomentum[2])
  692.  
  693.   print("angularMomentum[3] " .. vessel.angularMomentum[3])
  694.  
  695.   print("upNormalToVelSurface[1] " .. vessel.upNormalToVelSurface[1])
  696.  
  697.   print("upNormalToVelSurface[2] " .. vessel.upNormalToVelSurface[2])
  698.  
  699.   print("upNormalToVelSurface[3] " .. vessel.upNormalToVelSurface[3])
  700.  
  701.   print("leftSurface[1] " .. vessel.leftSurface[1])
  702.  
  703.   print("leftSurface[2] " .. vessel.leftSurface[2])
  704.  
  705.   print("leftSurface[3] " .. vessel.leftSurface[3])
  706.  
  707.   print("leftOrbit[1] " .. vessel.leftOrbit[1])
  708.  
  709.   print("leftOrbit[2] " .. vessel.leftOrbit[2])
  710.  
  711.   print("leftOrbit[3] " .. vessel.leftOrbit[3])
  712.  
  713.   print("gravityForce[1] " .. vessel.gravityForce[1])
  714.  
  715.   print("gravityForce[2] " .. vessel.gravityForce[2])
  716.  
  717.   print("gravityForce[3] " .. vessel.gravityForce[3])
  718.  
  719.   print("mass " .. vessel.mass)
  720.  
  721.   print("thrustAvailable " .. vessel.thrustAvailable)
  722.  
  723.   print("thrustMinimum " .. vessel.thrustMinimum)
  724.  
  725.   print("maxThrustAccel  " .. vessel.maxThrustAccel )
  726.  
  727.   print("minThrustAccel " .. vessel.minThrustAccel)
  728.  
  729.   print("torqueRAvailable " .. vessel.torqueRAvailable)
  730.  
  731.   print("torquePYAvailable " .. vessel.torquePYAvailable)
  732.  
  733.   print("torqueThrustPYAvailable " .. vessel.torqueThrustPYAvailable)
  734.  
  735.   print("massDrag " .. vessel.massDrag)
  736.  
  737. end
  738.  
  739.  
  740.  
  741. function helpSkomSimpleKSPOrbitalMechanics1()
  742.  
  743.   print "Usage: globalSkomKSPMainBodyResetBasedOnGuessing()"
  744.  
  745.   print "   prints body it guessed"
  746.  
  747.   print "   also sets the globalMainBody... variables to that body (or all to -1"
  748.  
  749.   print "     if the body is UNKNOWN)"
  750.  
  751.   print "   Essentially, this function, if called while in orbit around a given body (like the Mun, or Kerbin)"
  752.  
  753.   print "     sets some \"background\" variables so the rest of the functions know how to act based on what"
  754.  
  755.   print "     you're orbiting; you use different values for the Min and for Kerbin, because Kerbin is bigger,"
  756.  
  757.   print "     has more gravity, has an atmosphere, and has a much larger Hill sphere of influence."
  758.  
  759.   print "   NOTE: Landed, on the launchpad, in ascent, in descent, and crashing all count as being \"in orbit\"!"
  760.  
  761.   print "   no return value"
  762.  
  763.   print "Usage: guessSkomKSPWhatBodyIsTheMainBodyCurrentlyBeingOrbited()"
  764.  
  765.   print "   returns the SimpleOrbitalMechanics name of the body we think we're orbiting."
  766.  
  767.   print "   suitable to pass to globalSomMainBodyReset, or returns UNKNOWN if it cannot tell."
  768.  
  769.   print "   Ex:"
  770.  
  771.   print "     print(guessSkomKSPWhatBodyIsTheMainBodyCurrentlyBeingOrbited())"
  772.  
  773.   print "Usage: calcSkomMolniyaApPeFromMainBodyCurrentlyBeingOrbitedFromMoe(MarginOfError)"
  774.  
  775.   print "   MarginOfError 0.001 means allow 0.1% for a \"safety zone\" above the minimum stable altitude, or below the Hill sphere of influence."
  776.  
  777.   print "     Do this if you want to just barely scrape by!"
  778.  
  779.   print "     2 means allow a 200% \"safety zone\" above the minimum stable altitude, or below the Hill sphere of influence."
  780.  
  781.   print "     Do this if you want to have a much less eccentric orbit - perhaps you want to keep certain orbits clear for other uses!"
  782.  
  783.   print "     If in doubt, try setting MarginOfError to 0.1"
  784.  
  785.   print "   Returns Ap and Pe of the best possible Molniya orbit for a given body"
  786.  
  787.   print "     Returns -1, -1 if no stable Molniya orbit is possible"
  788.  
  789.   print "   REQUIRES globalSomMainBodyReset to have been called properly"
  790.  
  791.   print "     the simple way is to run globalSkomKSPMainBodyResetBasedOnGuessing() first!"
  792.  
  793.   print "   Ex:"
  794.  
  795.   print "     do"
  796.  
  797.   print "     local localAp, localPe = calcSkomMolniyaApPeFromMainBodyCurrentlyBeingOrbitedFromMoe(0.1)"
  798.  
  799.   print "     print(\"Your Apoapsis should be \" .. localAp .. \" meters and your Periapsis should be \" .. localPe .. \" meters\")"
  800.  
  801.   print "     print(\"  For a classical Molniya orbit, use an inclination of 63.4, 116.6, -63.4, or -116.6\")"
  802.  
  803.   print "     print(\"  These values are chosen because oblate planets (like the Earth's fat equatorial bulge\")"
  804.  
  805.   print "     print(\"  would change your orbit with other inclinations, since the planet isn't a sphere\")"
  806.  
  807.   print "     end"
  808.  
  809.   print "   For oblate celestial bodies, of course, the inclination of the actual orbit must be 63.4 or 116.6 degrees, so the effect of the oblate equitorial belt is nullified."
  810.  
  811.   print "Usage: printSkomKSPCurrentOrbitalElements()"
  812.  
  813.   print "   Prints important KSP elements for human use or records"
  814.  
  815.   print "Usage: printSkomKSPCurrentVesselInfo()"
  816.  
  817.   print "   Prints important KSP vessel information for human use or records"
  818.  
  819. end
  820.  
  821.  
  822.  
  823.  
  824.  
  825. function helpSkomSimpleKSPOrbitalMechanics2()
  826.  
  827.   print "Usage: reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm()"
  828.  
  829.   print "   Simply returns a set of variables for other use."
  830.  
  831.   print "   Ms is the vessel mass in kg"
  832.  
  833.   print "   Msd is the vessel mass drag in ???"
  834.  
  835.   print "   Ap is the Apoapsis in meters"
  836.  
  837.   print "   Pe is the Periapsis in meters"
  838.  
  839.   print "   Sop is the sidereal orbital period in seconds"
  840.  
  841.   print "   Tmap is the time to Apoapsis in seconds"
  842.  
  843.   print "   Tmpe is the time to Periapsis in seconds"
  844.  
  845.   print "   Lan is the Longitude of the Ascending Node in degrees"
  846.  
  847.   print "   Aop is the Argument of Periapsis in ???"
  848.  
  849.   print "   Inc is the Inclination of the orbit in degrees"
  850.  
  851.   print "   Ecc is the eccentricity of the orbit in ???"
  852.  
  853.   print "   a is the semi-major axis in meters"
  854.  
  855.   print "   Ov is the orbital velocity in m/s"
  856.  
  857.   print "   Sv is the surface velocity in m/s"
  858.  
  859.   print "   Hv is the horizontal velocity in m/s"
  860.  
  861.   print "   Vv is the vertical velocity in m/s"
  862.  
  863.   print "   Hd is the heading in degrees"
  864.  
  865.   print "   Pi is the pitch in degrees"
  866.  
  867.   print "   Rl is the roll in degrees"
  868.  
  869.   print "   Altasl is the altitude above sea level in meters"
  870.  
  871.   print "   Alttru is the true altitude in meters"
  872.  
  873.   print "   Altbot is the altitude from the bottom of the vessel in meters ???"
  874.  
  875.   print "   Lat is the latitude in degrees"
  876.  
  877.   print "   Lng is the longitude in degrees"
  878.  
  879.   print "   Rfcb is the Radius From Central Body, the distance in meters from the orbiting object to"
  880.  
  881.   print "     the center of gravity it's orbiting (i.e. the center of the planet)"
  882.  
  883.   print "   G is the local gravity in m/s"
  884.  
  885.   print "   Atmd is the atmospheric denisty in ???"
  886.  
  887.   print "   Tm is the time from ??? in seconds"
  888.  
  889. end
  890.  
  891.  
  892.  
  893. function helpSkomSimpleKSPOrbitalMechanics3()
  894.  
  895.   print "Ex of reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm():"
  896.  
  897.   print "do"
  898.  
  899.   print "  local localMs, localMsd, localAp, localPe, localSop, localTmap, localTmpe, localLan, localAop, localInc, localEcc, locala, localOv, localSv, localVv, localHv, localHd, localPi, localRl, localAltasl, localAlttru, localAltbot, localLat, localLng, localRfcb, localG, localAtmd, localTm = reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm()"
  900.  
  901.   print "  print(\"Ms is the vessel mass in kg \" .. localMs)"
  902.  
  903.   print "  print(\"Msd is the vessel mass drag in ??? \" .. localMsd)"
  904.  
  905.   print "  print(\"Ap is the Apoapsis in meters \" .. localAp)"
  906.  
  907.   print "  print(\"Pe is the Periapsis in meters \" .. localPe)"
  908.  
  909.   print "  print(\"Sop is the sidereal orbital period in seconds \" .. localSop)"
  910.  
  911.   print "  print(\"Tmap is the time to Apoapsis in seconds \" .. localTmap)"
  912.  
  913.   print "  print(\"Tmpe is the time to Periapsis in seconds \" .. localTmpe)"
  914.  
  915.   print "  print(\"Lan is the Longitude of the Ascending Node in degrees \" .. localLan)"
  916.  
  917.   print "  print(\"Aop is the Argument of Periapsis in ??? \" .. localAop)"
  918.  
  919.   print "  print(\"Inc is the Inclination of the orbit in degrees \" .. localInc)"
  920.  
  921.   print "  print(\"Ecc is the eccentricity of the orbit in ??? \" .. localEcc)"
  922.  
  923.   print "  print(\"a is the semi-major axis in meters \" .. locala)"
  924.  
  925.   print "  print(\"Ov is the orbital velocity in m/s \" .. localOv)"
  926.  
  927.   print "  print(\"Sv is the surface velocity in m/s \" .. localSv)"
  928.  
  929.   print "  print(\"Vv is the vertical velocity in m/s \" .. localVv)"
  930.  
  931.   print "  print(\"Hv is the horizontal velocity in m/s \" .. localHv)"
  932.  
  933.   print "  print(\"Hd is the heading in degrees \" .. localHd)"
  934.  
  935.   print "  print(\"Pi is the pitch in degrees \" .. localPi)"
  936.  
  937.   print "  print(\"Rl is the roll in degrees \" .. localRl)"
  938.  
  939.   print "  print(\"Altasl is the altitude above sea level in meters \" .. localAltasl)"
  940.  
  941.   print "  print(\"Alttru is the true altitude in meters \" .. localAlttru)"
  942.  
  943.   print "  print(\"Altbot is the altitude from the bottom of the vessel in meters ??? \" .. localAltbot)"
  944.  
  945.   print "  print(\"Lat is the latitude in degrees \" .. localLat)"
  946.  
  947.   print "  print(\"Lng is the longitude in degrees \" .. localLng)"
  948.  
  949.   print "  print(\"Rfcb is the Radius From Central Body in meters \" .. localRfcb)"
  950.  
  951.   print "  print(\"G is the local gravity in m/s \" .. localG)"
  952.  
  953.   print "  print(\"Atmd is the atmospheric denisty in ??? \" .. localAtmd)"
  954.  
  955.   print "  print(\"Tm is the time from ??? in seconds \" .. localTm)"
  956.  
  957.   print "end"
  958.  
  959. end
  960.  
  961.  
  962.  
  963. function helpSkomSimpleKSPOrbitalMechanics4()
  964.  
  965.   print "Usage: isSkomCurrentOrbitStable()"
  966.  
  967.   print "   Returns 0 for stable, 1 for burn up in atmosphere, 2 for escape"
  968.  
  969.   print "   sphere of influence (SOI), and 3 for burn up AND escape SOI"
  970.  
  971.   print "Usage: reportSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)"
  972.  
  973.   print "   Call by synchronous function which is in turn called by coroutine only.  Returns Initial Mass, Final Mass, then the normal"
  974.  
  975.   print "   reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm() variables as differences over time."  
  976.  
  977.   print "Usage: printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)"
  978.  
  979.   print "   TimeBeforeInitial is the \"spool up\" delay in seconds we're going to use"
  980.  
  981.   print "     this is how much time we think it takes our engines to come to stable thrust"
  982.  
  983.   print "     i.e. 0.5 means set thrust to the desired value, then wait half a second, then start the measurement for this \"slice\""
  984.  
  985.   print "     For the bell rocket engines in 0.16, 0.25 is a reasonable minimum for TimeBeforeInitial"
  986.  
  987.   print "   TimeBetween is the time in seconds between initial and final measurements"
  988.  
  989.   print "     For the bell rocket engines in 0.16, 0.25 is a reasonable minimum for TimeBetween"
  990.  
  991.   print "   CALL VIA COROUTINE ONLY; returns the variables from reportSkomCurrentMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTm"
  992.  
  993.   print "   as differences (EXCEPT the first two return variables are Msi and Msf, the Initial mass and Final mass, followed by"
  994.  
  995.   print "   the differences in the reportSkom... variables) instead of instantaneously as the reportSkom... does."
  996.  
  997.   print "Usage: coprintSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwn(TimeBeforeInitial, TimeBetween)"
  998.  
  999.   print "   This is the coroutine that calls printSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwnDriver(TimeBeforeInitial, TimeBetween)"print "   and prints the values to the console."
  1000.  
  1001.   print " ex. coprintSkomCurrentChangeOverTimeMsiMsfMsMsdApPeSopTmapTmpeLanAopIncEccAOvSvVvHvHdPiRlAltaslAlttruAltbotLatLngRfcbGAtmdTmFromTmbiTmbtwn(0.25,1)"
  1002.  
  1003. end
  1004.  
  1005.  
  1006.  
  1007. globalSkomKSPMainBodyResetBasedOnGuessing() -- initalize main body dependent variables based on guessing what body we're orbiting.
  1008.  
  1009.  
  1010.  
  1011. print "Usage: helpSkomSimpleKSPOrbitalMechanics1() through helpSkomSimpleKSPOrbitalMechanics4()"
  1012.  
  1013. print "   gives detailed help on all Skom functions."
  1014.  
  1015. print "   Skom functions relate to Kerbal Space Program (KSP) mathematical functionality."
  1016.  
  1017. print("If it helps, I'm guessing you are currently orbiting " .. globalSomMainBodyName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement