Ralathon Posted April 29, 2015 Share Posted April 29, 2015 On the subject of staging logic. Is there a way to detect how much fuel a stage has that is not the current stage? It's easy to figure out how much fuel and thrust the current stage has, but I can't find an easy way to do so for the second/Xth stage.I'm trying to program a universal launch script that will calculate a close to optimal trajectory via linear tangent thrust attitude control. The idea is that the program calculates the trajectory before the launch instead of using some pre programmed trajectory. This way I don't have to rewrite the software every time I build a new launcher (And lose multiple boosters during the testing). But to calculate this I need to know the burn duration and thrust on a stage by stage basis.I could just give all the engines and fuel tanks a tag based on their stage. But I'm wondering if there's a more elegant method. Link to comment Share on other sites More sharing options...
Ziw Posted April 29, 2015 Share Posted April 29, 2015 (edited) On the subject of staging logic. Is there a way to detect how much fuel a stage has that is not the current stage? It's easy to figure out how much fuel and thrust the current stage has, but I can't find an easy way to do so for the second/Xth stage.I'm trying to program a universal launch script that will calculate a close to optimal trajectory via linear tangent thrust attitude control. The idea is that the program calculates the trajectory before the launch instead of using some pre programmed trajectory. This way I don't have to rewrite the software every time I build a new launcher (And lose multiple boosters during the testing). But to calculate this I need to know the burn duration and thrust on a stage by stage basis.I could just give all the engines and fuel tanks a tag based on their stage. But I'm wondering if there's a more elegant method.list engines in engList.for eng in englist{ print eng:stage.}more info here:http://ksp-kos.github.io/KOS_DOC/structures/vessels/part.html?highlight=stage#PART:STAGEJust remember that Engine structure has all the suffixes of Part Edited April 29, 2015 by Ziw Link to comment Share on other sites More sharing options...
Ralathon Posted April 29, 2015 Share Posted April 29, 2015 list engines in engList.for eng in englist{ print eng:stage.}more info here:http://ksp-kos.github.io/KOS_DOC/structures/vessels/part.html?highlight=stage#PART:STAGEJust remember that Engine structure has all the suffixes of PartThanks! Link to comment Share on other sites More sharing options...
Dexter9313 Posted April 29, 2015 Share Posted April 29, 2015 Thanks a lot for the update ! I know that's not that important but I'd like to download it through CKAN so if erendrake could make a proper release I would be glad. Link to comment Share on other sites More sharing options...
luckielordie Posted April 29, 2015 Share Posted April 29, 2015 http://ksp-kos.github.io/KOS_DOC/tutorials/quickstart.html#step-5-add-staging-logicI tried this tutorial tonight and this code kept staging until there were no more left. Link to comment Share on other sites More sharing options...
erendrake Posted April 30, 2015 Author Share Posted April 30, 2015 (edited) [h=3]New Version v0.17.2On GithubNew Hotness[/h]works with 1.0New infernal robotics integrationBetter error reporting[h=3]Old and busted[/h]fixes keyword lexxingEdit: sorry for the soft rollout, we wanted to give a few people the chance to test it. We found some bugs but nothing showstopping. Expect another release in the next few days! Edited April 30, 2015 by erendrake Link to comment Share on other sites More sharing options...
Dunbaratu Posted April 30, 2015 Share Posted April 30, 2015 I tried this tutorial tonight and this code kept staging until there were no more left.The tutorial is pretty old. I'll have to give it another go tomorrow and see how it behaves under 1.0. Link to comment Share on other sites More sharing options...
Dexter9313 Posted April 30, 2015 Share Posted April 30, 2015 [h=3]New Version v0.17.2On GithubNew Hotness[/h]works with 1.0New infernal robotics integrationBetter error reporting[h=3]Old and busted[/h]fixes keyword lexxingEdit: sorry for the soft rollout, we wanted to give a few people the chance to test it. We found some bugs but nothing showstopping. Expect another release in the next few days!Thanks a lot for the release, looking forward to 0.17.3, I think you are speaking among other things about the toolbar logo. Link to comment Share on other sites More sharing options...
FrancoisH Posted April 30, 2015 Share Posted April 30, 2015 Hello there,If the version is the right one on CKAN, I think you forgot to update the KSP AVC file which state it's for the 0.90 version of KSP.Thank you Link to comment Share on other sites More sharing options...
Dexter9313 Posted April 30, 2015 Share Posted April 30, 2015 (edited) Hello there,If the version is the right one on CKAN, I think you forgot to update the KSP AVC file which state it's for the 0.90 version of KSP.Thank you I installed it through CKAN so I think you didn't refresh your references to the repo. Edited April 30, 2015 by Dexter9313 Link to comment Share on other sites More sharing options...
silentdeth Posted April 30, 2015 Share Posted April 30, 2015 [h=3]New Hotness[/h]New infernal robotics integrationWhere can i find documentation for this? Link to comment Share on other sites More sharing options...
erendrake Posted April 30, 2015 Author Share Posted April 30, 2015 Where can i find documentation for this?We havent regenerated our docs yet for 0.17.2 here is a page with some examples https://github.com/KSP-KOS/KOS/blob/0c4787c8ea558ac4466c2f4ffe3e112675b3829f/doc/source/addons/IR.rst Link to comment Share on other sites More sharing options...
leviathan01 Posted April 30, 2015 Share Posted April 30, 2015 Is there a way to get the layout of a ship? Link to comment Share on other sites More sharing options...
erendrake Posted April 30, 2015 Author Share Posted April 30, 2015 Is there a way to get the layout of a ship?define layout. Link to comment Share on other sites More sharing options...
Astral_Nomad Posted April 30, 2015 Share Posted April 30, 2015 I think he means a part list.. Link to comment Share on other sites More sharing options...
naidis Posted April 30, 2015 Share Posted April 30, 2015 anyone suffering crash? i'm surrfering crash but i can't make sure which mod did that. Link to comment Share on other sites More sharing options...
erendrake Posted April 30, 2015 Author Share Posted April 30, 2015 Is there a way to get the layout of a ship?I think he means a part list..If that is the case. yes you can get parts, you can walk the part tree. there are all kinds of part magic you can do - - - Updated - - -anyone suffering crash? i'm surrfering crash but i can't make sure which mod did that.do you get the crash if you are only running kOS? Link to comment Share on other sites More sharing options...
Astral_Nomad Posted April 30, 2015 Share Posted April 30, 2015 Hey guys.. how do get kOS to detect a stage event? Im trying to write a small script that will print the current mass of a craft after each stage sep, but i cant seem to get it to behave. heres an example of the code:set pmg to ship.set stg to 1. // stage counter.until pmg:mass < 1 { on stage { // check if stage has occured (hit space bar) print "Stage "+stg+" Mass = "+round(pmg:mass,2). // prints mass of the current stage. print " ". // forced carriage return set stg to stg + 1. // update count to next stage. }}the problem is that it loops through it, but prints the line endlessly regardless of whether i have staged or not.Help is appreciated. TIA. Link to comment Share on other sites More sharing options...
erendrake Posted April 30, 2015 Author Share Posted April 30, 2015 Hey guys.. how do get kOS to detect a stage event? Im trying to write a small script that will print the current mass of a craft after each stage sep, but i cant seem to get it to behave. heres an example of the code:set pmg to ship.set stg to 1. // stage counter.until pmg:mass < 1 { on stage { // check if stage has occured (hit space bar) print "Stage "+stg+" Mass = "+round(pmg:mass,2). // prints mass of the current stage. print " ". // forced carriage return set stg to stg + 1. // update count to next stage. }}the problem is that it loops through it, but prints the line endlessly regardless of whether i have staged or not.Help is appreciated. TIA.You should be able to see what stage number you are currently on with the following structure.http://ksp-kos.github.io/KOS_DOC/structures/vessels/stage.html?highlight=stageif the number increases you know you staged. Link to comment Share on other sites More sharing options...
Astral_Nomad Posted April 30, 2015 Share Posted April 30, 2015 okay. thanks. that helps. Link to comment Share on other sites More sharing options...
Kesselya Posted April 30, 2015 Share Posted April 30, 2015 The tutorial is pretty old. I'll have to give it another go tomorrow and see how it behaves under 1.0.I ran through the tutorial today, and it worked perfectly. Link to comment Share on other sites More sharing options...
leviathan01 Posted April 30, 2015 Share Posted April 30, 2015 define layout.like how far a engine is from the CoM. Link to comment Share on other sites More sharing options...
Dunbaratu Posted April 30, 2015 Share Posted April 30, 2015 For all the people trying to measure how long a burn in vacuum should take (for example to decide how soon to start the burn for a maneuver node), this is of interest:https://github.com/KSP-KOS/KOS/issues/940We'll work on a fix for the next patch release. The API changed in 1.0 because the modelling of engines is now different. They no longer have a single max thrust value - it depends on air present. Link to comment Share on other sites More sharing options...
leviathan01 Posted May 1, 2015 Share Posted May 1, 2015 is there or will there be a warp to command? Link to comment Share on other sites More sharing options...
Bizz Keryear Posted May 1, 2015 Share Posted May 1, 2015 I dunno why but I still get a message that is build for 0.90 KSP Add-on checker GUI.Maybe you haven't forget to update the file that sets this number? Link to comment Share on other sites More sharing options...
Recommended Posts