ascentController
AscentController is a vector oriented controller, it contains methods that will guide your rocket during the very first stage of flight - an ascent. Currently capable only of launch due to east(heading(90, x)).
Table of contents:
Constructing
| parameters | type | default | Description |
|---|---|---|---|
| desiredAp | float | - | Desired apoapsis |
| pitchVelocity* | float | 80 | Velocity at which pitchover will start |
| pitchDegrees* | float | 10 | By how many degress to pitchover |
| aoa* | float | 5 | Angle of Attack relative to prograde |
* optional parameters
Public methods
| public methods | return type | Description |
|---|---|---|
| getSteering() | Direction | returns steering direction |
| getThrottle() | Float | returns throttle precentage |
| completed() | Boolean | is apoapsis larger than desired? |
| passControl(bool) | None | passes control |
getSteering()
No parameters
Returns steering direction.
getThrottle()
No parameters
Returns throttle percentage.
completed()
No parameters
By default returns if current ship:apoapsis is larger than desired apoapsis defined when constructing.
passControl(bool)
Parameters:
- isUnlocking:Boolean -> should
throttleandsteeringbe unlocked?
Takes control over both steering and throttle until completed() returns true.
Code examples
// contructing without optional parameters
local ascent is ascentController(30000).
// passing control
ascent["passControl"](false)
// ascent completed// contructing with optional parameters
local ascent is ascentController(37000, 90, 10, 5).
// manually defining control
lock steering to ascent["getSteering"]().
lock throttle to ascent["getThrottle"]().
wait until ascent["completed"]().
// ascent completed