In this section we’re going to build our very first script that uses FALL module.
It’s assumed that you’re using stock KSP aerodynamic model and know the basics of
Kerbal Operating System mod.
Goals and requirements
Mission sequence:
Liftoff
Pitchover at velocity of 90 m/s, by 10 degrees with 3 degrees aoa
Ascent until apoapsis > 8000 meters and then turn off the engine
Land safely
Rocket should:
Have RCS thrusters, preferably at the top
Be able to turn retrograde when falling
What do we need?
Because our goal is to perform an ascent and then safely touchdown, we’re going
to use only two structures:
ascentController
hoverslamModel
Implementation
First let’s import the structures we need:
Now we initialize new ascentController object with previously defined parameters:
Short launch sequence(assuming the rocket is held by clamps) can be written as:
Rocket is now lifting off, but isn’t steered in any way. Let’s give full control
to our ascent object:
At this stage the rocket will perform ascent until apoapsis(8000 meters) goal is reached. Then the engine will shutdown. Oh no!
Don’t panic. First we will turn retrograde, and wait until the rocket is falling.
And now we will safely land thanks to the magic(not really) of hoverlsamModel object: