Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_geodetic_float.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2011 The Paparazzi Team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
30 #ifndef PPRZ_GEODETIC_FLOAT_H
31 #define PPRZ_GEODETIC_FLOAT_H
32 
33 #include "pprz_geodetic.h"
34 #include "pprz_algebra_float.h"
35 #include "std.h"
36 
43 struct EcefCoor_f {
44  float x;
45  float y;
46  float z;
47 };
48 
52 struct LlaCoor_f {
53  float lon;
54  float lat;
55  float alt;
56 };
57 
61 struct NedCoor_f {
62  float x;
63  float y;
64  float z;
65 };
66 
70 struct EnuCoor_f {
71  float x;
72  float y;
73  float z;
74 };
75 
79 struct UtmCoor_f {
80  float north;
81  float east;
82  float alt;
84 };
85 
91 struct LtpDef_f {
92  struct EcefCoor_f ecef;
93  struct LlaCoor_f lla;
95  float hmsl;
96 };
97 
98 extern void lla_of_utm_f(struct LlaCoor_f* lla, struct UtmCoor_f* utm);
99 extern void utm_of_lla_f(struct UtmCoor_f* utm, struct LlaCoor_f* lla);
100 extern void ltp_def_from_ecef_f(struct LtpDef_f* def, struct EcefCoor_f* ecef);
101 extern void ltp_def_from_lla_f(struct LtpDef_f* def, struct LlaCoor_f* lla);
102 extern void lla_of_ecef_f(struct LlaCoor_f* out, struct EcefCoor_f* in);
103 extern void ecef_of_lla_f(struct EcefCoor_f* out, struct LlaCoor_f* in);
104 extern void enu_of_ecef_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef);
105 extern void ned_of_ecef_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef);
106 extern void enu_of_ecef_vect_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef);
107 extern void ned_of_ecef_vect_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef);
108 extern void enu_of_lla_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct LlaCoor_f* lla);
109 extern void ned_of_lla_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct LlaCoor_f* lla);
110 
111 /* not enought precision with floats - used the double version */
112 extern void ecef_of_enu_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu);
113 extern void ecef_of_ned_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned);
114 extern void ecef_of_enu_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu);
115 extern void ecef_of_ned_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned);
116 /* end use double versions */
117 
118 
119 #endif /* PPRZ_GEODETIC_FLOAT_H */
vector in EarthCenteredEarthFixed coordinates
void ecef_of_ned_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
void lla_of_utm_f(struct LlaCoor_f *lla, struct UtmCoor_f *utm)
float y
in meters
void ecef_of_lla_f(struct EcefCoor_f *out, struct LlaCoor_f *in)
float y
in meters
float z
in meters
struct FloatMat33 ltp_of_ecef
rotation from ECEF to local frame
void ltp_def_from_lla_f(struct LtpDef_f *def, struct LlaCoor_f *lla)
float lat
in radians
float y
in meters
void lla_of_ecef_f(struct LlaCoor_f *out, struct EcefCoor_f *in)
struct EcefCoor_f ecef
origin of local frame in ECEF
vector in Latitude, Longitude and Altitude
void ned_of_lla_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct LlaCoor_f *lla)
void ecef_of_enu_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu)
void ecef_of_ned_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
float x
in meters
uint8_t zone
UTM zone number.
float x
in meters
Paparazzi floating point algebra.
vector in North East Down coordinates Units: meters
void enu_of_ecef_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
float north
in meters
float z
in meters
position in UTM coordinates Units: meters
float x
in meters
void ned_of_ecef_vect_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void enu_of_ecef_vect_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
float alt
in meters above WGS84 reference ellipsoid
void ecef_of_enu_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu)
void enu_of_lla_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct LlaCoor_f *lla)
unsigned char uint8_t
Definition: types.h:14
void ltp_def_from_ecef_f(struct LtpDef_f *def, struct EcefCoor_f *ecef)
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
definition of the local (flat earth) coordinate system
struct LlaCoor_f lla
origin of local frame in LLA
vector in East North Up coordinates Units: meters
float lon
in radians
float east
in meters
void ned_of_ecef_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
float alt
in meters above WGS84 reference ellipsoid
float hmsl
Height above mean sea level in meters.
float z
in meters