AP_GPS: fixed use of pow()

This commit is contained in:
Andrew Tridgell 2018-05-04 12:06:08 +10:00
parent 86e85a7089
commit 4e1d310959

View File

@ -303,8 +303,8 @@ AP_GPS_SBP2::_attempt_state_update()
state.ground_course = wrap_360(degrees(atan2f(state.velocity[1], state.velocity[0])));
state.speed_accuracy = safe_sqrt(
pow((float)last_vel_ned.h_accuracy * 1.0e-3f, 2) +
pow((float)last_vel_ned.v_accuracy * 1.0e-3f, 2));
powf((float)last_vel_ned.h_accuracy * 1.0e-3f, 2) +
powf((float)last_vel_ned.v_accuracy * 1.0e-3f, 2));
state.horizontal_accuracy = (float) last_pos_llh.h_accuracy * 1.0e-3f;
state.vertical_accuracy = (float) last_pos_llh.v_accuracy * 1.0e-3f;