Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Fixed Point Geodetic functions
+ Collaboration diagram for Fixed Point Geodetic functions:

Data Structures

struct  EcefCoor_i
 vector in EarthCenteredEarthFixed coordinates More...
 
struct  LlaCoor_i
 vector in Latitude, Longitude and Altitude More...
 
struct  NedCoor_i
 vector in North East Down coordinates More...
 
struct  EnuCoor_i
 vector in East North Up coordinates More...
 
struct  UtmCoor_i
 position in UTM coordinates More...
 
struct  LtpDef_i
 definition of the local (flat earth) coordinate system More...
 

Macros

#define CM_OF_M(_m)   ((_m)*1e2)
 
#define M_OF_CM(_cm)   ((_cm)/1e2)
 
#define MM_OF_M(_m)   ((_m)*1e3)
 
#define M_OF_MM(_mm)   ((_mm)/1e3)
 
#define EM7RAD_OF_RAD(_r)   ((_r)*1e7)
 
#define RAD_OF_EM7RAD(_r)   ((_r)/1e7)
 
#define EM7DEG_OF_DEG(_r)   ((_r)*1e7)
 
#define DEG_OF_EM7DEG(_r)   ((_r)/1e7)
 
#define EM7DEG_OF_RAD(_r)   (DegOfRad(_r)*1e7)
 
#define RAD_OF_EM7DEG(_r)   (RadOfDeg(_r)/1e7)
 
#define HIGH_RES_TRIG_FRAC   20
 
#define VECT3_ENU_OF_NED(_o, _i)
 
#define VECT3_NED_OF_ENU(_o, _i)   VECT3_ENU_OF_NED(_o,_i)
 
#define INT32_VECT3_NED_OF_ENU(_o, _i)   VECT3_ENU_OF_NED(_o,_i)
 
#define INT32_VECT3_ENU_OF_NED(_o, _i)   VECT3_ENU_OF_NED(_o,_i)
 
#define VECT3_CM_OF_REAL(_o, _i)
 
#define VECT3_FLOAT_OF_CM(_o, _i)
 
#define VECT3_DOUBLE_OF_CM(_o, _i)
 
#define ECEF_BFP_OF_REAL(_o, _i)   VECT3_CM_OF_REAL(_o, _i)
 
#define ECEF_FLOAT_OF_BFP(_o, _i)   VECT3_FLOAT_OF_CM(_o, _i)
 
#define ECEF_DOUBLE_OF_BFP(_o, _i)   VECT3_DOUBLE_OF_CM(_o, _i)
 
#define LLA_BFP_OF_REAL(_o, _i)
 
#define LLA_FLOAT_OF_BFP(_o, _i)
 
#define LLA_DOUBLE_OF_BFP(_o, _i)
 
#define NED_BFP_OF_REAL(_o, _i)
 
#define ENU_BFP_OF_REAL(_o, _i)   NED_BFP_OF_REAL(_o, _i)
 
#define NED_FLOAT_OF_BFP(_o, _i)
 
#define ENU_FLOAT_OF_BFP(_o, _i)   NED_FLOAT_OF_BFP(_o, _i)
 
#define INT32_VECT2_ENU_OF_NED(_o, _i)
 
#define INT32_VECT2_NED_OF_ENU(_o, _i)   INT32_VECT2_ENU_OF_NED(_o,_i)
 
#define HIGH_RES_RMAT_BFP_OF_REAL(_ei, _ef)
 
#define HIGH_RES_RMAT_FLOAT_OF_BFP(_ef, _ei)
 
#define HIGH_RES_RMAT_DOUBLE_OF_BFP(_ef, _ei)
 
#define UTM_FLOAT_OF_BFP(_o, _i)
 
#define UTM_DOUBLE_OF_BFP(_o, _i)
 
#define UTM_BFP_OF_REAL(_o, _i)
 

Functions

void lla_of_utm_i (struct LlaCoor_i *lla, struct UtmCoor_i *utm)
 Convert a UTM to LLA. More...
 
void utm_of_lla_i (struct UtmCoor_i *utm, struct LlaCoor_i *lla)
 Convert a LLA to UTM. More...
 
void ltp_of_ecef_rmat_from_lla_i (struct Int32RMat *ltp_of_ecef, struct LlaCoor_i *lla)
 
void ltp_def_from_ecef_i (struct LtpDef_i *def, struct EcefCoor_i *ecef)
 
void ltp_def_from_lla_i (struct LtpDef_i *def, struct LlaCoor_i *lla)
 
void lla_of_ecef_i (struct LlaCoor_i *out, struct EcefCoor_i *in)
 Convert a ECEF to LLA. More...
 
void ecef_of_lla_i (struct EcefCoor_i *out, struct LlaCoor_i *in)
 Convert a LLA to ECEF. More...
 
void enu_of_ecef_point_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct EcefCoor_i *ecef)
 Convert a point from ECEF to local ENU. More...
 
void ned_of_ecef_point_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
 Convert a point from ECEF to local NED. More...
 
void enu_of_ecef_pos_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct EcefCoor_i *ecef)
 Convert a ECEF position to local ENU. More...
 
void ned_of_ecef_pos_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
 Convert a ECEF position to local NED. More...
 
void enu_of_ecef_vect_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct EcefCoor_i *ecef)
 Rotate a vector from ECEF to ENU. More...
 
void ned_of_ecef_vect_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
 Rotate a vector from ECEF to NED. More...
 
void enu_of_lla_point_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct LlaCoor_i *lla)
 Convert a point from LLA to local ENU. More...
 
void ned_of_lla_point_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct LlaCoor_i *lla)
 Convert a point from LLA to local NED. More...
 
void enu_of_lla_pos_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct LlaCoor_i *lla)
 Convert a point from LLA to local ENU. More...
 
void ned_of_lla_pos_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct LlaCoor_i *lla)
 Convert a point from LLA to local NED. More...
 
void enu_of_lla_vect_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct LlaCoor_i *lla)
 
void ned_of_lla_vect_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct LlaCoor_i *lla)
 
void ecef_of_enu_point_i (struct EcefCoor_i *ecef, struct LtpDef_i *def, struct EnuCoor_i *enu)
 Convert a point in local ENU to ECEF. More...
 
void ecef_of_ned_point_i (struct EcefCoor_i *ecef, struct LtpDef_i *def, struct NedCoor_i *ned)
 Convert a point in local NED to ECEF. More...
 
void ecef_of_enu_pos_i (struct EcefCoor_i *ecef, struct LtpDef_i *def, struct EnuCoor_i *enu)
 Convert a local ENU position to ECEF. More...
 
void ecef_of_ned_pos_i (struct EcefCoor_i *ecef, struct LtpDef_i *def, struct NedCoor_i *ned)
 Convert a local NED position to ECEF. More...
 
void ecef_of_enu_vect_i (struct EcefCoor_i *ecef, struct LtpDef_i *def, struct EnuCoor_i *enu)
 Rotate a vector from ENU to ECEF. More...
 
void ecef_of_ned_vect_i (struct EcefCoor_i *ecef, struct LtpDef_i *def, struct NedCoor_i *ned)
 Rotate a vector from NED to ECEF. More...
 

Detailed Description


Data Structure Documentation

◆ EcefCoor_i

struct EcefCoor_i

vector in EarthCenteredEarthFixed coordinates

Origin at center of mass of the Earth. Z-axis is pointing north, the x-axis intersects the sphere of the earth at 0° latitude (Equator) and 0° longitude (Greenwich). Y-axis completes it to right-hand system. Units: centimeters

Definition at line 50 of file pprz_geodetic_int.h.

Data Fields
int32_t x in centimeters
int32_t y in centimeters
int32_t z in centimeters

◆ LlaCoor_i

struct LlaCoor_i

vector in Latitude, Longitude and Altitude

Definition at line 59 of file pprz_geodetic_int.h.

Data Fields
int32_t alt in millimeters above WGS84 reference ellipsoid
int32_t lat in degrees*1e7
int32_t lon in degrees*1e7

◆ NedCoor_i

struct NedCoor_i

vector in North East Down coordinates

Definition at line 68 of file pprz_geodetic_int.h.

Data Fields
int32_t x North.
int32_t y East.
int32_t z Down.

◆ EnuCoor_i

struct EnuCoor_i

vector in East North Up coordinates

Definition at line 77 of file pprz_geodetic_int.h.

Data Fields
int32_t x East.
int32_t y North.
int32_t z Up.

◆ UtmCoor_i

struct UtmCoor_i

position in UTM coordinates

Definition at line 86 of file pprz_geodetic_int.h.

Data Fields
int32_t alt in millimeters (above WGS84 reference ellipsoid or above MSL)
int32_t east in centimeters
int32_t north in centimeters
uint8_t zone UTM zone number.

◆ LtpDef_i

struct LtpDef_i

definition of the local (flat earth) coordinate system

Defines the origin of the local coordinate system in ECEF and LLA coordinates and the roation matrix from ECEF to local frame

Definition at line 98 of file pprz_geodetic_int.h.

+ Collaboration diagram for LtpDef_i:
Data Fields
struct EcefCoor_i ecef Reference point in ecef.
int32_t hmsl Height above mean sea level in mm.
struct LlaCoor_i lla Reference point in lla.
struct Int32RMat ltp_of_ecef Rotation matrix.

Macro Definition Documentation

◆ CM_OF_M

#define CM_OF_M (   _m)    ((_m)*1e2)

Definition at line 131 of file pprz_geodetic_int.h.

◆ DEG_OF_EM7DEG

#define DEG_OF_EM7DEG (   _r)    ((_r)/1e7)

Definition at line 138 of file pprz_geodetic_int.h.

◆ ECEF_BFP_OF_REAL

#define ECEF_BFP_OF_REAL (   _o,
  _i 
)    VECT3_CM_OF_REAL(_o, _i)

Definition at line 172 of file pprz_geodetic_int.h.

◆ ECEF_DOUBLE_OF_BFP

#define ECEF_DOUBLE_OF_BFP (   _o,
  _i 
)    VECT3_DOUBLE_OF_CM(_o, _i)

Definition at line 174 of file pprz_geodetic_int.h.

◆ ECEF_FLOAT_OF_BFP

#define ECEF_FLOAT_OF_BFP (   _o,
  _i 
)    VECT3_FLOAT_OF_CM(_o, _i)

Definition at line 173 of file pprz_geodetic_int.h.

◆ EM7DEG_OF_DEG

#define EM7DEG_OF_DEG (   _r)    ((_r)*1e7)

Definition at line 137 of file pprz_geodetic_int.h.

◆ EM7DEG_OF_RAD

#define EM7DEG_OF_RAD (   _r)    (DegOfRad(_r)*1e7)

Definition at line 139 of file pprz_geodetic_int.h.

◆ EM7RAD_OF_RAD

#define EM7RAD_OF_RAD (   _r)    ((_r)*1e7)

Definition at line 135 of file pprz_geodetic_int.h.

◆ ENU_BFP_OF_REAL

#define ENU_BFP_OF_REAL (   _o,
  _i 
)    NED_BFP_OF_REAL(_o, _i)

Definition at line 199 of file pprz_geodetic_int.h.

◆ ENU_FLOAT_OF_BFP

#define ENU_FLOAT_OF_BFP (   _o,
  _i 
)    NED_FLOAT_OF_BFP(_o, _i)

Definition at line 207 of file pprz_geodetic_int.h.

◆ HIGH_RES_RMAT_BFP_OF_REAL

#define HIGH_RES_RMAT_BFP_OF_REAL (   _ei,
  _ef 
)
Value:
{ \
(_ei).m[0] = BFP_OF_REAL((_ef).m[0], HIGH_RES_TRIG_FRAC); \
(_ei).m[1] = BFP_OF_REAL((_ef).m[1], HIGH_RES_TRIG_FRAC); \
(_ei).m[2] = BFP_OF_REAL((_ef).m[2], HIGH_RES_TRIG_FRAC); \
(_ei).m[3] = BFP_OF_REAL((_ef).m[3], HIGH_RES_TRIG_FRAC); \
(_ei).m[4] = BFP_OF_REAL((_ef).m[4], HIGH_RES_TRIG_FRAC); \
(_ei).m[5] = BFP_OF_REAL((_ef).m[5], HIGH_RES_TRIG_FRAC); \
(_ei).m[6] = BFP_OF_REAL((_ef).m[6], HIGH_RES_TRIG_FRAC); \
(_ei).m[7] = BFP_OF_REAL((_ef).m[7], HIGH_RES_TRIG_FRAC); \
(_ei).m[8] = BFP_OF_REAL((_ef).m[8], HIGH_RES_TRIG_FRAC); \
}
#define BFP_OF_REAL(_vr, _frac)
#define HIGH_RES_TRIG_FRAC

Definition at line 216 of file pprz_geodetic_int.h.

◆ HIGH_RES_RMAT_DOUBLE_OF_BFP

#define HIGH_RES_RMAT_DOUBLE_OF_BFP (   _ef,
  _ei 
)
Value:
{ \
(_ef).m[0] = DOUBLE_OF_BFP((_ei).m[0], HIGH_RES_TRIG_FRAC); \
(_ef).m[1] = DOUBLE_OF_BFP((_ei).m[1], HIGH_RES_TRIG_FRAC); \
(_ef).m[2] = DOUBLE_OF_BFP((_ei).m[2], HIGH_RES_TRIG_FRAC); \
(_ef).m[3] = DOUBLE_OF_BFP((_ei).m[3], HIGH_RES_TRIG_FRAC); \
(_ef).m[4] = DOUBLE_OF_BFP((_ei).m[4], HIGH_RES_TRIG_FRAC); \
(_ef).m[5] = DOUBLE_OF_BFP((_ei).m[5], HIGH_RES_TRIG_FRAC); \
(_ef).m[6] = DOUBLE_OF_BFP((_ei).m[6], HIGH_RES_TRIG_FRAC); \
(_ef).m[7] = DOUBLE_OF_BFP((_ei).m[7], HIGH_RES_TRIG_FRAC); \
(_ef).m[8] = DOUBLE_OF_BFP((_ei).m[8], HIGH_RES_TRIG_FRAC); \
}
#define DOUBLE_OF_BFP(_vbfp, _frac)

Definition at line 240 of file pprz_geodetic_int.h.

◆ HIGH_RES_RMAT_FLOAT_OF_BFP

#define HIGH_RES_RMAT_FLOAT_OF_BFP (   _ef,
  _ei 
)
Value:
{ \
(_ef).m[0] = FLOAT_OF_BFP((_ei).m[0], HIGH_RES_TRIG_FRAC); \
(_ef).m[1] = FLOAT_OF_BFP((_ei).m[1], HIGH_RES_TRIG_FRAC); \
(_ef).m[2] = FLOAT_OF_BFP((_ei).m[2], HIGH_RES_TRIG_FRAC); \
(_ef).m[3] = FLOAT_OF_BFP((_ei).m[3], HIGH_RES_TRIG_FRAC); \
(_ef).m[4] = FLOAT_OF_BFP((_ei).m[4], HIGH_RES_TRIG_FRAC); \
(_ef).m[5] = FLOAT_OF_BFP((_ei).m[5], HIGH_RES_TRIG_FRAC); \
(_ef).m[6] = FLOAT_OF_BFP((_ei).m[6], HIGH_RES_TRIG_FRAC); \
(_ef).m[7] = FLOAT_OF_BFP((_ei).m[7], HIGH_RES_TRIG_FRAC); \
(_ef).m[8] = FLOAT_OF_BFP((_ei).m[8], HIGH_RES_TRIG_FRAC); \
}
#define FLOAT_OF_BFP(_vbfp, _frac)

Definition at line 228 of file pprz_geodetic_int.h.

◆ HIGH_RES_TRIG_FRAC

#define HIGH_RES_TRIG_FRAC   20

Definition at line 142 of file pprz_geodetic_int.h.

◆ INT32_VECT2_ENU_OF_NED

#define INT32_VECT2_ENU_OF_NED (   _o,
  _i 
)
Value:
{ \
(_o).x = (_i).y; \
(_o).y = (_i).x; \
}

Definition at line 209 of file pprz_geodetic_int.h.

◆ INT32_VECT2_NED_OF_ENU

#define INT32_VECT2_NED_OF_ENU (   _o,
  _i 
)    INT32_VECT2_ENU_OF_NED(_o,_i)

Definition at line 214 of file pprz_geodetic_int.h.

◆ INT32_VECT3_ENU_OF_NED

#define INT32_VECT3_ENU_OF_NED (   _o,
  _i 
)    VECT3_ENU_OF_NED(_o,_i)

Definition at line 152 of file pprz_geodetic_int.h.

◆ INT32_VECT3_NED_OF_ENU

#define INT32_VECT3_NED_OF_ENU (   _o,
  _i 
)    VECT3_ENU_OF_NED(_o,_i)

Definition at line 151 of file pprz_geodetic_int.h.

◆ LLA_BFP_OF_REAL

#define LLA_BFP_OF_REAL (   _o,
  _i 
)
Value:
{ \
(_o).lat = (int32_t)EM7DEG_OF_RAD((_i).lat); \
(_o).lon = (int32_t)EM7DEG_OF_RAD((_i).lon); \
(_o).alt = (int32_t)MM_OF_M((_i).alt); \
}
#define MM_OF_M(_m)
#define EM7DEG_OF_RAD(_r)
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83

Definition at line 176 of file pprz_geodetic_int.h.

◆ LLA_DOUBLE_OF_BFP

#define LLA_DOUBLE_OF_BFP (   _o,
  _i 
)
Value:
{ \
(_o).lat = RAD_OF_EM7DEG((double)(_i).lat); \
(_o).lon = RAD_OF_EM7DEG((double)(_i).lon); \
(_o).alt = M_OF_MM((double)(_i).alt); \
}
#define RAD_OF_EM7DEG(_r)
#define M_OF_MM(_mm)

Definition at line 188 of file pprz_geodetic_int.h.

◆ LLA_FLOAT_OF_BFP

#define LLA_FLOAT_OF_BFP (   _o,
  _i 
)
Value:
{ \
(_o).lat = RAD_OF_EM7DEG((float)(_i).lat); \
(_o).lon = RAD_OF_EM7DEG((float)(_i).lon); \
(_o).alt = M_OF_MM((float)(_i).alt); \
}

Definition at line 182 of file pprz_geodetic_int.h.

◆ M_OF_CM

#define M_OF_CM (   _cm)    ((_cm)/1e2)

Definition at line 132 of file pprz_geodetic_int.h.

◆ M_OF_MM

#define M_OF_MM (   _mm)    ((_mm)/1e3)

Definition at line 134 of file pprz_geodetic_int.h.

◆ MM_OF_M

#define MM_OF_M (   _m)    ((_m)*1e3)

Definition at line 133 of file pprz_geodetic_int.h.

◆ NED_BFP_OF_REAL

#define NED_BFP_OF_REAL (   _o,
  _i 
)
Value:
{ \
(_o).x = (int32_t)POS_BFP_OF_REAL((_i).x); \
(_o).y = (int32_t)POS_BFP_OF_REAL((_i).y); \
(_o).z = (int32_t)POS_BFP_OF_REAL((_i).z); \
}
#define POS_BFP_OF_REAL(_af)

Definition at line 193 of file pprz_geodetic_int.h.

◆ NED_FLOAT_OF_BFP

#define NED_FLOAT_OF_BFP (   _o,
  _i 
)
Value:
{ \
(_o).x = POS_FLOAT_OF_BFP((_i).x); \
(_o).y = POS_FLOAT_OF_BFP((_i).y); \
(_o).z = POS_FLOAT_OF_BFP((_i).z); \
}
#define POS_FLOAT_OF_BFP(_ai)

Definition at line 201 of file pprz_geodetic_int.h.

◆ RAD_OF_EM7DEG

#define RAD_OF_EM7DEG (   _r)    (RadOfDeg(_r)/1e7)

Definition at line 140 of file pprz_geodetic_int.h.

◆ RAD_OF_EM7RAD

#define RAD_OF_EM7RAD (   _r)    ((_r)/1e7)

Definition at line 136 of file pprz_geodetic_int.h.

◆ UTM_BFP_OF_REAL

#define UTM_BFP_OF_REAL (   _o,
  _i 
)
Value:
{ \
(_o).east = (int32_t)CM_OF_M((_i).east); \
(_o).north = (int32_t)CM_OF_M((_i).north); \
(_o).alt = (int32_t)MM_OF_M((_i).alt); \
(_o).zone = (_i).zone; \
}
#define CM_OF_M(_m)

Definition at line 266 of file pprz_geodetic_int.h.

◆ UTM_DOUBLE_OF_BFP

#define UTM_DOUBLE_OF_BFP (   _o,
  _i 
)
Value:
{ \
(_o).east = M_OF_CM((double)(_i).east); \
(_o).north = M_OF_CM((double)(_i).north); \
(_o).alt = M_OF_MM((double)(_i).alt); \
(_o).zone = (_i).zone; \
}
#define M_OF_CM(_cm)

Definition at line 259 of file pprz_geodetic_int.h.

◆ UTM_FLOAT_OF_BFP

#define UTM_FLOAT_OF_BFP (   _o,
  _i 
)
Value:
{ \
(_o).east = M_OF_CM((float)(_i).east); \
(_o).north = M_OF_CM((float)(_i).north); \
(_o).alt = M_OF_MM((float)(_i).alt); \
(_o).zone = (_i).zone; \
}

Definition at line 252 of file pprz_geodetic_int.h.

◆ VECT3_CM_OF_REAL

#define VECT3_CM_OF_REAL (   _o,
  _i 
)
Value:
{ \
(_o).x = (int32_t)CM_OF_M((_i).x); \
(_o).y = (int32_t)CM_OF_M((_i).y); \
(_o).z = (int32_t)CM_OF_M((_i).z); \
}

Definition at line 154 of file pprz_geodetic_int.h.

◆ VECT3_DOUBLE_OF_CM

#define VECT3_DOUBLE_OF_CM (   _o,
  _i 
)
Value:
{ \
(_o).x = M_OF_CM((double)(_i).x); \
(_o).y = M_OF_CM((double)(_i).y); \
(_o).z = M_OF_CM((double)(_i).z); \
}

Definition at line 166 of file pprz_geodetic_int.h.

◆ VECT3_ENU_OF_NED

#define VECT3_ENU_OF_NED (   _o,
  _i 
)
Value:
{ \
(_o).x = (_i).y; \
(_o).y = (_i).x; \
(_o).z = -(_i).z; \
}

Definition at line 144 of file pprz_geodetic_int.h.

◆ VECT3_FLOAT_OF_CM

#define VECT3_FLOAT_OF_CM (   _o,
  _i 
)
Value:
{ \
(_o).x = M_OF_CM((float)(_i).x); \
(_o).y = M_OF_CM((float)(_i).y); \
(_o).z = M_OF_CM((float)(_i).z); \
}

Definition at line 160 of file pprz_geodetic_int.h.

◆ VECT3_NED_OF_ENU

#define VECT3_NED_OF_ENU (   _o,
  _i 
)    VECT3_ENU_OF_NED(_o,_i)

Definition at line 150 of file pprz_geodetic_int.h.

Function Documentation

◆ ecef_of_enu_point_i()

void ecef_of_enu_point_i ( struct EcefCoor_i ecef,
struct LtpDef_i def,
struct EnuCoor_i enu 
)

Convert a point in local ENU to ECEF.

Parameters
[out]ecefECEF point in cm
[in]deflocal coordinate system definition
[in]enuENU point in cm

Definition at line 238 of file pprz_geodetic_int.c.

References LtpDef_i::ecef, ecef_of_enu_vect_i(), and VECT3_ADD.

Referenced by ecef_of_ned_point_i(), and gps_datalink_publish().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ecef_of_enu_pos_i()

void ecef_of_enu_pos_i ( struct EcefCoor_i ecef,
struct LtpDef_i def,
struct EnuCoor_i enu 
)

Convert a local ENU position to ECEF.

Parameters
[out]ecefECEF position in cm
[in]deflocal coordinate system definition
[in]enuENU position in meter << INT32_POS_FRAC

Definition at line 263 of file pprz_geodetic_int.c.

References LtpDef_i::ecef, ecef_of_enu_vect_i(), INT32_POS_FRAC, INT32_VECT3_RSHIFT, VECT3_ADD, and VECT3_SMUL.

Referenced by ecef_of_ned_pos_i(), stateCalcPositionLla_i(), and waypoint_globalize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ecef_of_enu_vect_i()

void ecef_of_enu_vect_i ( struct EcefCoor_i ecef,
struct LtpDef_i def,
struct EnuCoor_i enu 
)

Rotate a vector from ENU to ECEF.

Parameters
[out]ecefvector in ECEF coordinate system
[in]deflocal coordinate system definition
[in]enuvector in ENU coordinate system

Definition at line 199 of file pprz_geodetic_int.c.

References HIGH_RES_TRIG_FRAC, LtpDef_i::ltp_of_ecef, Int32RMat::m, EcefCoor_i::x, EnuCoor_i::x, EcefCoor_i::y, EnuCoor_i::y, EcefCoor_i::z, and EnuCoor_i::z.

Referenced by ecef_of_enu_point_i(), ecef_of_enu_pos_i(), ecef_of_ned_vect_i(), and gps_datalink_publish().

+ Here is the caller graph for this function:

◆ ecef_of_lla_i()

void ecef_of_lla_i ( struct EcefCoor_i out,
struct LlaCoor_i in 
)

◆ ecef_of_ned_point_i()

void ecef_of_ned_point_i ( struct EcefCoor_i ecef,
struct LtpDef_i def,
struct NedCoor_i ned 
)

Convert a point in local NED to ECEF.

Parameters
[out]ecefECEF point in cm
[in]deflocal coordinate system definition
[in]nedNED point in cm

Definition at line 250 of file pprz_geodetic_int.c.

References ecef_of_enu_point_i(), and ENU_OF_TO_NED.

+ Here is the call graph for this function:

◆ ecef_of_ned_pos_i()

void ecef_of_ned_pos_i ( struct EcefCoor_i ecef,
struct LtpDef_i def,
struct NedCoor_i ned 
)

Convert a local NED position to ECEF.

Parameters
[out]ecefECEF position in cm
[in]deflocal coordinate system definition
[in]nedNED position in meter << INT32_POS_FRAC

Definition at line 283 of file pprz_geodetic_int.c.

References ecef_of_enu_pos_i(), and ENU_OF_TO_NED.

Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), and stateCalcPositionLla_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ecef_of_ned_vect_i()

void ecef_of_ned_vect_i ( struct EcefCoor_i ecef,
struct LtpDef_i def,
struct NedCoor_i ned 
)

Rotate a vector from NED to ECEF.

Parameters
[out]ecefvector in ECEF coordinate system
[in]deflocal coordinate system definition
[in]nedvector in NED coordinate system

Definition at line 225 of file pprz_geodetic_int.c.

References ecef_of_enu_vect_i(), and ENU_OF_TO_NED.

Referenced by nmea_parse_perdcrv(), stateCalcAccelEcef_i(), and stateCalcSpeedEcef_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enu_of_ecef_point_i()

void enu_of_ecef_point_i ( struct EnuCoor_i enu,
struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Convert a point from ECEF to local ENU.

Parameters
[out]enuENU point in cm
[in]deflocal coordinate system definition
[in]ecefECEF point in cm

Definition at line 90 of file pprz_geodetic_int.c.

References LtpDef_i::ecef, HIGH_RES_TRIG_FRAC, LtpDef_i::ltp_of_ecef, Int32RMat::m, VECT3_DIFF, EcefCoor_i::x, EnuCoor_i::x, EcefCoor_i::y, EnuCoor_i::y, EcefCoor_i::z, and EnuCoor_i::z.

Referenced by enu_of_ecef_pos_i(), enu_of_lla_point_i(), and ned_of_ecef_point_i().

+ Here is the caller graph for this function:

◆ enu_of_ecef_pos_i()

void enu_of_ecef_pos_i ( struct EnuCoor_i enu,
struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Convert a ECEF position to local ENU.

Parameters
[out]enuENU position in meter << INT32_POS_FRAC
[in]deflocal coordinate system definition
[in]ecefECEF position in cm

Definition at line 129 of file pprz_geodetic_int.c.

References enu_of_ecef_point_i(), INT32_POS_FRAC, INT32_VECT3_LSHIFT, and VECT3_SDIV.

Referenced by enu_of_lla_pos_i(), ned_of_ecef_pos_i(), stateCalcPositionEnu_f(), and stateCalcPositionEnu_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enu_of_ecef_vect_i()

void enu_of_ecef_vect_i ( struct EnuCoor_i enu,
struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Rotate a vector from ECEF to ENU.

Parameters
[out]enuvector in ENU coordinate system
[in]deflocal coordinate system definition
[in]ecefvector in ECEF coordinate system

Definition at line 162 of file pprz_geodetic_int.c.

References HIGH_RES_TRIG_FRAC, LtpDef_i::ltp_of_ecef, Int32RMat::m, EcefCoor_i::x, EnuCoor_i::x, EcefCoor_i::y, EnuCoor_i::y, EcefCoor_i::z, and EnuCoor_i::z.

Referenced by enu_of_lla_vect_i(), ned_of_ecef_vect_i(), and stateCalcSpeedEnu_i().

+ Here is the caller graph for this function:

◆ enu_of_lla_point_i()

void enu_of_lla_point_i ( struct EnuCoor_i enu,
struct LtpDef_i def,
struct LlaCoor_i lla 
)

Convert a point from LLA to local ENU.

Parameters
[out]enuENU point in cm
[in]deflocal coordinate system definition
[in]llaLLA point in 1e7deg and mm

Definition at line 295 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and enu_of_ecef_point_i().

Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), follow_me_periodic(), mission_point_of_lla(), and waypoint_localize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enu_of_lla_pos_i()

void enu_of_lla_pos_i ( struct EnuCoor_i enu,
struct LtpDef_i def,
struct LlaCoor_i lla 
)

Convert a point from LLA to local ENU.

Parameters
[out]enuENU point in meter << INT32_POS_FRAC
[in]deflocal coordinate system definition
[in]llaLLA point in 1e7deg and mm

Definition at line 319 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and enu_of_ecef_pos_i().

Referenced by stateCalcPositionEnu_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enu_of_lla_vect_i()

void enu_of_lla_vect_i ( struct EnuCoor_i enu,
struct LtpDef_i def,
struct LlaCoor_i lla 
)

Definition at line 338 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and enu_of_ecef_vect_i().

+ Here is the call graph for this function:

◆ lla_of_ecef_i()

void lla_of_ecef_i ( struct LlaCoor_i out,
struct EcefCoor_i in 
)

Convert a ECEF to LLA.

Parameters
[out]outLLA in degrees*1e7 and mm above ellipsoid
[in]inECEF in cm

Definition at line 363 of file pprz_geodetic_int.c.

References ECEF_DOUBLE_OF_BFP, ECEF_FLOAT_OF_BFP, LLA_BFP_OF_REAL, lla_of_ecef_d(), and lla_of_ecef_f().

Referenced by gps_datalink_publish(), ltp_def_from_ecef_i(), stateCalcPositionLla_i(), and waypoint_globalize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lla_of_utm_i()

void lla_of_utm_i ( struct LlaCoor_i lla,
struct UtmCoor_i utm 
)

Convert a UTM to LLA.

Parameters
[out]llain degrees*1e7, alt is directly copied from utm
[in]utmin cm, alt in mm

Definition at line 452 of file pprz_geodetic_int.c.

References LLA_BFP_OF_REAL, lla_of_utm_d(), lla_of_utm_f(), UTM_DOUBLE_OF_BFP, and UTM_FLOAT_OF_BFP.

Referenced by acInfoCalcPositionLla_f(), acInfoCalcPositionLla_i(), and set_ac_info_utm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ltp_def_from_ecef_i()

void ltp_def_from_ecef_i ( struct LtpDef_i def,
struct EcefCoor_i ecef 
)

◆ ltp_def_from_lla_i()

void ltp_def_from_lla_i ( struct LtpDef_i def,
struct LlaCoor_i lla 
)

◆ ltp_of_ecef_rmat_from_lla_i()

void ltp_of_ecef_rmat_from_lla_i ( struct Int32RMat ltp_of_ecef,
struct LlaCoor_i lla 
)

Definition at line 34 of file pprz_geodetic_int.c.

References BFP_OF_REAL, HIGH_RES_TRIG_FRAC, LlaCoor_i::lat, LlaCoor_i::lon, Int32RMat::m, and RAD_OF_EM7DEG.

Referenced by ltp_def_from_ecef_i(), and ltp_def_from_lla_i().

+ Here is the caller graph for this function:

◆ ned_of_ecef_point_i()

void ned_of_ecef_point_i ( struct NedCoor_i ned,
struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Convert a point from ECEF to local NED.

Parameters
[out]nedNED point in cm
[in]deflocal coordinate system definition
[in]ecefECEF point in cm

Definition at line 116 of file pprz_geodetic_int.c.

References enu_of_ecef_point_i(), and ENU_OF_TO_NED.

Referenced by gps_cb(), ins_float_invariant_update_gps(), ins_int_update_gps(), ins_module_update_gps(), and ned_of_lla_point_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ned_of_ecef_pos_i()

void ned_of_ecef_pos_i ( struct NedCoor_i ned,
struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Convert a ECEF position to local NED.

Parameters
[out]nedNED position in meter << INT32_POS_FRAC
[in]deflocal coordinate system definition
[in]ecefECEF position in cm

Definition at line 149 of file pprz_geodetic_int.c.

References enu_of_ecef_pos_i(), and ENU_OF_TO_NED.

Referenced by ned_of_lla_pos_i(), stateCalcPositionNed_f(), and stateCalcPositionNed_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ned_of_ecef_vect_i()

void ned_of_ecef_vect_i ( struct NedCoor_i ned,
struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Rotate a vector from ECEF to NED.

Parameters
[out]nedvector in NED coordinate system
[in]deflocal coordinate system definition
[in]ecefvector in ECEF coordinate system

Definition at line 186 of file pprz_geodetic_int.c.

References enu_of_ecef_vect_i(), and ENU_OF_TO_NED.

Referenced by gps_cb(), gps_skytraq_read_message(), ins_int_update_gps(), ins_module_update_gps(), ned_of_lla_vect_i(), sensors_hitl_parse_HITL_GPS(), stateCalcAccelNed_i(), stateCalcHorizontalSpeedNorm_i(), and stateCalcSpeedNed_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ned_of_lla_point_i()

void ned_of_lla_point_i ( struct NedCoor_i ned,
struct LtpDef_i def,
struct LlaCoor_i lla 
)

Convert a point from LLA to local NED.

Parameters
[out]nedNED point in cm
[in]deflocal coordinate system definition
[in]llaLLA point in 1e7deg and mm

Definition at line 307 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and ned_of_ecef_point_i().

Referenced by follow_me_set_wp(), mavlink_common_message_handler(), target_get_pos(), and target_pos_set_current_offset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ned_of_lla_pos_i()

void ned_of_lla_pos_i ( struct NedCoor_i ned,
struct LtpDef_i def,
struct LlaCoor_i lla 
)

Convert a point from LLA to local NED.

Parameters
[out]nedNED point in meter << INT32_POS_FRAC
[in]deflocal coordinate system definition
[in]llaLLA point in 1e7deg and mm

Definition at line 331 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and ned_of_ecef_pos_i().

Referenced by stateCalcPositionNed_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ned_of_lla_vect_i()

void ned_of_lla_vect_i ( struct NedCoor_i ned,
struct LtpDef_i def,
struct LlaCoor_i lla 
)

Definition at line 345 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and ned_of_ecef_vect_i().

+ Here is the call graph for this function:

◆ utm_of_lla_i()

void utm_of_lla_i ( struct UtmCoor_i utm,
struct LlaCoor_i lla 
)

Convert a LLA to UTM.

Parameters
[out]utmin cm, alt is directly copied from lla
[in]llain degrees*1e7, alt in mm

Definition at line 423 of file pprz_geodetic_int.c.

References LLA_DOUBLE_OF_BFP, LLA_FLOAT_OF_BFP, UTM_BFP_OF_REAL, utm_of_lla_d(), utm_of_lla_f(), UtmCoor_d::zone, UtmCoor_f::zone, and UtmCoor_i::zone.

Referenced by acInfoCalcPositionUtm_f(), acInfoCalcPositionUtm_i(), and set_ac_info_utm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: