From a2c3bc05373b9392e36d8c736c0ef6de841f5538 Mon Sep 17 00:00:00 2001
From: Randy Mackay <rmackay9@yahoo.com>
Date: Tue, 25 Jun 2013 22:14:56 +0900
Subject: [PATCH] Copter: calculate home position and bearing when we have 2D
 Fix

---
 ArduCopter/navigation.pde | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde
index 7aa230bdc..286460c74 100644
--- a/ArduCopter/navigation.pde
+++ b/ArduCopter/navigation.pde
@@ -68,7 +68,7 @@ static void calc_distance_and_bearing()
     }
 
     // calculate home distance and bearing
-    if( ap.home_is_set && g_gps->status() == GPS::GPS_OK_FIX_3D ) {
+    if( ap.home_is_set && (g_gps->status() == GPS::GPS_OK_FIX_3D || g_gps->status() == GPS::GPS_OK_FIX_2D)) {
         home_distance = pythagorous2(curr.x, curr.y);
         home_bearing = pv_get_bearing_cd(curr,Vector3f(0,0,0));
 
-- 
GitLab