Tools: replace location_offset() and get_distance() function calls with Location object member function calls

This allows removing duplicated code
This commit is contained in:
Dr.-Ing. Amilcar do Carmo Lucas 2019-02-25 01:12:26 +01:00 committed by Peter Barker
parent 3fd5e05601
commit edac5e1a80
1 changed files with 1 additions and 1 deletions

View File

@ -768,7 +768,7 @@ void Replay::log_check_solution(void)
float pitch_error = degrees(fabsf(euler.y - check_state.euler.y));
float yaw_error = wrap_180_cd(100*degrees(fabsf(euler.z - check_state.euler.z)))*0.01f;
float vel_error = (velocity - check_state.velocity).length();
float pos_error = get_distance(check_state.pos, loc);
float pos_error = check_state.pos.get_distance(loc);
check_result.max_roll_error = MAX(check_result.max_roll_error, roll_error);
check_result.max_pitch_error = MAX(check_result.max_pitch_error, pitch_error);