diff --git a/flight/Modules/PathPlanner/pathplanner.c b/flight/Modules/PathPlanner/pathplanner.c
index c8de75d01..2b9f3022b 100644
--- a/flight/Modules/PathPlanner/pathplanner.c
+++ b/flight/Modules/PathPlanner/pathplanner.c
@@ -128,6 +128,14 @@ static void pathPlannerTask(void *parameters)
positionDesired.East = waypoint.Position[WAYPOINT_POSITION_EAST];
positionDesired.Down = waypoint.Position[WAYPOINT_POSITION_DOWN];
PositionDesiredSet(&positionDesired);
+ } else if (waypointAction == WAYPOINT_ACTION_RTH) {
+ // Fly back to the home location but 20 m above it
+ PositionDesiredData positionDesired;
+ PositionDesiredGet(&positionDesired);
+ positionDesired.North = 0;
+ positionDesired.East = 0;
+ positionDesired.Down = -20;
+ PositionDesiredSet(&positionDesired);
}
}
vTaskDelay(10);
diff --git a/shared/uavobjectdefinition/waypoint.xml b/shared/uavobjectdefinition/waypoint.xml
index 270a85aba..598fe0f67 100644
--- a/shared/uavobjectdefinition/waypoint.xml
+++ b/shared/uavobjectdefinition/waypoint.xml
@@ -4,7 +4,7 @@
-
+