Skip to content

Commit

Permalink
Navigator: DDifferentiatee between min loiter alt and min takeoff alt…
Browse files Browse the repository at this point in the history
…. Reduce both by default
  • Loading branch information
LorenzMeier committed Mar 14, 2016
1 parent d81d0c2 commit cab8950
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/modules/navigator/loiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

Loiter::Loiter(Navigator *navigator, const char *name) :
MissionBlock(navigator, name),
_param_min_alt(this, "MIS_TAKEOFF_ALT", false)
_param_min_alt(this, "MIS_LTRMIN_ALT", false)
{
/* load initial params */
updateParams();
Expand Down
35 changes: 28 additions & 7 deletions src/modules/navigator/mission_params.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2014 PX4 Development Team. All rights reserved.
* Copyright (c) 2014-2015 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -50,9 +50,23 @@
* MIS_TAKEOFF_ALT on takeoff, then go to waypoint.
*
* @unit meters
* @min 0
* @max 80
* @group Mission
*/
PARAM_DEFINE_FLOAT(MIS_TAKEOFF_ALT, 1.2f);

/**
* Minimum Loiter altitude
*
* This is the minimum altitude the system will always obey. The intent is to stay out of ground effect.
*
* @unit meters
* @min 0
* @max 80
* @group Mission
*/
PARAM_DEFINE_FLOAT(MIS_TAKEOFF_ALT, 2.5f);
PARAM_DEFINE_FLOAT(MIS_LTRMIN_ALT, 1.2f);

/**
* Enable persistent onboard mission storage
Expand All @@ -62,6 +76,8 @@ PARAM_DEFINE_FLOAT(MIS_TAKEOFF_ALT, 2.5f);
*
* @min 0
* @max 1
* @value 0 Disabled
* @value 1 Enabled
* @group Mission
*/
PARAM_DEFINE_INT32(MIS_ONBOARD_EN, 1);
Expand All @@ -88,22 +104,23 @@ PARAM_DEFINE_FLOAT(MIS_DIST_1WP, 900);
*
* @min 0
* @max 1
* @value 0 Zero Order Hold
* @value 1 First Order Hold
* @group Mission
*/
PARAM_DEFINE_INT32(MIS_ALTMODE, 1);

/**
* Multirotor only. Yaw setpoint mode.
*
* 0: Set the yaw heading to the yaw value specified for the destination waypoint.
* 1: Maintain a yaw heading pointing towards the next waypoint.
* 2: Maintain a yaw heading that always points to the home location.
* 3: Maintain a yaw heading that always points away from the home location (ie: back always faces home).
*
* The values are defined in the enum mission_altitude_mode
*
* @min 0
* @max 3
* @value 0 Heading as set by waypoint
* @value 1 Heading towards waypoint
* @value 2 Heading towards home
* @value 3 Heading away from home
* @group Mission
*/
PARAM_DEFINE_INT32(MIS_YAWMODE, 1);
Expand All @@ -118,6 +135,8 @@ PARAM_DEFINE_INT32(MIS_YAWMODE, 1);
*
* @min -1
* @max 20
* @unit second
* @increment 1
* @group Mission
*/
PARAM_DEFINE_FLOAT(MIS_YAW_TMT, -1.0f);
Expand All @@ -127,6 +146,8 @@ PARAM_DEFINE_FLOAT(MIS_YAW_TMT, -1.0f);
*
* @min 0
* @max 90
* @unit degree
* @increment 1
* @group Mission
*/
PARAM_DEFINE_FLOAT(MIS_YAW_ERR, 12.0f);

0 comments on commit cab8950

Please sign in to comment.