glideController

GlideController is a vector oriented controller, it contains methods that will guide your rocket through glide towards target maneuver. During the descent glidePIDController will adjust the course only through means of control surfaces and RCS controls.

Table of contents:

Contructing

parameters type default Description
ldata landingDataModel - landingDataModel constructed with desired landing position
aoa* float 10 max angle of attack relative to retrograde vector
errorScaling* float 1 how sensitive the controller is to error

* optional parameters

Public methods

public methods return type Description
getSteering() Direction returns steering direction
getThrottle() Float returns 0
completed() Boolean is throttle larger than 0?
passControl(bool) None passes control

getSteering()

No parameters

Returns steering direction.


getThrottle()

No parameters

Because gliding is unpowered flight, always returns 0.


completed()

No parameters

Returns true if throttle is larger than 0.


passControl(bool)

Parameters:

  • isUnlocking::Boolean -> should throttle and steering be unlocked?

Takes control over both steering and throttle until completed() returns true.


Code examples


local ldata is landingDataModel(target:geoposition).
local glide is glideController(ldata).

lock steering to glide["getSteering"]().
local ldata is landingDataModel(target:geoposition).
// max aoa of 5
local glide is glideController(ldata, 5).

lock steering to glide["getSteering"]().