kopia lustrzana https://github.com/IzzyBrand/spaceplane
companion prints altitude descended
rodzic
dcf4c8269f
commit
963c321cae
|
@ -73,8 +73,9 @@ while True:
|
|||
alt_buffer[alt_buffer_ind] = alt
|
||||
alt_buffer_ind += 1
|
||||
alt_buffer_ind = alt_buffer_ind % alt_buffer_len
|
||||
if (alt - alt_buffer[alt_buffer_ind] < -50):
|
||||
print 'WARNING: descended 50m in 60 seconds. Disconnecting.'
|
||||
alt_diff = alt - alt_buffer[alt_buffer_ind]
|
||||
if (alt_diff < -50):
|
||||
print 'WARNING: descended {}m in 60 seconds. Disconnecting.'.format(alt_diff)
|
||||
break
|
||||
|
||||
if alt < BURN_ALTITUDE:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
PORT = '/dev/tty.usbmodem1' # whic port the pixhawk is on
|
||||
BURN_PIN = 27 # pin with burn relay
|
||||
BURN_ALTITUDE = 1.5 # altitude at which to burn
|
||||
BURN_ALTITUDE = 10 # altitude at which to burn
|
||||
BURN_TIME_ABOVE = 10 # time above burn alt before ignite
|
||||
BURN_TIME_BELOW = 3 # time below burn alt after ignite
|
||||
TARGET_LAT = 42.345131 # desired landing latitude
|
||||
|
|
Ładowanie…
Reference in New Issue