Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros 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 
54 struct LlaCoor_d {
55  double lon;
56  double lat;
57  double alt;
58 };
59 
63 struct NedCoor_d {
64  double x;
65  double y;
66  double z;
67 };
68 
72 struct EnuCoor_d {
73  double x;
74  double y;
75  double z;
76 };
77 
81 struct UtmCoor_d {
82  double north;
83  double east;
84  double alt;
86 };
87 
93 struct LtpDef_d {
94  struct EcefCoor_d ecef;
95  struct LlaCoor_d lla;
97  double hmsl;
98 };
99 
100 extern void lla_of_utm_d(struct LlaCoor_d* out, struct UtmCoor_d* in);
101 extern void ltp_def_from_ecef_d(struct LtpDef_d* def, struct EcefCoor_d* ecef);
102 extern void lla_of_ecef_d(struct LlaCoor_d* out, struct EcefCoor_d* in);
103 extern void ecef_of_lla_d(struct EcefCoor_d* out, struct LlaCoor_d* in);
104 
105 extern void enu_of_ecef_point_d(struct EnuCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
106 extern void ned_of_ecef_point_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
107 
108 extern void enu_of_ecef_vect_d(struct EnuCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
109 extern void ned_of_ecef_vect_d(struct NedCoor_d* ned, struct LtpDef_d* def, struct EcefCoor_d* ecef);
110 
111 extern void ecef_of_enu_point_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct EnuCoor_d* enu);
112 extern void ecef_of_ned_point_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned);
113 
114 extern void ecef_of_enu_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct EnuCoor_d* enu);
115 extern void ecef_of_ned_vect_d(struct EcefCoor_d* ecef, struct LtpDef_d* def, struct NedCoor_d* ned);
116 
117 extern double gc_of_gd_lat_d(double gd_lat, double hmsl);
118 
119 
120 #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)