Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_geodetic_float.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
28#ifndef PPRZ_GEODETIC_FLOAT_H
29#define PPRZ_GEODETIC_FLOAT_H
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include "pprz_geodetic.h"
36#include "pprz_algebra_float.h"
37#include "std.h"
38
45struct EcefCoor_f {
46 float x;
47 float y;
48 float z;
49};
50
54struct LlaCoor_f {
55 float lat;
56 float lon;
57 float alt;
58};
59
63struct NedCoor_f {
64 float x;
65 float y;
66 float z;
67};
68
72struct EnuCoor_f {
73 float x;
74 float y;
75 float z;
76};
77
81struct UtmCoor_f {
82 float north;
83 float east;
84 float alt;
86};
87
93struct LtpDef_f {
95 struct LlaCoor_f lla;
97 float hmsl;
98};
99
100extern void lla_of_utm_f(struct LlaCoor_f *lla, struct UtmCoor_f *utm);
101extern void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla);
102extern void ltp_def_from_ecef_f(struct LtpDef_f *def, struct EcefCoor_f *ecef);
103extern void ltp_def_from_lla_f(struct LtpDef_f *def, struct LlaCoor_f *lla);
104extern void lla_of_ecef_f(struct LlaCoor_f *out, struct EcefCoor_f *in);
105extern void ecef_of_lla_f(struct EcefCoor_f *out, struct LlaCoor_f *in);
106extern void enu_of_ecef_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef);
107extern void ned_of_ecef_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef);
108extern void enu_of_ecef_vect_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef);
109extern void ned_of_ecef_vect_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef);
110extern void enu_of_lla_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct LlaCoor_f *lla);
111extern void ned_of_lla_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct LlaCoor_f *lla);
112
113/* not enough precision with floats - used the double version */
114extern void ecef_of_enu_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu);
115extern void ecef_of_ned_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned);
116extern void ecef_of_enu_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu);
117extern void ecef_of_ned_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned);
118/* end use double versions */
119
120#ifdef __cplusplus
121} /* extern "C" */
122#endif
123
124#endif /* PPRZ_GEODETIC_FLOAT_H */
rotation matrix
uint16_t foo
Definition main_demo5.c:58
Paparazzi floating point algebra.
Paparazzi generic macros for geodetic calculations.
float alt
in meters (normally above WGS84 reference ellipsoid)
float y
in meters
float x
in meters
void ecef_of_enu_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu)
float z
in meters
void enu_of_ecef_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void ned_of_ecef_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void lla_of_utm_f(struct LlaCoor_f *lla, struct UtmCoor_f *utm)
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
void ecef_of_ned_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
void ecef_of_enu_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu)
void ltp_def_from_lla_f(struct LtpDef_f *def, struct LlaCoor_f *lla)
void ecef_of_lla_f(struct EcefCoor_f *out, struct LlaCoor_f *in)
uint8_t zone
UTM zone number.
float lon
in radians
float z
in meters
void ecef_of_ned_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
float x
in meters
void enu_of_lla_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct LlaCoor_f *lla)
void ned_of_lla_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct LlaCoor_f *lla)
float x
in meters
void ned_of_ecef_vect_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void enu_of_ecef_vect_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
float east
in meters
float lat
in radians
float north
in meters
void lla_of_ecef_f(struct LlaCoor_f *out, struct EcefCoor_f *in)
float hmsl
Height above mean sea level in meters.
void ltp_def_from_ecef_f(struct LtpDef_f *def, struct EcefCoor_f *ecef)
float y
in meters
struct FloatRMat ltp_of_ecef
rotation from ECEF to local frame
struct EcefCoor_f ecef
origin of local frame in ECEF
float z
in meters
struct LlaCoor_f lla
origin of local frame in LLA
float y
in meters
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
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
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.