Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros 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 
54 struct LlaCoor_f {
55  float lon;
56  float lat;
57  float alt;
58 };
59 
63 struct NedCoor_f {
64  float x;
65  float y;
66  float z;
67 };
68 
72 struct EnuCoor_f {
73  float x;
74  float y;
75  float z;
76 };
77 
81 struct UtmCoor_f {
82  float north;
83  float east;
84  float alt;
86 };
87 
93 struct LtpDef_f {
94  struct EcefCoor_f ecef;
95  struct LlaCoor_f lla;
97  float hmsl;
98 };
99 
100 extern void lla_of_utm_f(struct LlaCoor_f* lla, struct UtmCoor_f* utm);
101 extern void utm_of_lla_f(struct UtmCoor_f* utm, struct LlaCoor_f* lla);
102 extern void ltp_def_from_ecef_f(struct LtpDef_f* def, struct EcefCoor_f* ecef);
103 extern void ltp_def_from_lla_f(struct LtpDef_f* def, struct LlaCoor_f* lla);
104 extern void lla_of_ecef_f(struct LlaCoor_f* out, struct EcefCoor_f* in);
105 extern void ecef_of_lla_f(struct EcefCoor_f* out, struct LlaCoor_f* in);
106 extern void enu_of_ecef_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef);
107 extern void ned_of_ecef_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef);
108 extern void enu_of_ecef_vect_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct EcefCoor_f* ecef);
109 extern void ned_of_ecef_vect_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct EcefCoor_f* ecef);
110 extern void enu_of_lla_point_f(struct EnuCoor_f* enu, struct LtpDef_f* def, struct LlaCoor_f* lla);
111 extern void ned_of_lla_point_f(struct NedCoor_f* ned, struct LtpDef_f* def, struct LlaCoor_f* lla);
112 
113 /* not enought precision with floats - used the double version */
114 extern void ecef_of_enu_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu);
115 extern void ecef_of_ned_point_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned);
116 extern void ecef_of_enu_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct EnuCoor_f* enu);
117 extern void ecef_of_ned_vect_f(struct EcefCoor_f* ecef, struct LtpDef_f* def, struct NedCoor_f* ned);
118 /* end use double versions */
119 
120 
121 #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