Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_geodetic_double.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2014 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 
32 #ifndef PPRZ_GEODETIC_DOUBLE_H
33 #define PPRZ_GEODETIC_DOUBLE_H
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #include "pprz_geodetic.h"
40 #include "pprz_algebra_double.h"
41 #include "std.h"
42 
49 struct EcefCoor_d {
50  double x;
51  double y;
52  double z;
53 };
54 
58 struct LlaCoor_d {
59  double lat;
60  double lon;
61  double alt;
62 };
63 
67 struct NedCoor_d {
68  double x;
69  double y;
70  double z;
71 };
72 
76 struct EnuCoor_d {
77  double x;
78  double y;
79  double z;
80 };
81 
85 struct UtmCoor_d {
86  double north;
87  double east;
88  double alt;
90 };
91 
97 struct LtpDef_d {
98  struct EcefCoor_d ecef;
99  struct LlaCoor_d lla;
101  double hmsl;
102 };
103 
104 extern void lla_of_utm_d(struct LlaCoor_d *lla, struct UtmCoor_d *utm);
105 extern void utm_of_lla_d(struct UtmCoor_d *utm, struct LlaCoor_d *lla);
106 extern void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef);
107 extern void ltp_def_from_lla_d(struct LtpDef_d *def, struct LlaCoor_d *lla);
108 extern void lla_of_ecef_d(struct LlaCoor_d *out, struct EcefCoor_d *in);
109 extern void ecef_of_lla_d(struct EcefCoor_d *out, struct LlaCoor_d *in);
110 
111 extern void enu_of_ecef_point_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef);
112 extern void ned_of_ecef_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef);
113 
114 extern void enu_of_ecef_vect_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef);
115 extern void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef);
116 
117 extern void ecef_of_enu_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu);
118 extern void ecef_of_ned_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned);
119 
120 extern void ecef_of_enu_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu);
121 extern void ecef_of_ned_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned);
122 
123 extern void enu_of_lla_point_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct LlaCoor_d *lla);
124 extern void ned_of_lla_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct LlaCoor_d *lla);
125 
126 extern double gc_of_gd_lat_d(double gd_lat, double hmsl);
127 
128 #ifdef __cplusplus
129 } /* extern "C" */
130 #endif
131 
132 #endif /* PPRZ_GEODETIC_DOUBLE_H */
133 
double z
in meters
double hmsl
height in meters above mean sea level
vector in North East Down coordinates Units: meters
double north
in meters
void ecef_of_ned_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
position in UTM coordinates Units: meters
double gc_of_gd_lat_d(double gd_lat, double hmsl)
struct DoubleRMat ltp_of_ecef
rotation from ECEF to local frame
double lat
in radians
double alt
in meters above WGS84 reference ellipsoid
double x
in meters
struct LlaCoor_d lla
origin of local frame in LLA
double alt
in meters (above WGS84 reference ellipsoid or above MSL)
vector in Latitude, Longitude and Altitude
double y
in meters
double z
in meters
void ecef_of_ned_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
double x
in meters
void ecef_of_enu_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
void enu_of_lla_point_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct LlaCoor_d *lla)
double east
in meters
vector in East North Up coordinates Units: meters
double y
in meters
double x
in meters
void enu_of_ecef_vect_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
definition of the local (flat earth) coordinate system
vector in EarthCenteredEarthFixed coordinates
void lla_of_ecef_d(struct LlaCoor_d *out, struct EcefCoor_d *in)
void lla_of_utm_d(struct LlaCoor_d *lla, struct UtmCoor_d *utm)
rotation matrix
void ned_of_lla_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct LlaCoor_d *lla)
uint8_t zone
UTM zone number.
void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef)
Paparazzi generic macros for geodetic calculations.
void ned_of_ecef_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
unsigned char uint8_t
Definition: types.h:14
struct EcefCoor_d ecef
origin of local frame in ECEF
double lon
in radians
void ecef_of_enu_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
double z
in meters
Paparazzi double precision floating point algebra.
void utm_of_lla_d(struct UtmCoor_d *utm, struct LlaCoor_d *lla)
void ltp_def_from_lla_d(struct LtpDef_d *def, struct LlaCoor_d *lla)
void enu_of_ecef_point_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_lla_d(struct EcefCoor_d *out, struct LlaCoor_d *in)
double y
in meters
void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)