Jump to content

[1.3] kOS Scriptable Autopilot System v1.1.3.0


erendrake

Recommended Posts

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

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:STAGE

Just remember that Engine structure has all the suffixes of Part

Edited by Ziw
Link to comment
Share on other sites

[h=3]New Version v0.17.2

On Github

New Hotness[/h]

  • works with 1.0
  • New infernal robotics integration
  • Better error reporting

[h=3]Old and busted[/h]

  • fixes keyword lexxing

Edit: 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 by erendrake
Link to comment
Share on other sites

[h=3]New Version v0.17.2

On Github

New Hotness[/h]

  • works with 1.0
  • New infernal robotics integration
  • Better error reporting

[h=3]Old and busted[/h]

  • fixes keyword lexxing

Edit: 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

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 by Dexter9313
Link to comment
Share on other sites

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

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

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=stage

if the number increases you know you staged.

Link to comment
Share on other sites

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/940

We'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

Guest
This topic is now closed to further replies.
×
×
  • Create New...