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...
please never stop making videos. Your narration is kinda immaculate
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.
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
Thanks for this, both of you! Great catch - we'll tidy it up in the next video :)
You're welcome :)
SAS off.
no need to get function fancy over this one :P
Whoa! You re back again! Wish you never stop making your awesome KSP series.
Your voice is perfect. You need to do some Lynda classes.
Wow,
I never thought I would be so engrossed in watching someone write code.
Loving this new series. Now if we could just warp ahead to your next video ...
Dude, you are as smart as funny!!!
Got me subscribed!
Yay more KOS programming :D
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?
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.
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
Its not working...?
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
Choose it if you like doing it cos you don't want to be earning over 100k a year and be miserable.
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.
Are you and quill18 the same person. Your tutorial styles, voices and sudo code are very similar
mine says undefined variable name mnv
Rewrote my code and it works now
From the ending of the last video when you started with the Pseudocode, and now this one... I am starting to get lost :\
Heya! Sorry to hear that - are there particular areas that could use more explanation? Wanna make sure this is as accessible as possible.
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.
TL;DR
I am a newb.
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?
TL;DR
Are you picking up what i am putting down?
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
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 :)
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
@@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.