Fix up hover script and improve bootloading.
This commit is contained in:
@ -1,15 +1,9 @@
|
||||
// Check for various sensors and set appropriate global constants.
|
||||
// Currently only checks for grav sensor, as that's the only one used by this library.
|
||||
// global HAS_GRAV_SENSOR is false.
|
||||
// function SensorCheck {
|
||||
// local SensorList is 0.
|
||||
// list SENSORS in SensorList.
|
||||
// for s in SensorList {
|
||||
// if s:type = "grav" {
|
||||
// print "Gravometric sensor detected".
|
||||
// set HAS_GRAV_SENSOR to true.
|
||||
// return.
|
||||
// }
|
||||
// }
|
||||
// set HAS_GRAV_SENSOR to false.
|
||||
// }
|
||||
// This alternative approach to hovering is ultimately not worth the complexity to use, but it's really neat! It maintains *whatever your current vertical velocity is* using the fact that F = μ*m/(r^2).
|
||||
// In practice, by the time the PID controller settles enough to make this worth
|
||||
// using, the efficiency gains have mostly dried up anyway.
|
||||
|
||||
// lock STEERING to SHIP:UP.
|
||||
// wait until done or abs(SHIP:VERTICALSPEED - vertSpeed) < 0.05.
|
||||
// print "Maintaining velocity.".
|
||||
// lock targetForce to (SHIP:BODY:MU * SHIP:MASS) / ((SHIP:ALTITUDE + SHIP:BODY:RADIUS)^2).
|
||||
// lock THROTTLE to targetForce / SHIP:AVAILABLETHRUST.
|
||||
|
Reference in New Issue
Block a user