Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 
NedCoor_d::y
double y
in meters
Definition: pprz_geodetic_double.h:69
ltp_def_from_ecef_d
void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef)
Definition: pprz_geodetic_double.c:34
EnuCoor_d
vector in East North Up coordinates Units: meters
Definition: pprz_geodetic_double.h:76
pprz_geodetic.h
Paparazzi generic macros for geodetic calculations.
LlaCoor_d
vector in Latitude, Longitude and Altitude
Definition: pprz_geodetic_double.h:58
EnuCoor_d::x
double x
in meters
Definition: pprz_geodetic_double.h:77
ecef_of_lla_d
void ecef_of_lla_d(struct EcefCoor_d *out, struct LlaCoor_d *in)
Definition: pprz_geodetic_double.c:120
LlaCoor_d::alt
double alt
in meters above WGS84 reference ellipsoid
Definition: pprz_geodetic_double.h:61
ltp_def_from_lla_d
void ltp_def_from_lla_d(struct LtpDef_d *def, struct LlaCoor_d *lla)
Definition: pprz_geodetic_double.c:57
NedCoor_d::x
double x
in meters
Definition: pprz_geodetic_double.h:68
LtpDef_d::hmsl
double hmsl
height in meters above mean sea level
Definition: pprz_geodetic_double.h:101
ecef_of_enu_point_d
void ecef_of_enu_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
Definition: pprz_geodetic_double.c:168
LtpDef_d::ltp_of_ecef
struct DoubleRMat ltp_of_ecef
rotation from ECEF to local frame
Definition: pprz_geodetic_double.h:100
EnuCoor_d::z
double z
in meters
Definition: pprz_geodetic_double.h:79
UtmCoor_d::north
double north
in meters
Definition: pprz_geodetic_double.h:86
LtpDef_d::ecef
struct EcefCoor_d ecef
origin of local frame in ECEF
Definition: pprz_geodetic_double.h:98
UtmCoor_d::east
double east
in meters
Definition: pprz_geodetic_double.h:87
ecef_of_ned_vect_d
void ecef_of_ned_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
Definition: pprz_geodetic_double.c:186
ecef_of_ned_point_d
void ecef_of_ned_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
Definition: pprz_geodetic_double.c:174
std.h
lla_of_utm_d
void lla_of_utm_d(struct LlaCoor_d *lla, struct UtmCoor_d *utm)
Definition: pprz_geodetic_double.c:311
uint8_t
unsigned char uint8_t
Definition: types.h:14
NedCoor_d::z
double z
in meters
Definition: pprz_geodetic_double.h:70
NedCoor_d
vector in North East Down coordinates Units: meters
Definition: pprz_geodetic_double.h:67
LlaCoor_d::lat
double lat
in radians
Definition: pprz_geodetic_double.h:59
ned_of_lla_point_d
void ned_of_lla_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct LlaCoor_d *lla)
Definition: pprz_geodetic_double.c:201
LtpDef_d
definition of the local (flat earth) coordinate system
Definition: pprz_geodetic_double.h:97
enu_of_lla_point_d
void enu_of_lla_point_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct LlaCoor_d *lla)
Definition: pprz_geodetic_double.c:194
UtmCoor_d
position in UTM coordinates Units: meters
Definition: pprz_geodetic_double.h:85
pprz_algebra_double.h
Paparazzi double precision floating point algebra.
DoubleRMat
rotation matrix
Definition: pprz_algebra_double.h:69
ned_of_ecef_point_d
void ned_of_ecef_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
Definition: pprz_geodetic_double.c:147
EcefCoor_d
vector in EarthCenteredEarthFixed coordinates
Definition: pprz_geodetic_double.h:49
EnuCoor_d::y
double y
in meters
Definition: pprz_geodetic_double.h:78
EcefCoor_d::y
double y
in meters
Definition: pprz_geodetic_double.h:51
lla_of_ecef_d
void lla_of_ecef_d(struct LlaCoor_d *out, struct EcefCoor_d *in)
Definition: pprz_geodetic_double.c:83
gc_of_gd_lat_d
double gc_of_gd_lat_d(double gd_lat, double hmsl)
Definition: pprz_geodetic_double.c:210
ned_of_ecef_vect_d
void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
Definition: pprz_geodetic_double.c:159
enu_of_ecef_vect_d
void enu_of_ecef_vect_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
Definition: pprz_geodetic_double.c:154
UtmCoor_d::zone
uint8_t zone
UTM zone number.
Definition: pprz_geodetic_double.h:89
EcefCoor_d::x
double x
in meters
Definition: pprz_geodetic_double.h:50
EcefCoor_d::z
double z
in meters
Definition: pprz_geodetic_double.h:52
LlaCoor_d::lon
double lon
in radians
Definition: pprz_geodetic_double.h:60
LtpDef_d::lla
struct LlaCoor_d lla
origin of local frame in LLA
Definition: pprz_geodetic_double.h:99
enu_of_ecef_point_d
void enu_of_ecef_point_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
Definition: pprz_geodetic_double.c:140
utm_of_lla_d
void utm_of_lla_d(struct UtmCoor_d *utm, struct LlaCoor_d *lla)
Definition: pprz_geodetic_double.c:276
UtmCoor_d::alt
double alt
in meters (above WGS84 reference ellipsoid or above MSL)
Definition: pprz_geodetic_double.h:88
ecef_of_enu_vect_d
void ecef_of_enu_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
Definition: pprz_geodetic_double.c:181