split into get_terrain_valid and get_terrain_vert_pos

This commit is contained in:
ChristophTobler
2017-07-17 16:42:42 +02:00
parent c42f820072
commit eae0522dc2
4 changed files with 19 additions and 13 deletions
+1 -2
View File
@@ -1040,8 +1040,7 @@ void Ekf::get_ekf_soln_status(uint16_t *status)
soln_status.flags.pos_horiz_rel = (_control_status.flags.gps || _control_status.flags.ev_pos || _control_status.flags.opt_flow) && (_fault_status.value == 0);
soln_status.flags.pos_horiz_abs = (_control_status.flags.gps || _control_status.flags.ev_pos) && (_fault_status.value == 0);
soln_status.flags.pos_vert_abs = soln_status.flags.velocity_vert;
float dummy_var;
soln_status.flags.pos_vert_agl = get_terrain_vert_pos(&dummy_var);
soln_status.flags.pos_vert_agl = get_terrain_valid();
soln_status.flags.const_pos_mode = !soln_status.flags.velocity_horiz;
soln_status.flags.pred_pos_horiz_rel = soln_status.flags.pos_horiz_rel;
soln_status.flags.pred_pos_horiz_abs = soln_status.flags.pos_vert_abs;