1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00
LibrePilot/flight/libraries/plans.c

784 lines
30 KiB
C
Raw Normal View History

/**
******************************************************************************
*
* @file plan.c
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2015.
*
* @brief setups RTH/PH and other pathfollower/pathplanner status
*
* @see The GNU Public License (GPL) Version 3
*
* @addtogroup LibrePilotLibraries LibrePilot Libraries Navigation
******************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <plans.h>
#include <openpilot.h>
#include <attitudesettings.h>
#include <takeofflocation.h>
#include <pathdesired.h>
#include <positionstate.h>
#include <flightmodesettings.h>
#include <flightstatus.h>
#include <velocitystate.h>
#include <manualcontrolcommand.h>
#include <attitudestate.h>
#include <vtolpathfollowersettings.h>
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
#include <stabilizationbank.h>
#include <stabilizationdesired.h>
#include <sin_lookup.h>
#include <sanitycheck.h>
#include <statusvtolautotakeoff.h>
#define UPDATE_EXPECTED 0.02f
#define UPDATE_MIN 1.0e-6f
#define UPDATE_MAX 1.0f
#define UPDATE_ALPHA 1.0e-2f
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
static float applyExpo(float value, float expo);
static float applyExpo(float value, float expo)
{
// note: fastPow makes a small error, therefore result needs to be bound
float exp = boundf(fastPow(1.00695f, expo), 0.5f, 2.0f);
// magic number scales expo
// so that
// expo=100 yields value**10
// expo=0 yields value**1
// expo=-100 yields value**(1/10)
// (pow(2.0,1/100)~=1.00695)
if (value > 0.0f) {
return boundf(fastPow(value, exp), 0.0f, 1.0f);
} else if (value < -0.0f) {
return boundf(-fastPow(-value, exp), -1.0f, 0.0f);
} else {
return 0.0f;
}
}
/**
* @brief initialize UAVOs and structs used by this library
*/
void plan_initialize()
{
TakeOffLocationInitialize();
PositionStateInitialize();
PathDesiredInitialize();
FlightModeSettingsInitialize();
FlightStatusInitialize();
AttitudeStateInitialize();
ManualControlCommandInitialize();
VelocityStateInitialize();
VtolPathFollowerSettingsInitialize();
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
StabilizationBankInitialize();
StabilizationDesiredInitialize();
}
/**
* @brief setup pathplanner/pathfollower for positionhold
*/
void plan_setup_positionHold()
{
PositionStateData positionState;
PositionStateGet(&positionState);
PathDesiredData pathDesired;
// re-initialise in setup stage
memset(&pathDesired, 0, sizeof(PathDesiredData));
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
pathDesired.End.North = positionState.North;
pathDesired.End.East = positionState.East;
pathDesired.End.Down = positionState.Down;
pathDesired.Start.North = positionState.North + offset.Horizontal; // in FlyEndPoint the direction of this vector does not matter
pathDesired.Start.East = positionState.East;
pathDesired.Start.Down = positionState.Down;
pathDesired.StartingVelocity = 0.0f;
pathDesired.EndingVelocity = 0.0f;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
pathDesired.Mode = PATHDESIRED_MODE_GOTOENDPOINT;
PathDesiredSet(&pathDesired);
}
/**
* @brief setup pathplanner/pathfollower for return to base
*/
void plan_setup_returnToBase()
{
// Simple Return To Base mode - keep altitude the same applying configured delta, fly to takeoff position
float positionStateDown;
PositionStateDownGet(&positionStateDown);
PathDesiredData pathDesired;
// re-initialise in setup stage
memset(&pathDesired, 0, sizeof(PathDesiredData));
TakeOffLocationData takeoffLocation;
TakeOffLocationGet(&takeoffLocation);
// TODO: right now VTOLPF does fly straight to destination altitude.
// For a safer RTB destination altitude will be the higher between takeofflocation and current position (corrected with safety margin)
float destDown;
FlightModeSettingsReturnToBaseAltitudeOffsetGet(&destDown);
destDown = MIN(positionStateDown, takeoffLocation.Down) - destDown;
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
pathDesired.End.North = takeoffLocation.North;
pathDesired.End.East = takeoffLocation.East;
pathDesired.End.Down = destDown;
pathDesired.Start.North = takeoffLocation.North + offset.Horizontal; // in FlyEndPoint the direction of this vector does not matter
pathDesired.Start.East = takeoffLocation.East;
pathDesired.Start.Down = destDown;
pathDesired.StartingVelocity = 0.0f;
pathDesired.EndingVelocity = 0.0f;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
FlightModeSettingsReturnToBaseNextCommandOptions ReturnToBaseNextCommand;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
FlightModeSettingsReturnToBaseNextCommandGet(&ReturnToBaseNextCommand);
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_GOTOENDPOINT_NEXTCOMMAND] = (float)ReturnToBaseNextCommand;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_GOTOENDPOINT_UNUSED1] = 0.0f;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_GOTOENDPOINT_UNUSED2] = 0.0f;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_GOTOENDPOINT_UNUSED3] = 0.0f;
pathDesired.Mode = PATHDESIRED_MODE_GOTOENDPOINT;
PathDesiredSet(&pathDesired);
}
void plan_setup_AutoTakeoff()
{
PathDesiredData pathDesired;
2016-04-25 17:37:06 +02:00
memset(&pathDesired, 0, sizeof(PathDesiredData));
PositionStateData positionState;
PositionStateGet(&positionState);
float autotakeoff_height;
FlightModeSettingsAutoTakeOffHeightGet(&autotakeoff_height);
autotakeoff_height = fabsf(autotakeoff_height);
pathDesired.Start.North = positionState.North;
pathDesired.Start.East = positionState.East;
pathDesired.Start.Down = positionState.Down;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_AUTOTAKEOFF_NORTH] = 0.0f;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_AUTOTAKEOFF_EAST] = 0.0f;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_AUTOTAKEOFF_DOWN] = 0.0f;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_AUTOTAKEOFF_CONTROLSTATE] = 0.0f;
pathDesired.End.North = positionState.North;
pathDesired.End.East = positionState.East;
pathDesired.End.Down = positionState.Down - autotakeoff_height;
pathDesired.StartingVelocity = 0.0f;
pathDesired.EndingVelocity = 0.0f;
pathDesired.Mode = PATHDESIRED_MODE_AUTOTAKEOFF;
PathDesiredSet(&pathDesired);
}
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
static void plan_setup_land_helper(PathDesiredData *pathDesired)
{
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
PositionStateData positionState;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
PositionStateGet(&positionState);
float velocity_down;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
FlightModeSettingsLandingVelocityGet(&velocity_down);
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
pathDesired->Start.North = positionState.North;
pathDesired->Start.East = positionState.East;
pathDesired->Start.Down = positionState.Down;
pathDesired->ModeParameters[PATHDESIRED_MODEPARAMETER_LAND_VELOCITYVECTOR_NORTH] = 0.0f;
pathDesired->ModeParameters[PATHDESIRED_MODEPARAMETER_LAND_VELOCITYVECTOR_EAST] = 0.0f;
pathDesired->ModeParameters[PATHDESIRED_MODEPARAMETER_LAND_VELOCITYVECTOR_DOWN] = velocity_down;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
pathDesired->End.North = positionState.North;
pathDesired->End.East = positionState.East;
pathDesired->End.Down = positionState.Down;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
pathDesired->StartingVelocity = 0.0f;
pathDesired->EndingVelocity = 0.0f;
pathDesired->Mode = PATHDESIRED_MODE_LAND;
pathDesired->ModeParameters[PATHDESIRED_MODEPARAMETER_LAND_OPTIONS] = (float)PATHDESIRED_MODEPARAMETER_LAND_OPTION_HORIZONTAL_PH;
}
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
void plan_setup_land()
{
PathDesiredData pathDesired;
// re-initialise in setup stage
memset(&pathDesired, 0, sizeof(PathDesiredData));
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
plan_setup_land_helper(&pathDesired);
PathDesiredSet(&pathDesired);
}
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
static void plan_setup_land_from_velocityroam()
{
plan_setup_land();
FlightStatusAssistedControlStateOptions assistedControlFlightMode;
assistedControlFlightMode = FLIGHTSTATUS_ASSISTEDCONTROLSTATE_HOLD;
FlightStatusAssistedControlStateSet(&assistedControlFlightMode);
}
/**
* @brief positionvario functionality
*/
static bool vario_hold = true;
static float hold_position[3];
static float vario_control_lowpass[3];
static float vario_course = 0.0f;
static void plan_setup_PositionVario()
{
vario_hold = true;
vario_control_lowpass[0] = 0.0f;
vario_control_lowpass[1] = 0.0f;
vario_control_lowpass[2] = 0.0f;
AttitudeStateYawGet(&vario_course);
plan_setup_positionHold();
}
void plan_setup_CourseLock()
{
plan_setup_PositionVario();
}
2014-11-08 16:01:59 +01:00
void plan_setup_PositionRoam()
{
plan_setup_PositionVario();
}
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
void plan_setup_VelocityRoam()
{
vario_control_lowpass[0] = 0.0f;
vario_control_lowpass[1] = 0.0f;
vario_control_lowpass[2] = 0.0f;
AttitudeStateYawGet(&vario_course);
}
2014-11-08 16:01:59 +01:00
void plan_setup_HomeLeash()
{
plan_setup_PositionVario();
}
void plan_setup_AbsolutePosition()
{
plan_setup_PositionVario();
}
#define DEADBAND 0.1f
static bool normalizeDeadband(float controlVector[4])
{
bool moving = false;
// roll, pitch, yaw between -1 and +1
// thrust between 0 and 1 mapped to -1 to +1
controlVector[3] = (2.0f * controlVector[3]) - 1.0f;
int t;
for (t = 0; t < 4; t++) {
if (controlVector[t] < -DEADBAND) {
moving = true;
controlVector[t] += DEADBAND;
} else if (controlVector[t] > DEADBAND) {
moving = true;
controlVector[t] -= DEADBAND;
} else {
controlVector[t] = 0.0f;
}
// deadband has been cut out, scale value back to [-1,+1]
controlVector[t] *= (1.0f / (1.0f - DEADBAND));
controlVector[t] = boundf(controlVector[t], -1.0f, 1.0f);
}
return moving;
}
typedef enum { COURSE, FPV, LOS, NSEW } vario_type;
static void getVector(float controlVector[4], vario_type type)
{
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
// scale controlVector[3] (thrust) by vertical/horizontal to have vertical plane less sensitive
controlVector[3] *= offset.Vertical / offset.Horizontal;
float length = sqrtf(controlVector[0] * controlVector[0] + controlVector[1] * controlVector[1] + controlVector[3] * controlVector[3]);
if (length <= 1e-9f) {
length = 1.0f; // should never happen as getVector is not called if control within deadband
}
{
float direction[3] = {
controlVector[1] / length, // pitch is north
controlVector[0] / length, // roll is east
controlVector[3] / length // thrust is down
};
controlVector[0] = direction[0];
controlVector[1] = direction[1];
controlVector[2] = direction[2];
}
controlVector[3] = length * offset.Horizontal;
// rotate north and east - rotation angle based on type
float angle;
switch (type) {
case COURSE:
angle = vario_course;
break;
case NSEW:
angle = 0.0f;
// NSEW no rotation takes place
break;
case FPV:
// local rotation, using current yaw
AttitudeStateYawGet(&angle);
break;
case LOS:
// determine location based on vector from takeoff to current location
{
PositionStateData positionState;
PositionStateGet(&positionState);
TakeOffLocationData takeoffLocation;
TakeOffLocationGet(&takeoffLocation);
angle = RAD2DEG(atan2f(positionState.East - takeoffLocation.East, positionState.North - takeoffLocation.North));
}
break;
}
// rotate horizontally by angle
{
float rotated[2] = {
controlVector[0] * cos_lookup_deg(angle) - controlVector[1] * sin_lookup_deg(angle),
controlVector[0] * sin_lookup_deg(angle) + controlVector[1] * cos_lookup_deg(angle)
};
controlVector[0] = rotated[0];
controlVector[1] = rotated[1];
}
}
static void plan_run_PositionVario(vario_type type)
{
float controlVector[4];
float alpha;
PathDesiredData pathDesired;
// Reuse the existing pathdesired object as setup in the setup to avoid
// updating values already set.
PathDesiredGet(&pathDesired);
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
ManualControlCommandRollGet(&controlVector[0]);
ManualControlCommandPitchGet(&controlVector[1]);
ManualControlCommandYawGet(&controlVector[2]);
ManualControlCommandThrustGet(&controlVector[3]);
FlightModeSettingsVarioControlLowPassAlphaGet(&alpha);
vario_control_lowpass[0] = alpha * vario_control_lowpass[0] + (1.0f - alpha) * controlVector[0];
vario_control_lowpass[1] = alpha * vario_control_lowpass[1] + (1.0f - alpha) * controlVector[1];
vario_control_lowpass[2] = alpha * vario_control_lowpass[2] + (1.0f - alpha) * controlVector[2];
controlVector[0] = vario_control_lowpass[0];
controlVector[1] = vario_control_lowpass[1];
controlVector[2] = vario_control_lowpass[2];
// check if movement is desired
if (normalizeDeadband(controlVector) == false) {
// no movement desired, re-enter positionHold at current start-position
if (!vario_hold) {
vario_hold = true;
// new hold position is the position that was previously the start position
pathDesired.End.North = hold_position[0];
pathDesired.End.East = hold_position[1];
pathDesired.End.Down = hold_position[2];
// while the new start position has the same offset as in position hold
pathDesired.Start.North = pathDesired.End.North + offset.Horizontal; // in FlyEndPoint the direction of this vector does not matter
pathDesired.Start.East = pathDesired.End.East;
pathDesired.Start.Down = pathDesired.End.Down;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
// set mode explicitly
PathDesiredSet(&pathDesired);
}
} else {
PositionStateData positionState;
PositionStateGet(&positionState);
// flip pitch to have pitch down (away) point north
controlVector[1] = -controlVector[1];
getVector(controlVector, type);
// layout of control Vector : unitVector in movement direction {0,1,2} vector length {3} velocity {4}
if (vario_hold) {
// start position is the position that was previously the hold position
vario_hold = false;
hold_position[0] = pathDesired.End.North;
hold_position[1] = pathDesired.End.East;
hold_position[2] = pathDesired.End.Down;
} else {
// start position is advanced according to movement - in the direction of ControlVector only
// projection using scalar product
float kp = (positionState.North - hold_position[0]) * controlVector[0]
+ (positionState.East - hold_position[1]) * controlVector[1]
+ (positionState.Down - hold_position[2]) * -controlVector[2];
if (kp > 0.0f) {
hold_position[0] += kp * controlVector[0];
hold_position[1] += kp * controlVector[1];
hold_position[2] += kp * -controlVector[2];
}
}
// new destination position is advanced based on controlVector
pathDesired.End.North = hold_position[0] + controlVector[0] * controlVector[3];
pathDesired.End.East = hold_position[1] + controlVector[1] * controlVector[3];
pathDesired.End.Down = hold_position[2] - controlVector[2] * controlVector[3];
// the new start position has the same offset as in position hold
pathDesired.Start.North = pathDesired.End.North + offset.Horizontal; // in FlyEndPoint the direction of this vector does not matter
pathDesired.Start.East = pathDesired.End.East;
pathDesired.Start.Down = pathDesired.End.Down;
PathDesiredSet(&pathDesired);
}
}
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
void plan_run_VelocityRoam()
{
// float alpha;
PathDesiredData pathDesired;
2015-09-24 22:33:57 +02:00
// velocity roam code completely sets pathdesired object. it was not set in setup phase
memset(&pathDesired, 0, sizeof(PathDesiredData));
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
FlightStatusAssistedControlStateOptions assistedControlFlightMode;
FlightStatusFlightModeOptions flightMode;
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
FlightStatusAssistedControlStateGet(&assistedControlFlightMode);
FlightStatusFlightModeGet(&flightMode);
StabilizationBankData stabSettings;
StabilizationBankGet(&stabSettings);
ManualControlCommandData cmd;
ManualControlCommandGet(&cmd);
cmd.Roll = applyExpo(cmd.Roll, stabSettings.StickExpo.Roll);
cmd.Pitch = applyExpo(cmd.Pitch, stabSettings.StickExpo.Pitch);
cmd.Yaw = applyExpo(cmd.Yaw, stabSettings.StickExpo.Yaw);
bool flagRollPitchHasInput = (fabsf(cmd.Roll) > 0.0f || fabsf(cmd.Pitch) > 0.0f);
if (!flagRollPitchHasInput) {
// no movement desired, re-enter positionHold at current start-position
if (assistedControlFlightMode == FLIGHTSTATUS_ASSISTEDCONTROLSTATE_PRIMARY) {
// initiate braking and change assisted control flight mode to braking
if (flightMode == FLIGHTSTATUS_FLIGHTMODE_LAND) {
// avoid brake then hold sequence to continue descent.
plan_setup_land_from_velocityroam();
} else {
plan_setup_assistedcontrol();
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
}
}
// otherwise nothing to do in braking/hold modes
} else {
PositionStateData positionState;
PositionStateGet(&positionState);
// Revert assist control state to primary, which in this case implies
// we are in roaming state (a GPS vector assisted velocity roam)
assistedControlFlightMode = FLIGHTSTATUS_ASSISTEDCONTROLSTATE_PRIMARY;
// Calculate desired velocity in each direction
float angle;
AttitudeStateYawGet(&angle);
angle = DEG2RAD(angle);
float cos_angle = cosf(angle);
float sine_angle = sinf(angle);
float rotated[2] = {
-cmd.Pitch * cos_angle - cmd.Roll * sine_angle,
-cmd.Pitch * sine_angle + cmd.Roll * cos_angle
};
// flip pitch to have pitch down (away) point north
float horizontalVelMax;
float verticalVelMax;
VtolPathFollowerSettingsHorizontalVelMaxGet(&horizontalVelMax);
VtolPathFollowerSettingsVerticalVelMaxGet(&verticalVelMax);
float velocity_north = rotated[0] * horizontalVelMax;
float velocity_east = rotated[1] * horizontalVelMax;
float velocity_down = 0.0f;
if (flightMode == FLIGHTSTATUS_FLIGHTMODE_LAND) {
FlightModeSettingsLandingVelocityGet(&velocity_down);
}
float velocity = velocity_north * velocity_north + velocity_east * velocity_east;
velocity = sqrtf(velocity);
// if one stick input (pitch or roll) should we use fly by vector? set arbitrary distance of say 20m after which we
// expect new stick input
// if two stick input pilot is fighting wind manually and we use fly by velocity
// in reality setting velocity desired to zero will fight wind anyway.
pathDesired.Start.North = positionState.North;
pathDesired.Start.East = positionState.East;
pathDesired.Start.Down = positionState.Down;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_VELOCITY_VELOCITYVECTOR_NORTH] = velocity_north;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_VELOCITY_VELOCITYVECTOR_EAST] = velocity_east;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_VELOCITY_VELOCITYVECTOR_DOWN] = velocity_down;
pathDesired.End.North = positionState.North;
pathDesired.End.East = positionState.East;
pathDesired.End.Down = positionState.Down;
pathDesired.StartingVelocity = velocity;
pathDesired.EndingVelocity = velocity;
pathDesired.Mode = PATHDESIRED_MODE_VELOCITY;
if (flightMode == FLIGHTSTATUS_FLIGHTMODE_LAND) {
pathDesired.Mode = PATHDESIRED_MODE_LAND;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_LAND_OPTIONS] = (float)PATHDESIRED_MODEPARAMETER_LAND_OPTION_NONE;
} else {
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_VELOCITY_UNUSED] = 0.0f;
}
PathDesiredSet(&pathDesired);
FlightStatusAssistedControlStateSet(&assistedControlFlightMode);
}
}
void plan_run_CourseLock()
{
plan_run_PositionVario(COURSE);
}
2014-11-08 16:01:59 +01:00
void plan_run_PositionRoam()
{
plan_run_PositionVario(FPV);
}
2014-11-08 16:01:59 +01:00
void plan_run_HomeLeash()
{
plan_run_PositionVario(LOS);
}
void plan_run_AbsolutePosition()
{
plan_run_PositionVario(NSEW);
}
/**
* @brief setup pathplanner/pathfollower for AutoCruise
*/
static PiOSDeltatimeConfig actimeval;
void plan_setup_AutoCruise()
{
PositionStateData positionState;
PositionStateGet(&positionState);
PathDesiredData pathDesired;
// setup needs to reinitialise the pathdesired object
memset(&pathDesired, 0, sizeof(PathDesiredData));
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
// initialization is flight in direction of the nose.
// the velocity is not relevant, as it will be reset by the run function even during first call
float angle;
AttitudeStateYawGet(&angle);
float vector[2] = {
cos_lookup_deg(angle),
sin_lookup_deg(angle)
};
hold_position[0] = positionState.North;
hold_position[1] = positionState.East;
hold_position[2] = positionState.Down;
pathDesired.End.North = hold_position[0] + vector[0];
pathDesired.End.East = hold_position[1] + vector[1];
pathDesired.End.Down = hold_position[2];
// start position has the same offset as in position hold
pathDesired.Start.North = pathDesired.End.North + offset.Horizontal; // in FlyEndPoint the direction of this vector does not matter
pathDesired.Start.East = pathDesired.End.East;
pathDesired.Start.Down = pathDesired.End.Down;
pathDesired.StartingVelocity = 0.0f;
pathDesired.EndingVelocity = 0.0f;
OP-1696 PathFollower rewrite in C++ and Landing Squashed commit of the following: commit 580cd8addafadc3109b90b1fd183130ea8add7f2 Author: abeck70 <abeck70@icloud.com> Date: Fri Mar 20 21:32:33 2015 +1100 OP-1696 Cleanup and bug fix 1. Code review cleanup 2. Fixed gps assist braking - the thrust limits in piddown were not being set. commit 31ac4494f6e2bc5859f49d1f76f19fe3a4d32862 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 18 08:31:16 2015 +1100 OP-1696 fix initialisation of down pid control parameters commit a7bd737459249530bde9546b8247dd45b40dced4 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:18:38 2015 +1100 OP-1769 Actuator fix from code review commit 968172b8fb46c91b2611be4825e17faf2fa13411 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 21:01:11 2015 +1100 OP-1696 fixed ground pathfollower settings xml commit 721c07b67a87911ed67d0b62aa658cfac6d3eb97 Merge: f556215 be9f4ae Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:52:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit f556215ddbd5a29b22c2e6124372d74a0d6b9a0f Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 20:51:22 2015 +1100 OP-1696 ground pathfollower fixes commit 4584b22d6a2d33d3efb1cd11ac46804a5623a236 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 17 18:11:52 2015 +1100 OP-1696 Ground redesign 1. Move to new PID loop design 2. Prototype steering control commit b70c3373646fa758ae30a59765b8a56df7d2fbeb Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 18:42:06 2015 +1100 OP-1696 ground pathfollower added missing call to update velocity state commit a282bfb14dffcd486466b60be3100d26c11649ef Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 17:22:02 2015 +1100 OP-1696 ground pathfollower improvements commit f56ea4f9b101415e32e4464e51e087ee350be969 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 15 07:44:01 2015 +1100 OP-1696 remove unused PID controller in ground for vertical commit 6424aa0a84c3718a5a7b51fab1c9e04587d325b8 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:40:58 2015 +1100 OP-1696 Initialise vtolemergencyfallback variables commit 5d6110499bb06fe9b397e09dea5aafe994f03d13 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 21:30:21 2015 +1100 OP-1696 vtolflycontroller segv fixed and uncrustify commit bef23ea3dc2b5aff5b9b8713802586719b8f68cf Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:50:05 2015 +1100 OP-1783 PathPlanner Instead of config alarm if no pathplan, simply continue to alarm pathplan, but allow normal arming and flight in other modes. If pathplan enabled, simply enter position hold. commit 370f1747209cca7c01c071a43224ad83b04bdd55 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 20:48:22 2015 +1100 OP-1769 Ground code review comment 1. Remove idx1 < 0 check not needed 2. Should return abs_input in the corner case that curve is "invalid". commit 01973c656d783e035ad823c267d3387bf473eebe Merge: be07d12 5c9b6fa Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 14 12:17:31 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit be07d125f42b5ca1aabce0f5c0fcf592e8cddf98 Merge: 44afdc7 ad44b31 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 21:55:52 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 44afdc77987049dc58cdf42e3be88b7eae38de02 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 19:35:55 2015 +1100 OP-1696 fix startup Fix initialisation and void use of pios_malloc at startup commit 962f5f75756883cec6726c0347310d60264f6989 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:48:04 2015 +1100 OP-1696 undo changes to make file commit 7fa71d5c614d492cb4026312672068f92a4bcd3e Merge: 672732e 5a9cfa6 Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 12 18:06:59 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 672732e95d555946300ef5093f687f3fa88bfd3a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:59:44 2015 +1100 OP-1696 code review comments commit 73b295d6515f2489b3b3a61459c975b0c37afe3d Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 11 12:47:24 2015 +1100 OP-1696 code review comments commit 524b72f537fe922bf3c4385b418872f13819a5cf Merge: 6beef01 ba5f395 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 10 23:19:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 6beef01476d06598652a10de4857e6ae55015417 Merge: 100cf33 8c31f96 Author: abeck70 <abeck70@icloud.com> Date: Sat Mar 7 16:50:32 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 100cf335d187fe696d3678371b194fc3044a1c7e Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 22:32:30 2015 +1100 OP-1696 simposix c++ compilation fix commit 9ebf846d1ec8fef30ffc1204546fc5dc648ec10b Author: Alex Beck <abeck70@icloud.com> Date: Thu Mar 5 21:35:39 2015 +1100 OP-1696 fix simposix c++ compile of pathfollower commit a86b4b1db46dba569739587ee57b03460381ebab Author: abeck70 <abeck70@icloud.com> Date: Thu Mar 5 18:03:51 2015 +1100 OP-1696 resolve linux build issue commit 1d7695f81293534bc17f69b0fcd9de3876867f6a Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 18:10:09 2015 +1100 OP-1696 Return to Base & Land implemented Enabled via FlightModeSettings ReturnToBaseNextCommand = LAND commit 4e5ca807b18a40ea60c05c1b46f738462595a6b2 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 16:38:06 2015 +1100 OP-1696 reduce memory footprint by only allocating controllers required for a particular frame type commit 78e8f559cd25ffaeac68b563e25d1ad357205fd6 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:51:05 2015 +1100 OP-1696 move fsm initialisation to controller implementations commit 848c78a84e5c7e11b2da953c9d9549b11fc5b1d8 Author: abeck70 <abeck70@icloud.com> Date: Wed Mar 4 13:27:11 2015 +1100 OP-1696 reduce memory through re-use of pointers to data objects in base class. commit bc8794601142055942910ba9f938c03c8a3ca547 Merge: 24bc3de 843325d Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 22:06:01 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 24bc3de6155a74850b17ca7706f6b592923e027c Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 17:56:12 2015 +1100 OP-1696 update gcs path planner options to align to new modes commit dc659891882ea0624a6436550425c54b347f4101 Author: abeck70 <abeck70@icloud.com> Date: Tue Mar 3 13:51:55 2015 +1100 OP-1696 pathfollower class renaming and uncrustify commit af19d114b8e0ff23159bdaca37e5f5bf1c1f8beb Merge: b07c1fd 04f4cd9 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:47:12 2015 +1100 Merge branch 'rel-15.02' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b07c1fdd0544a555678bc7a8510cd92861f17e46 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 21:27:27 2015 +1100 OP-1696 remainder of changes to integrate drive and fly objectives commit c824c53cf30889a468ecb25ae3d705fa011b23ba Merge: b89751c 1102243 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:06:13 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit b89751caa5d6dc06e1e20391aa4e12b5484056d4 Author: abeck70 <abeck70@icloud.com> Date: Mon Mar 2 17:04:27 2015 +1100 OP-1696 merge fly and drive pathdesired/action objectives commit c463132cb7da5cdf9fc5395ae0650b081bc9fb55 Author: abeck70 <abeck70@icloud.com> Date: Sun Mar 1 10:25:29 2015 +1100 OP-1696 merge ground pathfollower and refactored into C++ commit 6ed504b32f9e502e4f02d50b9e85ba91591417ba Merge: bcf245e deafed6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:12:32 2015 +1100 Merge branch 'next' into corvuscorax/OP-1642_tank-support Conflicts: flight/modules/PathFollower/pathfollower.c shared/uavobjectdefinition/vtolpathfollowersettings.xml commit bcf245e08c3348f2e6e5eddceee6d6cc268bdc23 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 19:45:29 2014 +0100 OP-1642 added new uavobject to discovery target, too commit 6b9e8a7d7dad0739b4ffd2ce7f2f78ed4f597077 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:58:18 2014 +0100 OP-1642 added very simple path control for ground vehicles commit e8d8440e049c06158e7fc542627fac6420abaf65 Author: Corvus Corax <corvuscorax@cybertrench.com> Date: Sat Dec 6 17:17:09 2014 +0100 OP-1642 added new settings uavobject for tank path follower commit 71dd726eb5b52614b417236c22e8a5cc3a487faf Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 27 18:05:10 2015 +1100 OP-1696 align pathaction to pathdesired commit 8a88af83be457aafbb63e4f94fad3b1cd54264ca Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 26 08:06:34 2015 +1100 OP-1696 fixed wing control refactored and compiling commit fd9850b5e5680f5b422dbc468a94c5ec4b6dd518 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 17:47:19 2015 +1100 OP-1696 Removed vtol stuff from pathfollower.cpp after having replaced it with class impl commit 9127d8d6d8c345c5bbf8622ce4e5eb76b03d1356 Merge: 4054c73 93fb2d5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 25 13:09:06 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 4054c73ac98b54188a0a5367c5ca913b7fee6a89 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:29:28 2015 +1100 OP-1696 fix compile errors commit b398db3d4de8cd621a059da1f0dbb00868be0fb9 Merge: 94c795a 3e15cac Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 24 12:06:35 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 94c795af386cf0f1072a88e99a80cb1080bf85e7 Merge: d2115de 57e0a8b Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 17:54:33 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 Conflicts: flight/modules/Sensors/sensors.c make/common-defs.mk commit d2115dee4e8e9b6a02f7b7700e4715480a56b18f Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 23 14:35:02 2015 +1100 OP-1696 preliminary checkin for refactor of fly TODO: 1. Finalise and test fly, brake 2. Remove patfhollower vtol fly 3. Rename all objects adding vtol in name commit 95804b1d591d194cce3596187c74cdb2dd0d192f Merge: 58cebb0 31c1385 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:10:03 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 58cebb0658deaece1555cfa24e50f1b86fd68c96 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 21 22:09:29 2015 +1100 OP-1696 refactor neutral thrust and add pos hold implementation commit 2c3cadfef3de9e092bd66bbabc58ac7847aca7e4 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 20 18:32:11 2015 +1100 OP-1696 start of refactor of braking commit 991c2124e834f3432f5e34c5c9f4966cb42a7be3 Merge: 1ab5798 db7d605 Author: abeck70 <abeck70@icloud.com> Date: Thu Feb 19 12:17:54 2015 +1100 Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into abeck/OP-1696 commit 1ab579865f04aeaa5899f5065a983de29074e025 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 21:29:01 2015 +1100 OP-1696 Rewrote velocity roam into new C++ OO architecture With use of new PID controller for NE. commit 03edb049f06bf60054dce36a5b8b301a397284c4 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 18 12:19:17 2015 +1100 OP-1696 Start of refactoring of VelocityRoam implementation in PathFollower Also TODOs: 1. To support pathplanner, remove all references to FlightStatus object and add more fields to PathDesired 2. Refactor Braking to use C++ 3. Test and optimise Velocity Roam 4. Add more config options to Landing. For example disable disarming. And add more setting objects. 5. Consider moving all landing settings to one object. commit 1f5dba821d4535a9a14f333efdeec1af5afcc281 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 22:51:31 2015 +1100 OP-1696 Landing tuning commit 5133956c717fba871dd5700333806e298038a3d0 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 16 21:05:06 2015 +1100 OP-1696 Landing Multiple fixes commit cf22055ecb8eb7304174c730f249a2332ebc599b Author: abeck70 <abeck70@icloud.com> Date: Sun Feb 15 20:52:29 2015 +1100 OP-1696 Add PIDStatus debug object commit bc13d732601e7c7cb48db17f1a75b33cc96c0c34 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 15:53:16 2015 +1100 OP-1696 Landing sanity tested commit 6e913076c1dfcb8b90153e9eca8acf6c9e51f293 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 14 11:16:06 2015 +1100 OP-1696 completed refactoring 1. Completed refactoring of NE and Thrust control 2. Fixed velocity roam TODO Tuning and testing commit 63b62fbd0ac105029e54163b98c3beebc2d73c3a Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 13 08:54:23 2015 +1100 OP-1696 New PID Controller and refactoring of PID implementation for thrust management commit 7474331529477d0badd2ef0d609c84c556be9cec Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 10 16:39:44 2015 +1100 OP-1696 Landing Refactor Thrust PID Loop for landing commit 904ab2a9241e40c19da6a1508b4ce5243c75d7a3 Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:13:39 2015 +1100 OP-1696 Uncrustify commit b3d30e298d8a0343782a29bc91be6677105b325e Author: abeck70 <abeck70@icloud.com> Date: Mon Feb 9 22:05:05 2015 +1100 OP-1696 Create new OO design Added PathFollowerControl which has an Landing implementation. The landing implementation runs its own set of PIDs. And interfaces to the FSM for Landing. commit 1ffd8d67cf7310c1c18c90f3ba18b08221d185a3 Author: abeck70 <abeck70@icloud.com> Date: Sat Feb 7 18:04:42 2015 +1100 OP-1696 Upgrade arm tools commit 3df01f97021d13694027b92ba0b13cc9fe70d437 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 21:52:38 2015 +1100 OP-1696 Landing uncrustify and start of refactoring landing to make more use of FSMLand commit 7a753b65fb69d52c89875b9a182ef5210ee8ef2d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 15:08:29 2015 +1100 OP-1696 Landing: fix compilation of all exes commit 692459874acf2b7ae07aa3ab88a2c78a09f26ee6 Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 14:45:06 2015 +1100 OP-1696 Landing startup fixes commit 9851f29b9238a969efd0110f01a4fad6bdbc5a5d Author: abeck70 <abeck70@icloud.com> Date: Fri Feb 6 10:21:52 2015 +1100 OP-1696 Landing pathfollower CPP refactoring commit 9b3a54d41f14f07cd0d78426026d12ae9ac4e5b5 Author: abeck70 <abeck70@icloud.com> Date: Wed Feb 4 13:02:44 2015 +1100 OP-1696 Moved to FSMLand class and fixed CPP problems 1. Additional methods, compile options, and need to have main as a cpp to solve various link issues when using static constructors but to avoid adding unnecessary libs. commit 7ebe739bfdb4e0f598f4408c1488f01bc033c044 Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:17:08 2015 +1100 OP-1696 Initial Landing prototype Proof of concept. To be refactored into C++ commit 11d6754b9766efb76cc1cd57e9894badaf33ef2d Author: abeck70 <abeck70@icloud.com> Date: Tue Feb 3 22:13:10 2015 +1100 OP-1696 CPP Enablement revo c++ Enable optional revo C++ support: 1. Set USE_CXX to enable compliation and linkage of C++ source code 2. Disables rtti and exceptions 3. operator new and delete call pios malloc/free 4. Static constructor invocation supported
2015-03-20 11:42:20 +01:00
pathDesired.Mode = PATHDESIRED_MODE_GOTOENDPOINT;
PathDesiredSet(&pathDesired);
// re-iniztializing deltatime is valid and also good practice here since
// getAverageSeconds() has not been called/updated in a long time if we were in a different flightmode.
PIOS_DELTATIME_Init(&actimeval, UPDATE_EXPECTED, UPDATE_MIN, UPDATE_MAX, UPDATE_ALPHA);
}
/**
* @brief execute autocruise
*/
void plan_run_AutoCruise()
{
PositionStateData positionState;
PositionStateGet(&positionState);
PathDesiredData pathDesired;
// re-use pathdesired that was setup correctly in setup stage.
PathDesiredGet(&pathDesired);
FlightModeSettingsPositionHoldOffsetData offset;
FlightModeSettingsPositionHoldOffsetGet(&offset);
float controlVector[4];
ManualControlCommandRollGet(&controlVector[0]);
ManualControlCommandPitchGet(&controlVector[1]);
ManualControlCommandYawGet(&controlVector[2]);
controlVector[3] = 0.5f; // dummy, thrust is normalized separately
normalizeDeadband(controlVector); // return value ignored
ManualControlCommandThrustGet(&controlVector[3]); // no deadband as we are using thrust for velocity
controlVector[3] = boundf(controlVector[3], 1e-6f, 1.0f); // bound to above zero, to prevent loss of vector direction
// normalize old desired movement vector
float vector[3] = { pathDesired.End.North - hold_position[0],
pathDesired.End.East - hold_position[1],
pathDesired.End.Down - hold_position[2] };
float length = sqrtf(vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2]);
if (length < 1e-9f) {
length = 1.0f; // should not happen since initialized properly in setup()
}
vector[0] /= length;
vector[1] /= length;
vector[2] /= length;
// start position is advanced according to actual movement - in the direction of desired vector only
// projection using scalar product
float kp = (positionState.North - hold_position[0]) * vector[0]
+ (positionState.East - hold_position[1]) * vector[1]
+ (positionState.Down - hold_position[2]) * vector[2];
if (kp > 0.0f) {
hold_position[0] += kp * vector[0];
hold_position[1] += kp * vector[1];
hold_position[2] += kp * vector[2];
}
// new angle is equal to old angle plus offset depending on yaw input and time
// (controlVector is normalized with a deadband, change is zero within deadband)
float angle = RAD2DEG(atan2f(vector[1], vector[0]));
float dT = PIOS_DELTATIME_GetAverageSeconds(&actimeval);
angle += 10.0f * controlVector[2] * dT; // TODO magic value could eventually end up in a to be created settings
// resulting movement vector is scaled by velocity demand in controlvector[3] [0.0-1.0]
vector[0] = cosf(DEG2RAD(angle)) * offset.Horizontal * controlVector[3];
vector[1] = sinf(DEG2RAD(angle)) * offset.Horizontal * controlVector[3];
vector[2] = -controlVector[1] * offset.Vertical * controlVector[3];
pathDesired.End.North = hold_position[0] + vector[0];
pathDesired.End.East = hold_position[1] + vector[1];
pathDesired.End.Down = hold_position[2] + vector[2];
// start position has the same offset as in position hold
pathDesired.Start.North = pathDesired.End.North + offset.Horizontal; // in FlyEndPoint the direction of this vector does not matter
pathDesired.Start.East = pathDesired.End.East;
pathDesired.Start.Down = pathDesired.End.Down;
PathDesiredSet(&pathDesired);
}
/**
* @brief setup pathplanner/pathfollower for braking in positionroam
* timeout_occurred = false: Attempt to enter flyvector for braking
* timeout_occurred = true: Revert to position hold
*/
#define ASSISTEDCONTROL_BRAKERATE_MINIMUM 0.2f // m/s2
#define ASSISTEDCONTROL_TIMETOSTOP_MINIMUM 0.2f // seconds
#define ASSISTEDCONTROL_TIMETOSTOP_MAXIMUM 9.0f // seconds
#define ASSISTEDCONTROL_DELAY_TO_BRAKE 1.0f // seconds
#define ASSISTEDCONTROL_TIMEOUT_MULTIPLIER 4.0f // actual deceleration rate can be 50% of desired...timeouts need to cater for this
void plan_setup_assistedcontrol()
{
PositionStateData positionState;
PositionStateGet(&positionState);
PathDesiredData pathDesired;
// setup function, avoid carry over from previous mode
memset(&pathDesired, 0, sizeof(PathDesiredData));
FlightStatusAssistedControlStateOptions assistedControlFlightMode;
VelocityStateData velocityState;
VelocityStateGet(&velocityState);
float brakeRate;
VtolPathFollowerSettingsBrakeRateGet(&brakeRate);
if (brakeRate < ASSISTEDCONTROL_BRAKERATE_MINIMUM) {
brakeRate = ASSISTEDCONTROL_BRAKERATE_MINIMUM; // set a minimum to avoid a divide by zero potential below
}
// Calculate the velocity
float velocity = velocityState.North * velocityState.North + velocityState.East * velocityState.East + velocityState.Down * velocityState.Down;
velocity = sqrtf(velocity);
// Calculate the desired time to zero velocity.
float time_to_stopped = ASSISTEDCONTROL_DELAY_TO_BRAKE; // we allow at least 0.5 seconds to rotate to a brake angle.
time_to_stopped += velocity / brakeRate;
// Sanity check the brake rate by ensuring that the time to stop is within a range.
if (time_to_stopped < ASSISTEDCONTROL_TIMETOSTOP_MINIMUM) {
time_to_stopped = ASSISTEDCONTROL_TIMETOSTOP_MINIMUM;
} else if (time_to_stopped > ASSISTEDCONTROL_TIMETOSTOP_MAXIMUM) {
time_to_stopped = ASSISTEDCONTROL_TIMETOSTOP_MAXIMUM;
}
// calculate the distance we will travel
float north_delta = velocityState.North * ASSISTEDCONTROL_DELAY_TO_BRAKE; // we allow at least 0.5s to rotate to brake angle
north_delta += (time_to_stopped - ASSISTEDCONTROL_DELAY_TO_BRAKE) * 0.5f * velocityState.North; // area under the linear deceleration plot
float east_delta = velocityState.East * ASSISTEDCONTROL_DELAY_TO_BRAKE; // we allow at least 0.5s to rotate to brake angle
east_delta += (time_to_stopped - ASSISTEDCONTROL_DELAY_TO_BRAKE) * 0.5f * velocityState.East; // area under the linear deceleration plot
float down_delta = velocityState.Down * ASSISTEDCONTROL_DELAY_TO_BRAKE;
down_delta += (time_to_stopped - ASSISTEDCONTROL_DELAY_TO_BRAKE) * 0.5f * velocityState.Down; // area under the linear deceleration plot
float net_delta = east_delta * east_delta + north_delta * north_delta + down_delta * down_delta;
net_delta = sqrtf(net_delta);
pathDesired.Start.North = positionState.North;
pathDesired.Start.East = positionState.East;
pathDesired.Start.Down = positionState.Down;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_BRAKE_STARTVELOCITYVECTOR_NORTH] = velocityState.North;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_BRAKE_STARTVELOCITYVECTOR_EAST] = velocityState.East;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_BRAKE_STARTVELOCITYVECTOR_DOWN] = velocityState.Down;
pathDesired.End.North = positionState.North + north_delta;
pathDesired.End.East = positionState.East + east_delta;
pathDesired.End.Down = positionState.Down + down_delta;
pathDesired.StartingVelocity = velocity;
pathDesired.EndingVelocity = 0.0f;
pathDesired.Mode = PATHDESIRED_MODE_BRAKE;
pathDesired.ModeParameters[PATHDESIRED_MODEPARAMETER_BRAKE_TIMEOUT] = time_to_stopped * ASSISTEDCONTROL_TIMEOUT_MULTIPLIER;
assistedControlFlightMode = FLIGHTSTATUS_ASSISTEDCONTROLSTATE_BRAKE;
FlightStatusAssistedControlStateSet(&assistedControlFlightMode);
PathDesiredSet(&pathDesired);
}