Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_geodetic_int.c File Reference
+ Include dependency graph for pprz_geodetic_int.c:

Go to the source code of this file.

Functions

void ltp_of_ecef_rmat_from_lla_i (struct Int32Mat33 *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 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 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...
 
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 enu_of_lla_point_i (struct EnuCoor_i *enu, struct LtpDef_i *def, struct LlaCoor_i *lla)
 
void ned_of_lla_point_i (struct NedCoor_i *ned, struct LtpDef_i *def, struct LlaCoor_i *lla)
 
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 lla_of_ecef_i (struct LlaCoor_i *out, struct EcefCoor_i *in)
 
void ecef_of_lla_i (struct EcefCoor_i *out, struct LlaCoor_i *in)
 

Function Documentation

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 219 of file pprz_geodetic_int.c.

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

Referenced by ecef_of_ned_point_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 242 of file pprz_geodetic_int.c.

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

Referenced by ecef_of_ned_pos_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 182 of file pprz_geodetic_int.c.

References HIGH_RES_TRIG_FRAC, LtpDef_i::ltp_of_ecef, Int32Mat33::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(), and ecef_of_ned_vect_i().

+ Here is the caller graph for this function:

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 230 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:

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 261 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:

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 207 of file pprz_geodetic_int.c.

References ecef_of_enu_vect_i(), and ENU_OF_TO_NED.

Referenced by stateCalcAccelEcef_i(), and stateCalcSpeedEcef_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 79 of file pprz_geodetic_int.c.

References LtpDef_i::ecef, HIGH_RES_TRIG_FRAC, LtpDef_i::ltp_of_ecef, Int32Mat33::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(), follow_change_wp(), and ned_of_ecef_point_i().

+ Here is the caller graph for this function:

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 116 of file pprz_geodetic_int.c.

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

Referenced by 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:

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 147 of file pprz_geodetic_int.c.

References HIGH_RES_TRIG_FRAC, LtpDef_i::ltp_of_ecef, Int32Mat33::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:

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

Definition at line 268 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and enu_of_ecef_point_i().

Referenced by nav_move_waypoint_lla(), and stateCalcPositionEnu_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 280 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:

void lla_of_ecef_i ( struct LlaCoor_i out,
struct EcefCoor_i in 
)

Definition at line 299 of file pprz_geodetic_int.c.

References LlaCoor_i::alt, LlaCoor_d::alt, EM7DEG_OF_RAD, LlaCoor_i::lat, LlaCoor_d::lat, lla_of_ecef_d(), LlaCoor_i::lon, LlaCoor_d::lon, M_OF_CM, MM_OF_M, EcefCoor_i::x, EcefCoor_d::x, EcefCoor_i::y, EcefCoor_d::y, EcefCoor_i::z, and EcefCoor_d::z.

Referenced by ltp_def_from_ecef_i(), and stateCalcPositionLla_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ltp_def_from_ecef_i ( struct LtpDef_i def,
struct EcefCoor_i ecef 
)

Definition at line 51 of file pprz_geodetic_int.c.

References LtpDef_i::ecef, LtpDef_i::lla, lla_of_ecef_i(), LtpDef_i::ltp_of_ecef, ltp_of_ecef_rmat_from_lla_i(), and VECT3_COPY.

Referenced by gps_skytraq_read_message(), ins_init(), ins_init_origin_from_flightplan(), ins_reset_local_origin(), and ins_update_gps().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ltp_def_from_lla_i ( struct LtpDef_i def,
struct LlaCoor_i lla 
)

Definition at line 62 of file pprz_geodetic_int.c.

References LtpDef_i::ecef, ecef_of_lla_i(), LtpDef_i::lla, LLA_COPY, LtpDef_i::ltp_of_ecef, and ltp_of_ecef_rmat_from_lla_i().

Referenced by ins_reset_altitude_ref().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ltp_of_ecef_rmat_from_lla_i ( struct Int32Mat33 ltp_of_ecef,
struct LlaCoor_i lla 
)

Definition at line 26 of file pprz_geodetic_int.c.

References BFP_OF_REAL, HIGH_RES_TRIG_FRAC, LlaCoor_i::lat, LlaCoor_i::lon, Int32Mat33::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:

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 104 of file pprz_geodetic_int.c.

References enu_of_ecef_point_i(), and ENU_OF_TO_NED.

Referenced by ins_update_gps(), and ned_of_lla_point_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 135 of file pprz_geodetic_int.c.

References enu_of_ecef_pos_i(), and ENU_OF_TO_NED.

Referenced by stateCalcPositionNed_f(), and stateCalcPositionNed_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 170 of file pprz_geodetic_int.c.

References enu_of_ecef_vect_i(), and ENU_OF_TO_NED.

Referenced by gps_skytraq_read_message(), ins_update_gps(), ned_of_lla_vect_i(), stateCalcAccelNed_i(), stateCalcHorizontalSpeedNorm_i(), and stateCalcSpeedNed_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 274 of file pprz_geodetic_int.c.

References ecef_of_lla_i(), and ned_of_ecef_point_i().

Referenced by stateCalcPositionNed_i().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 286 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: