Browse Source

ekf2: fix code style

sbg
bugobliterator 9 years ago committed by Roman
parent
commit
0f43a1ebbb
  1. 7
      src/modules/ekf2/ekf2_main.cpp

7
src/modules/ekf2/ekf2_main.cpp

@ -296,6 +296,7 @@ void Ekf2::task_main() @@ -296,6 +296,7 @@ void Ekf2::task_main()
// fetch sensor data in next loop
continue;
} else if (!(fds[0].revents & POLLIN)) {
// no new data
continue;
@ -327,6 +328,7 @@ void Ekf2::task_main() @@ -327,6 +328,7 @@ void Ekf2::task_main()
// Use the control model data to determine if the motors are armed as a surrogate for an on-ground vs in-air status
// TODO implement a global vehicle on-ground/in-air check
orb_check(_control_mode_sub, &control_mode_updated);
if (control_mode_updated) {
orb_copy(ORB_ID(vehicle_control_mode), _control_mode_sub, &vehicle_control_mode);
_ekf->set_arm_status(vehicle_control_mode.flag_armed);
@ -413,8 +415,9 @@ void Ekf2::task_main() @@ -413,8 +415,9 @@ void Ekf2::task_main()
// Position of local NED origin in GPS / WGS84 frame
struct map_projection_reference_s ekf_origin = {};
_ekf->get_ekf_origin(&lpos.ref_timestamp,&ekf_origin,&lpos.ref_alt);
lpos.xy_global = _ekf->position_is_valid(); // true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
_ekf->get_ekf_origin(&lpos.ref_timestamp, &ekf_origin, &lpos.ref_alt);
lpos.xy_global =
_ekf->position_is_valid(); // true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
lpos.z_global = true; // true if z is valid and has valid global reference (ref_alt)
lpos.ref_lat = ekf_origin.lat_rad * 180.0 / M_PI; // Reference point latitude in degrees
lpos.ref_lon = ekf_origin.lon_rad * 180.0 / M_PI; // Reference point longitude in degrees

Loading…
Cancel
Save