kRPC: Control the game using C#, C++, Java, Lua, Python...

kRPC: Control the game using C#, C++, Java, Lua, Python...

7.8k Downloads

Time to atmosphere?

JoePShoulak opened this issue ยท 4 comments

commented

Is there an option under orbit, active_vessel, or body from which the time to the atmosphere can be determined? I'm trying to make a function that warps to the atmosphere and I'm close to doing a binary trial-and-error reduction to find the point where the ship would be an altitude matching body atmosphere depth.

commented

are you trying to write something like a reentry script. You could stream the enum VesselSituation and check if the vessel is considered "flying" which is within atmosphere

commented

I think kRPC provides you with all the information that would be required to calculate this.

You could use math similar to what's done here: http://www.jaschwartz.net/ksp_atm_entry/

commented

Isn't there an atmosphereDepth function in CelesialBody and the vessel's altitude in Flight? Or am I missing what you are trying to do?

commented

There is, but I'm not sure to calculate the time to atmospheric entry from those numbers.