Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
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 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #include "pprz_geodetic.h"
38 #include "pprz_algebra_double.h"
39 #include "std.h"
40 
47 struct EcefCoor_d {
48  double x;
49  double y;
50  double z;
51 };
52 
56 struct LlaCoor_d {
57  double lon;
58  double lat;
59  double alt;
60 };
61 
65 struct NedCoor_d {
66  double x;
67  double y;
68  double z;
69 };
70 
74 struct EnuCoor_d {
75  double x;
76  double y;
77  double z;
78 };
79 
83 struct UtmCoor_d {
84  double north;
85  double east;
86  double alt;
88 };
89 
95 struct LtpDef_d {
96  struct EcefCoor_d ecef;
97  struct LlaCoor_d lla;
99  double hmsl;
100 };
101 
102 extern void lla_of_utm_d(struct LlaCoor_d* out, struct UtmCoor_d* in);
103 extern void ltp_def_from_ecef_d(struct LtpDef_d* def, struct EcefCoor_d* ecef);
104 extern void lla_of_ecef_d(struct LlaCoor_d* out, struct EcefCoor_d* in);
105 extern void ecef_of_lla_d(struct EcefCoor_d* out, struct LlaCoor_d* in);
106 
107 extern void enu_of_ecef_point_d(struct EnuCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
108 extern void ned_of_ecef_point_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
109 
110 extern void enu_of_ecef_vect_d(struct EnuCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
111 extern void ned_of_ecef_vect_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
112 
113 extern void ecef_of_enu_point_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct EnuCoor_d* enu);
114 extern void ecef_of_ned_point_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned);
115 
116 extern void ecef_of_enu_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct EnuCoor_d* enu);
117 extern void ecef_of_ned_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned);
118 
119 extern void enu_of_lla_point_d(struct EnuCoor_d* enu, struct LtpDef_d* def, struct LlaCoor_d* lla);
120 extern void ned_of_lla_point_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct LlaCoor_d* lla);
121 
122 extern double gc_of_gd_lat_d(double gd_lat, double hmsl);
123 
124 #ifdef __cplusplus
125 } /* extern "C" */
126 #endif
127 
128 #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
void enu_of_lla_point_d(struct EnuCoor_d *enu, struct LtpDef_d *def, struct LlaCoor_d *lla)
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 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 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)