|
|
|
@ -66,7 +66,8 @@ static void calc_home_distance_and_bearing()
@@ -66,7 +66,8 @@ static void calc_home_distance_and_bearing()
|
|
|
|
|
// calculate home distance and bearing |
|
|
|
|
if (position_ok()) { |
|
|
|
|
home_distance = pythagorous2(curr.x, curr.y); |
|
|
|
|
home_bearing = pv_get_bearing_cd(curr,Vector3f(0,0,0)); |
|
|
|
|
Vector3f home = pv_location_to_vector(ahrs.get_home()); |
|
|
|
|
home_bearing = pv_get_bearing_cd(curr,home); |
|
|
|
|
|
|
|
|
|
// update super simple bearing (if required) because it relies on home_bearing |
|
|
|
|
update_super_simple_bearing(false); |
|
|
|
|