Happy Landings - To the Mun with kOS

Sdílet
Vložit
  • čas přidán 30. 07. 2018
  • In the final episode of our miniseries, we figure out surface normal vectors, add some judicious time warping, and set out to land on the Mun!
    This tutorial is running on KSP version 1.4.1, and kOS version 1.1.5.2.
    READ THE FRIENDLY MANUAL
    ksp-kos.github.io/KOS/
    GRAB THE FINAL SCRIPT
    gist.github.com/gisikw/b8d1bd...
    SUPPORT THIS SERIES
    / cheerskevin
    GET THE KOS MOD
    ksp-kos.github.io/KOS/downloa...
    DOWNLOAD KERBAL SPACE PROGRAM
    kerbalspaceprogram.com/
  • Hry

Komentáře • 38

  • @CheersKevin
    @CheersKevin  Před 6 lety +12

    Had to reupload due to a botched export. Enjoy!!

    • @karanmachado4316
      @karanmachado4316 Před 3 lety

      is this the kerbalx stock rocket.cause I ran your script on kerbalx didn't quite run well.Do we need to do some changes to the rocket?

  • @jeremyfarley423
    @jeremyfarley423 Před 4 lety +13

    Thank you for teaching me kOS. I learned C++ in college and I saw kOS as an opportunity to both add more realism to KSP since modern rockets are not manually flown except as backup, as well as practice my programming skills. It is very amazing that someone set out to write their own complete programming language!! Yea, I know! all languages are invented by someone, but commercial languages that we use are made for a capitalist goal. Whoever invented this language did so as a game mod in their free time and gave it away for free, simply for their own pleasure. Just amazing!!

    • @FR1S0N
      @FR1S0N Před 2 měsíci

      No developer thinks of "capitalist goals" while creating a language. Any language will accept whatever "anti-capitalist software" you want to write. The C compiler (which is free), father of most modern languages you can think of, was created as a means to interface with Unix - a free operating system. Your compliment loses most of it's meaning once you throw your own political views in the middle.

    • @jeremyfarley423
      @jeremyfarley423 Před 2 měsíci

      @@FR1S0N Thank you for providing a really good point of view and cool facts! I wrote this years ago and I agree that I would have rewritten this differently. I didnt mean for it to sound "anti-capitalist" I just mean, most of the time, we write code to make money. Thats why I now drive to my "new" programming job every day! And I cannot be happier. I just wanted to express how awesome it is when someone uses their very valuable skills and time and gives it to everyone asking for nothing in return. Truly wonderful and generous people.
      Thank you again for your kind response and letting me know of the "bug" in my comment! Happy Coding!!

  • @flyingfiddler90q
    @flyingfiddler90q Před 6 lety +18

    I hope you do another full Kerbal programming series soon.

  • @horman1973
    @horman1973 Před 5 lety

    Again a very well explained series, learned alot!
    I hope, you will continue on with KOS Videos!

  • @nomcognom2332
    @nomcognom2332 Před 3 lety

    Great series! I really enjoyed them!

  • @rtleitao78
    @rtleitao78 Před 5 lety +1

    This was excellent. It should be the first contact anyone gets with kOS.
    I still have to try coding it, and implement improvements, but learned a lot just watching it.
    Brilliant

  • @patrik8641
    @patrik8641 Před 3 lety

    Thanks for the amazing tutorials! You are a great teacher :)

  • @gwivongalois6169
    @gwivongalois6169 Před rokem

    Well done. I was on the edge of my seat during the landing. And i must say, i sometimes landed worse. I loved to see the development of the script, from something barely able to launch before exploding, then getting better and better. You even tamed the famous beast called Mathematics.

  • @sionkim2013
    @sionkim2013 Před 2 lety

    I appreciate for excellent series. thanks.

  • @anonymeusofficial5148
    @anonymeusofficial5148 Před 2 lety

    2022 and still relevent! Just went through the whole series! Thank you!

  • @RobDeVos101
    @RobDeVos101 Před 5 lety

    Yeah got it working.
    I have added a round function in eccentricityScore function in order to stop improving beyond the burn accuracy. I also changed the radar height from 4.7 to 7.7 m. After that it was just luck to get on a flat surface, about 3 time I ended up on a steep slope.
    The algorithm from episode 10 gave me often a fly-by with the Mun but not a collision, the latest code did gave me an proper encounter en never a fly-by.
    Your code is really nice! Hope to see more!

  • @krishanson3889
    @krishanson3889 Před 3 lety

    Next two things that would be fun would be a return trip and a way to more precisely control where on the Mun the ship will land. I ran this 5 times in a row. Four landed within a 10km radius, and another was 80 or so km away - kind of an outlier it seems. But most seem to land in the Northwest Crater for me. Of the 5, one landed on the very steepest part of the crater with a RUD. Great job on this - thanks for walking us through the dev of it, Kevin.

  • @mds000123
    @mds000123 Před 5 lety

    Very interesting. I would love more videos

  • @pkillor
    @pkillor Před rokem

    Very interesting and educational.

  • @matthewp4046
    @matthewp4046 Před 2 lety

    Great series! I wish you would do another. Maybe visit multiple bodies? Auto rendezvous docking? Loads of possibilities

  • @RadioRanger007
    @RadioRanger007 Před 6 lety

    Very Nice!

  • @kleinerprinz99
    @kleinerprinz99 Před 5 lety

    Great series! Now all I need to do is adapt it Principia Mod System! (N-Body Simulation) Wish me luck! :D I think a quick and dirty patch would be to calculate the maneuver node in a way that they are executed right after the node not 50/50, but 0/100 the way the flight planner and maneuver planner in principia work. :)

  • @ScottGauche
    @ScottGauche Před 5 lety

    I think the reason the circularization maneuver node takes a long time to settle is because you are trying to start that calculation while you are still in the atmosphere, where there is a little drag. Enough drag to be slowly decreasing your apoapsis. I'd modify the script to wait to calculate the circularization until after you are out of the atmosphere.

  • @danielboro2000
    @danielboro2000 Před 6 lety

    Thank you for this and the older sires
    They are both of immense help
    (I apologies for my behavior In the old sires)
    Plagiarism hehe :)
    Id like to show my score version for munTransferScore
    local result is 100000000000000.
    If mnv:orbit:nextPatch:periapsis>0 set result to abs(LOG10(mnv:orbit:nextPatch:periapsis/WantHightOverTarget))*mnv:deltaV:mag.
    I also replaced my clunky hill claiming function whit your better version :)

  • @robbertolozzi393
    @robbertolozzi393 Před 3 lety

    Hi Kevin.
    Thanks for this video series. It’s been great! If I wanted to create a script for each body, I would just need to do a save as on the script and change “Mun” out for say “Minmius” and so on? Also could the script be refactored so instead of calling out the “Body” your going for in the script, but just have it go off whatever your ‘Target’ is?

  • @dong9224
    @dong9224 Před 3 lety

    any plans to redo this series on RSS with RO? Would be really cool as the techniques to get to orbit and the way most engines cant be reignited or throttled all way down would make it a lot tougher

  • @casksteven3079
    @casksteven3079 Před 6 lety

    yeah

  • @ctbram0627
    @ctbram0627 Před 4 lety +1

    Just a little confused because if you use the right hand rule the cross product of up and north results in a vector pointing west not east

  • @Hidden-Force
    @Hidden-Force Před 6 lety

    Now get them home. ;) (I'm not sure they have enough fuel.)

    • @CheersKevin
      @CheersKevin  Před 6 lety

      Alas, they don't (the KerbalX is tuned to only very very barely have enough fuel). But with some tweaking of the scripts, it should be theoretically possible to make that happen!

  • @LTL_king
    @LTL_king Před měsícem

    How do you shutdown and engine so it can't fire?
    How do you end out of a program early for failed to ignite?
    How do you have a separate function continuously running checking for an abort function. In the background of a gravity turn or such.

    • @LTL_king
      @LTL_king Před měsícem

      I still want to get the abort () in a separate file so it can be run from anywhere.
      Also I need to figure how to run a separate abort during a gravity turn to activate range control.
      and another to give me availablethrust as from the time the engine fires up. (Similar to space x readout on screen.)
      Here's what I thought of for abort on launch pad.
      function prelaunchcheck {
      PRINT "Avail thrust " + round (ship:AVAILABLETHRUST, 3).
      if ship:AVAILABLETHRUST > ship:maxthrust*0.90 {
      print "1".
      wait 0.8.
      voice:PLAY(voiceTakeOffNote).
      stage.
      print "Launch" at (5,6).
      function abort {
      }
      else {
      PRINT "Engine failed.".
      PRINT "Shutting down engine".
      wait 0.2.
      lock throttle to 0.
      abort().
      }
      }
      }

  • @ctbram0627
    @ctbram0627 Před 5 lety +2

    okay still scratching my head kevin. I literally compared your code to mine line for line and mine matched 100% but when I ran mine and it got to doTransfer - it would crash in the call to improve with a: call to non-invokable object error. This started after the episode you add protectFromPast().
    Finally in desperation and out of total frustration I just copied yours and pasted it over mine. Exact same 307 lines of code and ran it and doTransfer worked. The ship crashed during the hoverSlam but it ran and I am totally at a loss for what was causing my to through the non-invokable call error.
    I saved a copy of mine matches every line of yours. But it will not run. It is bugs like this that make me want to get a hammer and just smash either the computer or my head!

    • @kleinerprinz99
      @kleinerprinz99 Před 5 lety

      maybe a spelling error or missing brackets, dots or commas happens a lot and can be easily overseen

    • @MCWaffles2003-1
      @MCWaffles2003-1 Před 3 lety

      had a similar problem...
      set index to index+1.
      // Is not the same as
      set index to index + 1.

  • @jimmynoname4089
    @jimmynoname4089 Před 6 lety

    Are you a kos dev?

    • @CheersKevin
      @CheersKevin  Před 6 lety +2

      Nope - though I am a contributor. Afraid I don't yet have the expertise with C# to be a huge help in that regard.

    • @jimmynoname4089
      @jimmynoname4089 Před 6 lety +1

      CheersKevin I was just asking because it seems you know a ton about this mod. But thank you for this tut. It actually helped me with my powershell scripting... oddly enough.

    • @jimmynoname4089
      @jimmynoname4089 Před 6 lety

      0 Kerbal every day in every thing!

  • @casksteven3079
    @casksteven3079 Před 6 lety

    frist