ElWanderer

Members
  • Content count

    273
  • Joined

  • Last visited

Community Reputation

95 Excellent

2 Followers

About ElWanderer

  1. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    Does TARGET:TYPENAME help?
  2. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    The root of 0: aka the archive is your Ships/Script directory inside your KSP install. So that example would save to something like C:\Program Files (x86)\Steam\Steamapps\common\Kerbal Space Program\Ships\Script\log\ascent.csv
  3. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    LOG my_variable TO log_file_path. If log_file_path is on the archive (e.g. "0:/log/testrun1.txt") you'll need to have a connection back to KSC (assuming you're playing with CommNet enabled or Remote Tech installed), but it will persist after mission end. If you want to make it easier to graph it, you can concatenate the various values with commas into a single string variable, then log that into a .CSV file e.g. LOG ALTITUDE + "," + SHIP:VELOCITY:SURFACE:MAG TO "0:/log/ascent.csv".
  4. Polar Orbits

    I believe the epoch time is reset at regular intervals for the active vessel. I have been told it was deliberately done this way as part of the effort to avoid the Kraken (i.e. keeping the current vessel at the centre of the game universe to avoid floating point errors building up too high). This is second-hand knowledge, I've not checked it myself, but it's what I was told when I asked if the epoch was the beginning of the game (i.e. time 0).
  5. Ah, yes. That means you are orbiting in the wrong direction. The simplest manoeuvre to align with the target orbit is to burn twice your current velocity magnitude, retrograde, until you're going the same speed in the opposite direction. Around Minimus, velocities are low, it is fairly cheap to change, so it may work. There are more efficient methods (generally raising your apoapsis very high, then changing direction there, then lowering the apoapsis back down) if you need them.
  6. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    My slope library is here: https://github.com/ElWanderer/kOS_scripts/blob/v1.1_draft_changes/scripts/lib_slope.ks / https://github.com/ElWanderer/kOS_scripts/blob/v1.1_draft_changes/documentation/lib_slope_readme.md though all the hard work was taken from episode 42 or 43 of Cheers Kevin's Kerbal Space Programming series on YouTube.
  7. Heavy Lift SSTO Delta-v

    Once you're in space, you don't need to do any spaceplane-specific calculations (unless visiting Laythe!) Find out how much delta-v it will take to get where you want to go from LKO from a delta-v map, then use the rocket equation to work out how much fuel you'll need for your dry mass of 70t. Add some for luck. Then add the mass of that to the dry mass you're plugging into your SSTO equations. e.g. if you need 50t of fuel to get to Duna's surface (or to get back after refueling), you effectively have a spaceplane with a dry mass of 120t to get into orbit of Kerbin. This changes if you can refuel in LKO, as then some of the fuel capacity used to get into orbit can be reused to go places in space. Edit: ah, wait. Adding engines and fuel tanks will increase your dry mass, reducing the delta-v you have once you reach orbit, so you would need to iterate adding extra fuel to account for the extra mass, then check if you need extra engines/fuel to get into orbit, and so on until the difference is negligible.
  8. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    Ah, now that I did not know!
  9. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    The WHEN ... THEN ... syntax does not initiate a loop. Instead it sets up an interrupt that will be triggered when the condition is met. But the program must be running for any triggers to fire. The traditional thing to try first is to put "WAIT UNTIL FALSE." at the bottom of the script, so it never ends. Or rewrite your code to use WAIT UNTIL ... Notes: I don't think you can "set" steering, you need to "LOCK STEERING TO ..." I think you'd need to check "SHIP:VELOCITY:SURFACE:MAG > 50" (VELOCITY is an object that contains a surface velocity vector and an orbital velocity vector, in turn you need to call MAG to get the magnitude of the vector).
  10. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    Someone posted about this on the kOS reddit recently: https://www.reddit.com/r/Kos/comments/77x3n3/script_to_deal_with_crafts_where_the_thrust_is/ Whoa, the forum initially tried to embed the entire reddit post within this post...
  11. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    I think that's a duplicate of this: https://github.com/KSP-KOS/KOS/issues/1905
  12. LV-T45 40,000M 1000m/s

    Before v1.0, I had a spreadsheet that simulated a vertical ascent second by second (or some fraction thereof). Back then, drag was predictable (and highly unrealistic) so this was not only possible with relatively simple calculations, but actually gave useful results. The introduction of a realistic drag model (amongst other things) changed all that. These days, I'd go with trial and error for anything that involves the atmosphere - the game is itself the best way of simulating. You can even justify (if you feel the need to) a few reverts by pretending you are running simulations ahead of actual missions.
  13. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    Apoapsis is a floating point number. Chances are it will never equal 300000. Also, the games proceeds at a certain number of ticks/updates per second. Your apoapsis could easily be under 300000m one update, then over 300000m a split second later. Better to use a greater than check. WAIT UNTIL APOAPSIS > 300000.
  14. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    That sounds more like kRPC than kOS.
  15. [1.3] kOS v1.1.3.0 : kOS Scriptable Autopilot System

    I think it was deliberately changed to be consistent with what KSP displays, in an effort to solve various problems, so it's unlikely to get changed back to be inconsistent again (unless KSP itself changes!) There is at least one issue requesting a change to the current behaviour on the kOS github: https://github.com/KSP-KOS/KOS/issues/1908