KontrolSystem2 icon indicating copy to clipboard operation
KontrolSystem2 copied to clipboard

issue with TWR algorithm

Open MathewUlanowski opened this issue 1 year ago • 1 comments

It appears that if the throttle is set to 0 it registers the current TWR as the current max possible TWR steps to replecate this issue

  1. have code that uses the TWR value example below
use { Vessel, DeltaVSituation } from ksp::vessel
use { CONSOLE } from ksp::console
use { current_time, sleep, yield } from ksp::game
use { add_time_series } from ksp::telemetry

pub fn main_flight( vessel: Vessel) -> Result<Unit, string> = {
    while(true)
    {
        let twr = vessel.delta_v.stage(vessel.staging.current).value.get_TWR(DeltaVSituation.Altitude)
        CONSOLE.print_at(3,3,"TWR: " + twr.to_string())

        yield()
    }
}
  1. set the throttle to 0 and observe the max TWR
  2. increase the throttle and it displays the current TWR

MathewUlanowski avatar May 04 '24 02:05 MathewUlanowski

I am not sure this could be easily fixed as I am using the the algorithm from the game. I.e. the value returned by the API should be the same as displayed in the game UI for the stage-information.

untoldwind avatar May 05 '24 06:05 untoldwind

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jul 05 '24 02:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 20 '24 01:07 github-actions[bot]