Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

(request) natural log function: ln(x). #236

Open Dunbaratu opened 10 years ago

Dunbaratu commented 10 years ago

There are places that feature "e" in calculations of air pressure and terminal velocity. And it would be handy to be able to run the natural log function: '''ln(x)'''

Basically if you want to know "what is the air pressure at altitude X" you end up taking 'e' to the power of something based on altitude, so if you want to go the other way around and ask "at what altitude will the air pressure be X?" then you have to execute a natural log.

I have one program where at the moment I'm actually approximating the natural log with a series in order to calculate the altitude at which I'd like to start the gravity turn based on the idea that i'd like to do so where the pressure is about 0.2 or so.