![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Paparazzi floating point math for geodetic calculations. More...
#include "pprz_geodetic_float.h"
#include "pprz_algebra_float.h"
#include <math.h>
#include "pprz_geodetic_double.h"
#include "math/pprz_geodetic_utm.h"
Go to the source code of this file.
Data Structures | |
struct | complex |
Macros | |
#define | CScal(k, z) { z.re *= k; z.im *= k; } |
#define | CAdd(z1, z2) { z2.re += z1.re; z2.im += z1.im; } |
#define | CSub(z1, z2) { z2.re -= z1.re; z2.im -= z1.im; } |
#define | CI(z) { float tmp = z.re; z.re = - z.im; z.im = tmp; } |
#define | CExp(z) { float e = exp(z.re); z.re = e*cos(z.im); z.im = e*sin(z.im); } |
#define | CSin(z) { CI(z); struct complex _z = {-z.re, -z.im}; float e = exp(z.re); float cos_z_im = cosf(z.im); z.re = e*cos_z_im; float sin_z_im = sinf(z.im); z.im = e*sin_z_im; _z.re = cos_z_im/e; _z.im = -sin_z_im/e; CSub(_z, z); CScal(-0.5, z); CI(z); } |
Paparazzi floating point math for geodetic calculations.
Definition in file pprz_geodetic_float.c.
struct complex |
Definition at line 266 of file pprz_geodetic_float.c.
Data Fields | ||
---|---|---|
float | im | |
float | re |
Definition at line 268 of file pprz_geodetic_float.c.
Definition at line 271 of file pprz_geodetic_float.c.
Definition at line 270 of file pprz_geodetic_float.c.
#define CScal | ( | k, | |
z | |||
) | { z.re *= k; z.im *= k; } |
Definition at line 267 of file pprz_geodetic_float.c.
#define CSin | ( | z | ) | { CI(z); struct complex _z = {-z.re, -z.im}; float e = exp(z.re); float cos_z_im = cosf(z.im); z.re = e*cos_z_im; float sin_z_im = sinf(z.im); z.im = e*sin_z_im; _z.re = cos_z_im/e; _z.im = -sin_z_im/e; CSub(_z, z); CScal(-0.5, z); CI(z); } |
Definition at line 274 of file pprz_geodetic_float.c.
Definition at line 269 of file pprz_geodetic_float.c.
void ecef_of_enu_point_f | ( | struct EcefCoor_f * | ecef, |
struct LtpDef_f * | def, | ||
struct EnuCoor_f * | enu | ||
) |
Definition at line 129 of file pprz_geodetic_float.c.
References foo, DoubleRMat::m, MAT33_VECT3_TRANSP_MUL, EcefCoor_f::x, EnuCoor_f::x, EcefCoor_f::y, and EcefCoor_f::z.
Referenced by ecef_of_ned_point_f(), and stateCalcPositionLla_f().
void ecef_of_enu_vect_f | ( | struct EcefCoor_f * | ecef, |
struct LtpDef_f * | def, | ||
struct EnuCoor_f * | enu | ||
) |
Definition at line 164 of file pprz_geodetic_float.c.
References foo, DoubleRMat::m, MAT33_VECT3_TRANSP_MUL, EcefCoor_f::x, EnuCoor_f::x, EcefCoor_f::y, and EcefCoor_f::z.
Referenced by ecef_of_ned_vect_f().
void ecef_of_lla_f | ( | struct EcefCoor_f * | out, |
struct LlaCoor_f * | in | ||
) |
Definition at line 241 of file pprz_geodetic_float.c.
References f, foo, EcefCoor_f::x, EcefCoor_f::y, and EcefCoor_f::z.
Referenced by ecef_of_lla_i(), enu_of_lla_point_f(), ltp_def_from_lla_f(), ned_of_lla_point_f(), nmea_parse_GGA(), stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_i(), and stateCalcPositionNed_i().
void ecef_of_ned_point_f | ( | struct EcefCoor_f * | ecef, |
struct LtpDef_f * | def, | ||
struct NedCoor_f * | ned | ||
) |
Definition at line 157 of file pprz_geodetic_float.c.
References ecef_of_enu_point_f(), ENU_OF_TO_NED, and foo.
Referenced by detection_cb(), stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionLla_f(), and tag_tracking_report().
void ecef_of_ned_vect_f | ( | struct EcefCoor_f * | ecef, |
struct LtpDef_f * | def, | ||
struct NedCoor_f * | ned | ||
) |
Definition at line 192 of file pprz_geodetic_float.c.
References ecef_of_enu_vect_f(), ENU_OF_TO_NED, and foo.
Referenced by stateCalcAccelEcef_f(), and stateCalcSpeedEcef_f().
void enu_of_ecef_point_f | ( | struct EnuCoor_f * | enu, |
struct LtpDef_f * | def, | ||
struct EcefCoor_f * | ecef | ||
) |
Definition at line 85 of file pprz_geodetic_float.c.
References foo, MAT33_VECT3_MUL, and VECT3_DIFF.
Referenced by enu_of_lla_point_f(), ned_of_ecef_point_f(), stateCalcPositionEnu_f(), and stateCalcPositionEnu_i().
void enu_of_ecef_vect_f | ( | struct EnuCoor_f * | enu, |
struct LtpDef_f * | def, | ||
struct EcefCoor_f * | ecef | ||
) |
Definition at line 100 of file pprz_geodetic_float.c.
References foo, and MAT33_VECT3_MUL.
Referenced by ned_of_ecef_vect_f(), and stateCalcSpeedEnu_f().
Definition at line 112 of file pprz_geodetic_float.c.
References ecef_of_lla_f(), enu_of_ecef_point_f(), and foo.
Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), nav_land_at_loc(), and stateCalcPositionEnu_f().
Definition at line 287 of file pprz_geodetic_float.c.
Referenced by lla_of_utm_f().
Definition at line 277 of file pprz_geodetic_float.c.
References foo.
Referenced by utm_of_lla_f().
Definition at line 282 of file pprz_geodetic_float.c.
References foo.
Referenced by lla_of_utm_f(), and utm_of_lla_f().
void lla_of_ecef_f | ( | struct LlaCoor_f * | out, |
struct EcefCoor_f * | in | ||
) |
Definition at line 204 of file pprz_geodetic_float.c.
References LlaCoor_f::alt, b, f, foo, LlaCoor_f::lat, LlaCoor_f::lon, P, s, and z2.
Referenced by detection_cb(), lla_of_ecef_i(), ltp_def_from_ecef_f(), stateCalcPositionLla_f(), and tag_tracking_report().
Definition at line 344 of file pprz_geodetic_float.c.
References LlaCoor_f::alt, CScal, CSin, CSub, DELTA_EAST, DELTA_NORTH, E, foo, complex::im, inverse_isometric_latitude_f(), isometric_latitude_fast_f(), LambdaOfUtmZone, LlaCoor_f::lat, LlaCoor_f::lon, N, complex::re, scale, serie_coeff_proj_mercator, and serie_coeff_proj_mercator_inverse.
Referenced by acInfoCalcPositionLla_f(), acInfoCalcPositionLla_i(), lla_of_utm_i(), nav_reset_utm_zone(), put_lat_lon_home(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateGetLlaOrigin_f(), stateGetLlaOrigin_i(), and vPoint().
void ltp_def_from_ecef_f | ( | struct LtpDef_f * | def, |
struct EcefCoor_f * | ecef | ||
) |
Definition at line 36 of file pprz_geodetic_float.c.
References foo, lla_of_ecef_f(), and VECT3_COPY.
Definition at line 60 of file pprz_geodetic_float.c.
References ecef_of_lla_f(), foo, and LLA_COPY.
void ned_of_ecef_point_f | ( | struct NedCoor_f * | ned, |
struct LtpDef_f * | def, | ||
struct EcefCoor_f * | ecef | ||
) |
Definition at line 92 of file pprz_geodetic_float.c.
References enu_of_ecef_point_f(), ENU_OF_TO_NED, and foo.
Referenced by ned_of_lla_point_f(), stateCalcPositionNed_f(), and stateCalcPositionNed_i().
void ned_of_ecef_vect_f | ( | struct NedCoor_f * | ned, |
struct LtpDef_f * | def, | ||
struct EcefCoor_f * | ecef | ||
) |
Definition at line 105 of file pprz_geodetic_float.c.
References enu_of_ecef_vect_f(), ENU_OF_TO_NED, and foo.
Referenced by gps_cb(), ins_float_invariant_update_gps(), stateCalcAccelNed_f(), stateCalcHorizontalSpeedNorm_i(), and stateCalcSpeedNed_f().
Definition at line 119 of file pprz_geodetic_float.c.
References ecef_of_lla_f(), foo, and ned_of_ecef_point_f().
Referenced by stateCalcPositionNed_f().
Definition at line 308 of file pprz_geodetic_float.c.
References LlaCoor_f::alt, CAdd, CScal, CSin, DELTA_EAST, DELTA_NORTH, E, foo, isometric_latitude_f(), isometric_latitude_fast_f(), LambdaOfUtmZone, LlaCoor_f::lat, LlaCoor_f::lon, N, serie_coeff_proj_mercator, and UtmZoneOfLlaLonRad.
Referenced by acInfoCalcPositionUtm_f(), acInfoCalcPositionUtm_i(), copilot_parse_move_wp_dl(), mission_point_of_lla(), nav_land_at_loc(), nav_parse_MOVE_WP(), nav_reset_utm_zone(), nav_takeoff_from_loc(), sim_overwrite_ins(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), and utm_of_lla_i().