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_double.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_DOUBLE_H
31 #define PPRZ_GEODETIC_DOUBLE_H
32 
33 #include "pprz_geodetic.h"
34 #include "pprz_algebra_double.h"
35 #include "std.h"
36 
43 struct EcefCoor_d {
44  double x;
45  double y;
46  double z;
47 };
48 
52 struct LlaCoor_d {
53  double lon;
54  double lat;
55  double alt;
56 };
57 
61 struct NedCoor_d {
62  double x;
63  double y;
64  double z;
65 };
66 
70 struct EnuCoor_d {
71  double x;
72  double y;
73  double z;
74 };
75 
79 struct UtmCoor_d {
80  double north;
81  double east;
82  double alt;
84 };
85 
91 struct LtpDef_d {
92  struct EcefCoor_d ecef;
93  struct LlaCoor_d lla;
95  double hmsl;
96 };
97 
98 extern void lla_of_utm_d(struct LlaCoor_d* out, struct UtmCoor_d* in);
99 extern void ltp_def_from_ecef_d(struct LtpDef_d* def, struct EcefCoor_d* ecef);
100 extern void lla_of_ecef_d(struct LlaCoor_d* out, struct EcefCoor_d* in);
101 extern void ecef_of_lla_d(struct EcefCoor_d* out, struct LlaCoor_d* in);
102 
103 extern void enu_of_ecef_point_d(struct EnuCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
104 extern void ned_of_ecef_point_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
105 
106 extern void enu_of_ecef_vect_d(struct EnuCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
107 extern void ned_of_ecef_vect_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
108 
109 extern void ecef_of_enu_point_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct EnuCoor_d* enu);
110 extern void ecef_of_ned_point_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned);
111 
112 extern void ecef_of_enu_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct EnuCoor_d* enu);
113 extern void ecef_of_ned_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned);
114 
115 extern double gc_of_gd_lat_d(double gd_lat, double hmsl);
116 
117 
118 #endif /* PPRZ_GEODETIC_DOUBLE_H */
vector in North East Down coordinates Units: meters
struct LlaCoor_d lla
origin of local frame in LLA
double alt
in meters above WGS84 reference ellipsoid
void ned_of_ecef_vect_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
double z
in meters
double x
in meters
void lla_of_ecef_d(struct LlaCoor_d *out, struct EcefCoor_d *in)
definition of the local (flat earth) coordinate system
void enu_of_ecef_vect_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
struct EcefCoor_d ecef
origin of local frame in ECEF
double y
in meters
vector in East North Up coordinates Units: meters
double x
in meters
double east
in meters
struct DoubleMat33 ltp_of_ecef
rotation from ECEF to local frame
void enu_of_ecef_point_d(struct EnuCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
vector in EarthCenteredEarthFixed coordinates
double z
in meters
double lon
in radians
double y
in meters
double alt
in meters above WGS84 reference ellipsoid
void lla_of_utm_d(struct LlaCoor_d *out, struct UtmCoor_d *in)
void ecef_of_ned_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
double north
in meters
unsigned char uint8_t
Definition: types.h:14
double lat
in radians
double z
in meters
double x
in meters
double gc_of_gd_lat_d(double gd_lat, double hmsl)
Paparazzi double precision floating point algebra.
void ecef_of_ned_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct NedCoor_d *ned)
void ltp_def_from_ecef_d(struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_enu_point_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)
uint8_t zone
UTM zone number.
vector in Latitude, Longitude and Altitude
double hmsl
height in meters above mean sea level
void ecef_of_lla_d(struct EcefCoor_d *out, struct LlaCoor_d *in)
double y
in meters
position in UTM coordinates Units: meters
void ned_of_ecef_point_d(struct NedCoor_d *ned, struct LtpDef_d *def, struct EcefCoor_d *ecef)
void ecef_of_enu_vect_d(struct EcefCoor_d *ecef, struct LtpDef_d *def, struct EnuCoor_d *enu)