Compute RTL time and react if lower than flight time

- Compute RTL time also during RTL
- Calculate correct altitude when finding destination
This commit is contained in:
Matthias Grob
2021-11-24 14:10:24 +01:00
parent 5489005e0b
commit c522a8b15a
9 changed files with 324 additions and 148 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ set(msg_files
rc_channels.msg
rc_parameter_map.msg
rpm.msg
rtl_flight_time.msg
rtl_time_estimate.msg
safety.msg
satellite_info.msg
sensor_accel.msg
-4
View File
@@ -1,4 +0,0 @@
uint64 timestamp # time since system start (microseconds)
float32 rtl_time_s # how long in seconds will the RTL take
float32 rtl_limit_fraction # what fraction of the allowable RTL time would be taken
+5
View File
@@ -0,0 +1,5 @@
uint64 timestamp # time since system start (microseconds)
bool valid # Flag indicating whether the time estiamtes are valid
float32 time_estimate # [s] Estimated time for RTL
float32 safe_time_estimate # [s] Same as time_estimate, but with safety factor and safety margin included (factor*t + margin)