KSP-KOS / KSLib

The standard library and examples for the Kerboscript language
MIT License
120 stars 40 forks source link

Fixes #86 #87

Closed space-is-hard closed 9 years ago

space-is-hard commented 9 years ago

Also includes formatting changes (the single-space indents and mixed uppercase and lowercase keywords were making me twitch).

ALSO Changes input altitude from being in kilometers to just meters. When lazcalc was created, functions did not yet exist. The intended use was to supplement manual flying, where the user was to run the script from the terminal and it would tell them what direction to launch towards. This meant that it was easier to just punch in run lazcalc(200, 53.6) and fly it as best as you could. Having to worry about if you got the number of digits correct wasn't what I wanted, as you most likely weren't going to be that accurate with manual flying anyways.

But lazcalc has evolved into a tool that fully-automatic launcher scripts can use to precisely nail a specified inclination, and those scripts tend to work in the native unit of meters for accuracy purposes. I figure that now we can make it easier on the script makers, and if they want to make it easy for the user by letting them input the target altitude in kilometers, it can be on them to convert to meters before passing the value to lazcalc.

Todo: