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_float.c File Reference
#include "pprz_geodetic_float.h"
#include "pprz_algebra_float.h"
#include <math.h>
#include "pprz_geodetic_double.h"
#include "math/pprz_geodetic_utm.h"
+ Include dependency graph for pprz_geodetic_float.c:

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 = cos(z.im); z.re = e*cos_z_im; float sin_z_im = sin(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); }
 

Functions

void ltp_def_from_ecef_f (struct LtpDef_f *def, struct EcefCoor_f *ecef)
 
void ltp_def_from_lla_f (struct LtpDef_f *def, struct LlaCoor_f *lla)
 
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 enu_of_ecef_vect_f (struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
 
void ned_of_ecef_vect_f (struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
 
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)
 
void ecef_of_enu_point_f (struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu)
 
void ecef_of_ned_point_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 ecef_of_ned_vect_f (struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
 
void lla_of_ecef_f (struct LlaCoor_f *out, struct EcefCoor_f *in)
 
void ecef_of_lla_f (struct EcefCoor_f *out, struct LlaCoor_f *in)
 
static float isometric_latitude_f (float phi, float e)
 
static float isometric_latitude_fast_f (float phi)
 
static float inverse_isometric_latitude_f (float lat, float e, float epsilon)
 
void utm_of_lla_f (struct UtmCoor_f *utm, struct LlaCoor_f *lla)
 
void lla_of_utm_f (struct LlaCoor_f *lla, struct UtmCoor_f *utm)
 

Macro Definition Documentation

#define CAdd (   z1,
  z2 
)    { z2.re += z1.re; z2.im += z1.im; }

Definition at line 225 of file pprz_geodetic_float.c.

Referenced by utm_of_lla_f().

#define CExp (   z)    { float e = exp(z.re); z.re = e*cos(z.im); z.im = e*sin(z.im); }

Definition at line 228 of file pprz_geodetic_float.c.

#define CI (   z)    { float tmp = z.re; z.re = - z.im; z.im = tmp; }

Definition at line 227 of file pprz_geodetic_float.c.

#define CScal (   k,
 
)    { z.re *= k; z.im *= k; }

Definition at line 224 of file pprz_geodetic_float.c.

Referenced by lla_of_utm_f(), and utm_of_lla_f().

#define CSin (   z)    { CI(z); struct complex _z = {-z.re, -z.im}; float e = exp(z.re); float cos_z_im = cos(z.im); z.re = e*cos_z_im; float sin_z_im = sin(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 231 of file pprz_geodetic_float.c.

Referenced by lla_of_utm_f(), and utm_of_lla_f().

#define CSub (   z1,
  z2 
)    { z2.re -= z1.re; z2.im -= z1.im; }

Definition at line 226 of file pprz_geodetic_float.c.

Referenced by lla_of_utm_f().

Function Documentation

void ecef_of_enu_point_f ( struct EcefCoor_f ecef,
struct LtpDef_f def,
struct EnuCoor_f enu 
)
void ecef_of_enu_vect_f ( struct EcefCoor_f ecef,
struct LtpDef_f def,
struct EnuCoor_f enu 
)
void ecef_of_lla_f ( struct EcefCoor_f out,
struct LlaCoor_f in 
)

Definition at line 199 of file pprz_geodetic_float.c.

References LlaCoor_f::alt, LlaCoor_f::lat, LlaCoor_f::lon, EcefCoor_f::x, EcefCoor_f::y, and EcefCoor_f::z.

Referenced by enu_of_lla_point_f(), ltp_def_from_lla_f(), ned_of_lla_point_f(), and parse_nmea_GPGGA().

+ Here is the caller graph for this function:

void ecef_of_ned_point_f ( struct EcefCoor_f ecef,
struct LtpDef_f def,
struct NedCoor_f ned 
)

Definition at line 120 of file pprz_geodetic_float.c.

References ecef_of_enu_point_f(), and ENU_OF_TO_NED.

+ Here is the call graph for this function:

void ecef_of_ned_vect_f ( struct EcefCoor_f ecef,
struct LtpDef_f def,
struct NedCoor_f ned 
)

Definition at line 153 of file pprz_geodetic_float.c.

References ecef_of_enu_vect_f(), and ENU_OF_TO_NED.

+ Here is the call graph for this function:

void enu_of_ecef_point_f ( struct EnuCoor_f enu,
struct LtpDef_f def,
struct EcefCoor_f ecef 
)

Definition at line 55 of file pprz_geodetic_float.c.

References LtpDef_f::ecef, LtpDef_f::ltp_of_ecef, MAT33_VECT3_MUL, and VECT3_DIFF.

Referenced by enu_of_lla_point_f(), and ned_of_ecef_point_f().

+ Here is the caller graph for this function:

void enu_of_ecef_vect_f ( struct EnuCoor_f enu,
struct LtpDef_f def,
struct EcefCoor_f ecef 
)

Definition at line 68 of file pprz_geodetic_float.c.

References LtpDef_f::ltp_of_ecef, and MAT33_VECT3_MUL.

Referenced by ned_of_ecef_vect_f().

+ Here is the caller graph for this function:

void enu_of_lla_point_f ( struct EnuCoor_f enu,
struct LtpDef_f def,
struct LlaCoor_f lla 
)

Definition at line 78 of file pprz_geodetic_float.c.

References ecef_of_lla_f(), and enu_of_ecef_point_f().

+ Here is the call graph for this function:

static float inverse_isometric_latitude_f ( float  lat,
float  e,
float  epsilon 
)
inlinestatic

Definition at line 242 of file pprz_geodetic_float.c.

Referenced by lla_of_utm_f().

+ Here is the caller graph for this function:

static float isometric_latitude_f ( float  phi,
float  e 
)
inlinestatic

Definition at line 234 of file pprz_geodetic_float.c.

Referenced by utm_of_lla_f().

+ Here is the caller graph for this function:

static float isometric_latitude_fast_f ( float  phi)
inlinestatic

Definition at line 238 of file pprz_geodetic_float.c.

Referenced by lla_of_utm_f(), and utm_of_lla_f().

+ Here is the caller graph for this function:

void lla_of_ecef_f ( struct LlaCoor_f out,
struct EcefCoor_f in 
)

Definition at line 164 of file pprz_geodetic_float.c.

References LlaCoor_f::alt, c, G, LlaCoor_f::lat, LlaCoor_f::lon, Q, EcefCoor_f::x, EcefCoor_f::y, and EcefCoor_f::z.

Referenced by ltp_def_from_ecef_f().

+ Here is the caller graph for this function:

void lla_of_utm_f ( struct LlaCoor_f lla,
struct UtmCoor_f utm 
)
void ltp_def_from_ecef_f ( struct LtpDef_f def,
struct EcefCoor_f ecef 
)

Definition at line 9 of file pprz_geodetic_float.c.

References LtpDef_f::ecef, LlaCoor_f::lat, LtpDef_f::lla, lla_of_ecef_f(), LlaCoor_f::lon, LtpDef_f::ltp_of_ecef, FloatMat33::m, and VECT3_COPY.

+ Here is the call graph for this function:

void ltp_def_from_lla_f ( struct LtpDef_f def,
struct LlaCoor_f lla 
)

Definition at line 32 of file pprz_geodetic_float.c.

References LtpDef_f::ecef, ecef_of_lla_f(), LlaCoor_f::lat, LtpDef_f::lla, LLA_COPY, LlaCoor_f::lon, LtpDef_f::ltp_of_ecef, and FloatMat33::m.

+ Here is the call graph for this function:

void ned_of_ecef_point_f ( struct NedCoor_f ned,
struct LtpDef_f def,
struct EcefCoor_f ecef 
)

Definition at line 61 of file pprz_geodetic_float.c.

References enu_of_ecef_point_f(), and ENU_OF_TO_NED.

Referenced by ned_of_lla_point_f().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ned_of_ecef_vect_f ( struct NedCoor_f ned,
struct LtpDef_f def,
struct EcefCoor_f ecef 
)

Definition at line 72 of file pprz_geodetic_float.c.

References enu_of_ecef_vect_f(), and ENU_OF_TO_NED.

+ Here is the call graph for this function:

void ned_of_lla_point_f ( struct NedCoor_f ned,
struct LtpDef_f def,
struct LlaCoor_f lla 
)

Definition at line 84 of file pprz_geodetic_float.c.

References ecef_of_lla_f(), and ned_of_ecef_point_f().

+ Here is the call graph for this function: