LP-311 Remove basic/advanced stabilization tab auto-switch (autotune/txpid lock issues)
[librepilot.git] / ground / gcs / src / libs / utils / coordinateconversions.h
blob23b28fe473c60c77bcdcc1535dc0c09eb1af73c5
1 /**
2 ******************************************************************************
4 * @file coordinateconversions.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
7 * @brief
8 * @see The GNU Public License (GPL) Version 3
9 * @defgroup
10 * @{
12 *****************************************************************************/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef COORDINATECONVERSIONS_H
30 #define COORDINATECONVERSIONS_H
32 #include "utils_global.h"
33 #include "../extensionsystem/pluginmanager.h"
34 #include "../../plugins/uavobjects/uavobjectmanager.h"
35 #include "../../plugins/uavobjects/uavobject.h"
36 #include "math.h"
38 namespace Utils {
39 class QTCREATOR_UTILS_EXPORT CoordinateConversions {
40 public:
41 CoordinateConversions();
42 int NED2LLA_HomeECEF(double BaseECEFcm[3], double NED[3], double position[3]);
43 int NED2LLA_HomeLLA(double LLA[3], double NED[3], double position[3]);
44 void RneFromLLA(double LLA[3], float Rne[3][3]);
45 void LLA2ECEF(double LLA[3], double ECEF[3]);
46 int ECEF2LLA(double ECEF[3], double LLA[3]);
47 void LLA2Base(double LLA[3], double BaseECEF[3], float Rne[3][3], float NED[3]);
48 void Quaternion2RPY(const float q[4], float rpy[3]);
49 void RPY2Quaternion(const float rpy[3], float q[4]);
50 void Quaternion2R(const float q[4], float Rbe[3][3]);
51 void R2Quaternion(float const Rbe[3][3], float q[4]);
55 #endif /* COORDINATECONVERSIONS_H */