companion prints altitude descended

master
Izzy Brand 2018-01-10 14:23:12 -05:00
rodzic dcf4c8269f
commit 963c321cae
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -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