Paparazzi UAS  v7.0_unstable
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;
100  struct DoubleRMat ltp_of_ecef;
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 */
rotation matrix
double x
in meters
struct EcefCoor_d ecef
origin of local frame in ECEF
uint8_t zone
UTM zone number.
double y
in meters
double y
in meters
double z
in meters
struct LlaCoor_d lla
origin of local frame in LLA
double z
in meters
double z
in meters
double east
in meters
double y
in meters
double x
in meters
double lat
in radians
double north
in meters
double alt
in meters above WGS84 reference ellipsoid
struct DoubleRMat ltp_of_ecef
rotation from ECEF to local frame
double lon
in radians
double alt
in meters (above WGS84 reference ellipsoid or above MSL)
double hmsl
height in meters above mean sea level
double x
in meters
void lla_of_utm_d(struct LlaCoor_d *lla, struct UtmCoor_d *utm)
double gc_of_gd_lat_d(double gd_lat, double hmsl)
void ned_of_lla_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct LlaCoor_d *lla)
void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef)
void enu_of_ecef_point_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void enu_of_lla_point_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct LlaCoor_d *lla)
void ecef_of_enu_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
void enu_of_ecef_vect_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_ned_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void lla_of_ecef_d(struct LlaCoor_d *out, struct EcefCoor_d *in)
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 ned_of_ecef_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_ned_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
void ecef_of_lla_d(struct EcefCoor_d *out, struct LlaCoor_d *in)
void ecef_of_enu_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
vector in EarthCenteredEarthFixed coordinates
vector in East North Up coordinates Units: meters
vector in Latitude, Longitude and Altitude
definition of the local (flat earth) coordinate system
vector in North East Down coordinates Units: meters
position in UTM coordinates Units: meters
Paparazzi double precision floating point algebra.
Paparazzi generic macros for geodetic calculations.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98