Read the Friendly Manual - Docs and KSP Bindings in kOS

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024
  • Writing code is all well and good, but we want our code to propel rockets! Today, we take a look at the built-in structures that kOS provides for us so that we can wrap up our maneuver node autopilot. Diving into the kOS docs really helps, with plenty of code examples, and information about all the structures we're liable to encounter. Play along with the script below!
    This tutorial is running on KSP version 1.4.1, and kOS version 1.1.5.2.
    READ THE FRIENDLY MANUAL
    ksp-kos.github...
    GRAB THE CURRENT SCRIPT
    gist.github.co...
    SUPPORT THIS SERIES
    / cheerskevin
    GET THE KOS MOD
    ksp-kos.github...
    DOWNLOAD KERBAL SPACE PROGRAM
    kerbalspacepro...

ความคิดเห็น • 33

  • @hayes9611
    @hayes9611 6 ปีที่แล้ว +3

    please never stop making videos. Your narration is kinda immaculate

  • @ShreshtSrivastav
    @ShreshtSrivastav 6 ปีที่แล้ว +17

    You need to turn off SAS for kOS to steer properly. They vacillate for control, hence the wonky steering. Other than that, Great Video, really enjoying the series.

    • @SumGuyLovesVideos
      @SumGuyLovesVideos 6 ปีที่แล้ว +6

      And to tie even further into this particular video, the docs specifically state that it needs SAS off right now because of how KSP changed SAS internally :D

    • @CheersKevin
      @CheersKevin  6 ปีที่แล้ว +6

      Thanks for this, both of you! Great catch - we'll tidy it up in the next video :)

    • @ShreshtSrivastav
      @ShreshtSrivastav 6 ปีที่แล้ว

      You're welcome :)

    • @NicholasJJackson
      @NicholasJJackson 6 ปีที่แล้ว

      SAS off.
      no need to get function fancy over this one :P

  • @RenescoRocketman
    @RenescoRocketman 6 ปีที่แล้ว +2

    Whoa! You re back again! Wish you never stop making your awesome KSP series.

  • @xTwisteDx
    @xTwisteDx 5 ปีที่แล้ว +5

    Your voice is perfect. You need to do some Lynda classes.

  • @sigma6656
    @sigma6656 4 ปีที่แล้ว

    Wow,
    I never thought I would be so engrossed in watching someone write code.

  • @johngladin9382
    @johngladin9382 6 ปีที่แล้ว

    Loving this new series. Now if we could just warp ahead to your next video ...

  • @MaximumBan
    @MaximumBan 5 ปีที่แล้ว +1

    Dude, you are as smart as funny!!!
    Got me subscribed!

  • @SumGuyLovesVideos
    @SumGuyLovesVideos 6 ปีที่แล้ว +2

    Yay more KOS programming :D

  • @itchy2333
    @itchy2333 4 ปีที่แล้ว +1

    about the function isManeuverComplete -- i don't understand why you're finding the difference in angles with "vang(originalVector, mnv:burnvector)" when you set them equal to each other before that with "declare global originalVector to mnv:burnvector"
    so isn't this the same as "vang(mnv:burnvector, mnv:burnvector) which is always going to be zero?

    • @vortexcv
      @vortexcv ปีที่แล้ว +1

      the original vector will only be set once at the start of burn, when as you said the angle will be zero. as the burn happens, the mnv:burnvector will change directions (you can see this on navball when doing long burns, the blue marker of maneuver shifts and the sas keeps the ship pointed towards it, mnv:burnvector is that blue marker). so the angle will increase as burn happens.

  • @rithvikkona8922
    @rithvikkona8922 2 ปีที่แล้ว

    I'm where he's making a function to get the burn time, and I'm confused because there is mnv:time which is the burn time and can't you just halve that to calculate when to start the burn?
    Edit: nvm mnv:time is what time relative to the start of the mission the manuever node is

  • @gayathriveeramani1147
    @gayathriveeramani1147 7 หลายเดือนก่อน

    Its not working...?

  • @devanshrao8044
    @devanshrao8044 6 ปีที่แล้ว +2

    Thanks a lot man you are really good .
    But please tell me , Im 16 and i am thinking computer science , programming , developing etc as career so should I ? Do computer science has future and money ? In future . Btw love your work

    • @muj1
      @muj1 5 ปีที่แล้ว +1

      Choose it if you like doing it cos you don't want to be earning over 100k a year and be miserable.

    • @josephmatthews7698
      @josephmatthews7698 5 หลายเดือนก่อน

      Hey bud just a friendly kerbonaut checking in on you 5 years later. Did you pick computer science?
      Hope you're doing well in college or whatever path you chose. STEM for the win but more importantly do what you're passionate about.

  • @metalmiketh
    @metalmiketh 3 ปีที่แล้ว

    Are you and quill18 the same person. Your tutorial styles, voices and sudo code are very similar

  • @Chezburger8
    @Chezburger8 5 ปีที่แล้ว

    mine says undefined variable name mnv

    • @Chezburger8
      @Chezburger8 5 ปีที่แล้ว +1

      Rewrote my code and it works now

  • @NicholasJJackson
    @NicholasJJackson 6 ปีที่แล้ว

    From the ending of the last video when you started with the Pseudocode, and now this one... I am starting to get lost :\

    • @CheersKevin
      @CheersKevin  6 ปีที่แล้ว

      Heya! Sorry to hear that - are there particular areas that could use more explanation? Wanna make sure this is as accessible as possible.

    • @NicholasJJackson
      @NicholasJJackson 6 ปีที่แล้ว

      CheersKevin thank you for taking the time. I very grateful for the opportunity. I am am getting stuck with the explanation of declare parameter. Is it a variable? It seems to act like one, also with what is the difference between local and global. When to use one or the other. Why, and what is the purpose of these, or how to use it. I see on the document page for example //set x to node.
      You have //local mnv is node. Is local/global also used to set variables? I look what you write and compare it to what I write and the comparison seems like cave painting 10,000 years BC v.s. Modern English. Much more sophisticated. Maybe this is also where I am loosing it. You have the brain of a professional coder. I am barely a script kiddie. I started using functions and I was amazed with the organization and new superpowers that I was able to get my launch scripts to do. Now it seems that the video like video game was switched from easy to hard. But again I am a totally newb. I don't expect this to be easy.

    • @NicholasJJackson
      @NicholasJJackson 6 ปีที่แล้ว

      TL;DR
      I am a newb.

    • @NicholasJJackson
      @NicholasJJackson 6 ปีที่แล้ว

      Kevin,
      Update!
      I spend the last few days wrapping my head around what you're trying to do here with the syntax. (not 100% sure, but at least am confident. sort of...) It is all pretty foreign sounding to myself, but I really do want to understand. So I ran, and ran, and ran, rockets to space changing this, and changing that, error's literally ALL OVER THE PLACE!... (Don't tell Einstein that insanity is doing the same thing over and over and getting the same result.. and that you should not memorize anything that you can look up... :( I am guilty as sin here...)
      With that said I googles an analogy, I think I have an Idea what you are teaching...
      You tugging what i'm pulling?
      wait, that sounded a little funny let me try another analogy...
      You hitting what i'm pitching?
      ...
      wait... I got told in school once something about catching, and everyone laughed...
      I googled it... so if anyone of the following analogies are congruent to what you believe I am trying to say, please take the liberty to use that one.
      You smelling what im cooking?
      You rocking what im rolling?
      You buying what im selling?
      You drying what im washing?
      You itching what im scratching?
      You leasing what im loaning?
      You puffing what im passing?
      You pasteing what im copying?
      You sipping what im drinking?
      You buttering what im toasting
      You cashing what im checking?
      You catching what im chasing?
      You bagging what im scanning?
      You scanning what im buying?
      You catching what im fishing?
      You checking what im spelling?
      You sniffing what im scratching?
      You smelling what im stepping in?
      You ducking what im dodging?
      You munching what im crunching?
      You sniffing what im spraying?
      You beating what im boxing?
      You snacking what im packing?

    • @NicholasJJackson
      @NicholasJJackson 6 ปีที่แล้ว

      TL;DR
      Are you picking up what i am putting down?

  • @devanshrao8044
    @devanshrao8044 6 ปีที่แล้ว

    How much you earn from your software job ? Please tell it would help me a lot in my life plzzzzzzzzzz. Atleast give an idea . Plzzz

    • @CheersKevin
      @CheersKevin  6 ปีที่แล้ว +3

      Not comfortable sharing that info, but recommend taking a look at Glassdoor and searching for the positions you're interested in. Salary can vary wildly based on location, skill, time in the industry, so take it with a grain of salt. That said, it's a good place to start :)

    • @devanshrao8044
      @devanshrao8044 6 ปีที่แล้ว

      Thanks a lot man you are really good .
      But please tell me , Im 16 and i am thinking computer science , programming , developing etc as career so should I ? Do computer science has future and money ? In future . Btw love your work

    • @lewisfoskett122
      @lewisfoskett122 5 ปีที่แล้ว +4

      @@devanshrao8044 Bit of a late comment but you shouldn't be doing it for the money. You should be doing it because you enjoy it.