mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-17 13:25:27 +03:00
WP mission Home WP option (#6920)
* Initial build
* Add new waypoint type FlyBy Home (FBH)
* Revert "Add new waypoint type FlyBy Home (FBH)"
This reverts commit a37dec5695
.
* Remove FBH WP type, use Home flag instead
* Fixes
This commit is contained in:
parent
940169cf82
commit
1b2d75dec7
3 changed files with 23 additions and 15 deletions
|
@ -2933,8 +2933,15 @@ static void mapWaypointToLocalPosition(fpVector3_t * localPos, const navWaypoint
|
|||
{
|
||||
gpsLocation_t wpLLH;
|
||||
|
||||
wpLLH.lat = waypoint->lat;
|
||||
wpLLH.lon = waypoint->lon;
|
||||
/* Default to home position if lat & lon = 0 or HOME flag set
|
||||
* Applicable to WAYPOINT, HOLD_TIME & LANDING WP types */
|
||||
if ((waypoint->lat == 0 && waypoint->lon == 0) || waypoint->flag == NAV_WP_FLAG_HOME) {
|
||||
wpLLH.lat = GPS_home.lat;
|
||||
wpLLH.lon = GPS_home.lon;
|
||||
} else {
|
||||
wpLLH.lat = waypoint->lat;
|
||||
wpLLH.lon = waypoint->lon;
|
||||
}
|
||||
wpLLH.alt = waypoint->alt;
|
||||
|
||||
geoConvertGeodeticToLocal(localPos, &posControl.gpsOrigin, &wpLLH, altConv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue