|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Device independent GPS code (interface). More...
#include "std.h"#include "math/pprz_geodetic_int.h"#include "math/pprz_geodetic_float.h"#include "math/pprz_geodetic_double.h"#include "mcu_periph/sys_time.h"#include "generated/airframe.h"Go to the source code of this file.
Data Structures | |
| struct | SVinfo |
| data structure for Space Vehicle Information of a single satellite More... | |
| struct | GpsState |
| data structure for GPS information More... | |
| struct | GpsTimeSync |
| data structure for GPS time sync More... | |
| struct | RelPosNED |
Macros | |
| #define | GPS_FIX_NONE 0x00 |
| No GPS fix. | |
| #define | GPS_FIX_2D 0x02 |
| 2D GPS fix | |
| #define | GPS_FIX_3D 0x03 |
| 3D GPS fix | |
| #define | GPS_FIX_DGPS 0x04 |
| DGPS fix. | |
| #define | GPS_FIX_RTK 0x05 |
| RTK GPS fix. | |
| #define | GPS_VALID_POS_ECEF_BIT 0 |
| #define | GPS_VALID_POS_LLA_BIT 1 |
| #define | GPS_VALID_POS_UTM_BIT 2 |
| #define | GPS_VALID_VEL_ECEF_BIT 3 |
| #define | GPS_VALID_VEL_NED_BIT 4 |
| #define | GPS_VALID_HMSL_BIT 5 |
| #define | GPS_VALID_COURSE_BIT 6 |
| #define | GPS_NB_CHANNELS 40 |
| #define | GPS_MODE_AUTO 0 |
| #define | GPS_MODE_PRIMARY 1 |
| #define | GPS_MODE_SECONDARY 2 |
| #define | MULTI_GPS_MODE GPS_MODE_AUTO |
| #define | __GpsId(_x) |
| #define | _GpsId(_x) |
| #define | GpsId(_x) |
| #define | GpsFixValid() |
| #define | GpsIsLost() |
| #define | GPS_TIMEOUT 2 |
| GPS timeout in seconds in case of communication loss with GPS module. | |
Functions | |
| void | gps_periodic_fix_counter (void) |
| Increment periodic counter. | |
| void | gps_init (void) |
| initialize the global GPS state | |
| void | gps_inject_data (uint8_t packet_id, uint8_t length, uint8_t *data) |
| GPS packet injection (default empty). | |
| void | gps_parse_GPS_INJECT (uint8_t *buf) |
| void | gps_parse_RTCM_INJECT (uint8_t *buf) |
| bool | gps_fix_valid (void) |
| Check if GPS fix is valid. | |
| void | gps_periodic_check (struct GpsState *gps_s) |
| Periodic GPS check. | |
| static bool | gps_has_been_good (void) |
| static float | gps_time_since_last_3dfix (void) |
| Returns the time since last 3D fix in seconds (float). | |
| uint32_t | gps_tow_from_sys_ticks (uint32_t sys_ticks) |
| Convert time in sys_time ticks to GPS time of week. | |
| struct LlaCoor_f | lla_float_from_gps (struct GpsState *gps_s) |
| Get GPS lla (float) Converted on the fly if not available. | |
| struct LlaCoor_i | lla_int_from_gps (struct GpsState *gps_s) |
| Get GPS lla (integer) Converted on the fly if not available. | |
| struct EcefCoor_f | ecef_float_from_gps (struct GpsState *gps_s) |
| Get GPS ecef pos (float) Converted on the fly if not available. | |
| struct EcefCoor_i | ecef_int_from_gps (struct GpsState *gps_s) |
| Get GPS ecef pos (integer) Converted on the fly if not available. | |
| struct EcefCoor_f | ecef_vel_float_from_gps (struct GpsState *gps_s) |
| Get GPS ecef velocity (float) Converted on the fly if not available. | |
| struct EcefCoor_i | ecef_vel_int_from_gps (struct GpsState *gps_s) |
| Get GPS ecef velocity (integer) Converted on the fly if not available. | |
| struct NedCoor_f | ned_vel_float_from_gps (struct GpsState *gps_s) |
| Get GPS ned velocity (float) Converted on the fly if not available. | |
| struct NedCoor_i | ned_vel_int_from_gps (struct GpsState *gps_s) |
| Get GPS ned velocity (integer) Converted on the fly if not available. | |
| struct UtmCoor_f | utm_float_from_gps (struct GpsState *gps_s, uint8_t zone) |
| Convenience function to get utm position in float from GPS structure. | |
| struct UtmCoor_i | utm_int_from_gps (struct GpsState *gps_s, uint8_t zone) |
| Convenience function to get utm position in int from GPS structure. | |
| uint16_t | gps_day_number (uint16_t year, uint8_t month, uint8_t day) |
| Number of days since navigation epoch (6 January 1980). | |
| uint16_t | gps_week_number (uint16_t year, uint8_t month, uint8_t day) |
| Number of weeks since navigation epoch (6 January 1980). | |
Variables | |
| uint8_t | multi_gps_mode |
| int | gps_disable_fix |
| Disable fix. | |
| struct GpsState | gps |
| global GPS state | |
Device independent GPS code (interface).
Definition in file gps.h.
| struct SVinfo |
data structure for Space Vehicle Information of a single satellite
| Data Fields | ||
|---|---|---|
| int16_t | azim | azimuth in deg |
| uint8_t | cno | Carrier to Noise Ratio (Signal Strength) in dbHz. |
| int8_t | elev | elevation in deg |
| uint8_t | flags | bitfield with GPS receiver specific flags |
| uint8_t | qi | quality bitfield (GPS receiver specific) |
| uint8_t | svid | Satellite ID. |
| struct GpsState |
| Data Fields | ||
|---|---|---|
| uint32_t | cacc | course accuracy in rad*1e7 |
| uint8_t | comp_id | id of current gps |
| int32_t | course | GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north). |
| struct EcefCoor_i | ecef_pos | position in ECEF in cm |
| struct EcefCoor_i | ecef_vel | speed ECEF in cm/s |
| uint8_t | fix | status of fix |
| uint16_t | gspeed | norm of 2d ground speed in cm/s |
| uint32_t | hacc | horizontal accuracy in cm |
| int32_t | hmsl | height above mean sea level (MSL) in mm |
| uint32_t | last_3dfix_ticks | cpu time ticks at last valid 3D fix |
| uint32_t | last_3dfix_time | cpu time in sec at last valid 3D fix |
| uint32_t | last_msg_ticks | cpu time ticks at last received GPS message |
| uint32_t | last_msg_time | cpu time in sec at last received GPS message |
| struct LlaCoor_i | lla_pos | position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid) |
| uint8_t | nb_channels | Number of scanned satellites. |
| struct NedCoor_i | ned_vel | speed NED in cm/s |
| uint8_t | num_sv | number of sat in fix |
| uint32_t | pacc | position accuracy in cm |
| uint16_t | pdop | position dilution of precision scaled by 100 |
| uint16_t | reset | hotstart, warmstart, coldstart |
| uint32_t | sacc | speed accuracy in cm/s |
| uint16_t | speed_3d | norm of 3d speed in cm/s |
| struct SVinfo | svinfos[GPS_NB_CHANNELS] | holds information from the Space Vehicles (Satellites) |
| uint32_t | tow | GPS time of week in ms. |
| struct UtmCoor_i | utm_pos | position in UTM (north,east: cm; alt: mm over MSL) |
| uint32_t | vacc | vertical accuracy in cm |
| uint8_t | valid_fields | bitfield indicating valid fields (GPS_VALID_x_BIT) |
| uint16_t | week | GPS week. |
| struct GpsTimeSync |
| struct RelPosNED |
| Data Fields | ||
|---|---|---|
| double | distance | Relative distance to the reference station in meters. |
| float | distance_acc | Distance accuracy in meters. |
| float | heading | Relative heading to the reference station in radians. |
| float | heading_acc | Heading accuracy in radians. |
| struct NedCoor_d | pos | Relative postion to the reference station in meters. |
| struct NedCoor_f | pos_acc | Position accuracy in meters. |
| uint16_t | reference_id | Reference station identification. |
| uint32_t | tow | Time of week (GPS) in ms. |
| #define _GpsId | ( | _x | ) |
| #define GPS_FIX_2D 0x02 |
2D GPS fix
Definition at line 43 of file gps.h.
Referenced by gps_mtk_read_message(), gps_skytraq_read_message(), gps_uavcan_cb(), parse_xsens700_msg(), and sirf_parse_41().
| #define GPS_FIX_3D 0x03 |
3D GPS fix
Definition at line 44 of file gps.h.
Referenced by ahrs_dcm_update_gps(), ahrs_fc_update_gps(), ahrs_icq_update_gps(), build_nmea_sentence(), draw_osd(), error_output(), get_fix_mode(), gps_cb(), gps_cb(), gps_cb(), gps_cb(), gps_cb(), gps_datalink_publish(), gps_feed_value(), gps_fix_valid(), gps_intermcu_parse_IMCU_REMOTE_GPS(), gps_mtk_msg(), gps_mtk_read_message(), gps_piksi_publish(), gps_sim_publish(), gps_sirf_msg(), gps_skytraq_msg(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_msg(), gps_ubx_parse_nav_pvt(), gps_ubx_parse_nav_sol(), gps_ubx_parse_nav_status(), gps_udp_parse(), handle_ins_msg(), handle_ins_msg(), home_direction(), ins_alt_float_update_gps(), ins_float_invariant_update_gps(), ins_int_update_gps(), ins_vectornav_propagate(), nmea_gps_msg(), parse_xsens700_msg(), parse_xsens_msg(), reset_cb(), sbp_pos_ecef_callback(), send_svinfo_available(), sensors_hitl_parse_HITL_GPS(), sirf_parse_2(), and sirf_parse_41().
| #define GPS_FIX_DGPS 0x04 |
DGPS fix.
Definition at line 45 of file gps.h.
Referenced by get_fix_mode(), gps_uavcan_cb(), and gps_ubx_parse_nav_pvt().
| #define GPS_FIX_NONE 0x00 |
No GPS fix.
Definition at line 42 of file gps.h.
Referenced by get_fix_mode(), gps_cb(), gps_datalink_init(), gps_feed_value(), gps_init(), gps_intermcu_init(), gps_mtk_read_message(), gps_periodic_check(), gps_piksi_event(), gps_sim_init(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_parse_nav_pvt(), gps_udp_init(), ins_vectornav_monitor(), parse_xsens700_msg(), parse_xsens_msg(), sensors_hitl_parse_HITL_GPS(), sirf_parse_41(), and uwb_positioning_init().
| #define GPS_FIX_RTK 0x05 |
RTK GPS fix.
Definition at line 46 of file gps.h.
Referenced by get_fix_mode(), gps_uavcan_cb(), and gps_ubx_parse_nav_pvt().
| #define GPS_NB_CHANNELS 40 |
Definition at line 57 of file gps.h.
Referenced by gps_ubx_parse_nav_sat(), gps_ubx_parse_nav_svinfo(), mavlink_send_gps_status(), parse_xsens700_msg(), parse_xsens_msg(), send_svinfo_available(), and send_svinfo_id().
| #define GPS_TIMEOUT 2 |
GPS timeout in seconds in case of communication loss with GPS module.
Definition at line 180 of file gps.h.
Referenced by gps_periodic_check().
| #define GPS_VALID_COURSE_BIT 6 |
Definition at line 54 of file gps.h.
Referenced by gps_datalink_publish(), gps_feed_value(), gps_intermcu_parse_IMCU_REMOTE_GPS(), gps_mtk_read_message(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_parse_nav_pvt(), gps_ubx_parse_nav_velned(), handle_ins_msg(), handle_ins_msg(), ins_vectornav_propagate(), nmea_parse_RMC(), sbp_vel_ned_callback(), sensors_hitl_parse_HITL_GPS(), and sirf_parse_41().
| #define GPS_VALID_HMSL_BIT 5 |
Definition at line 53 of file gps.h.
Referenced by gps_datalink_publish(), gps_feed_value(), gps_intermcu_parse_IMCU_REMOTE_GPS(), gps_mtk_read_message(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_parse_nav_posllh(), gps_ubx_parse_nav_posutm(), gps_ubx_parse_nav_pvt(), gps_udp_parse(), ins_vectornav_propagate(), nmea_parse_GGA(), parse_xsens700_msg(), parse_xsens_msg(), sbp_pos_llh_callback(), sensors_hitl_parse_HITL_GPS(), sirf_parse_41(), update_geoid_height(), utm_float_from_gps(), and utm_int_from_gps().
| #define GPS_VALID_POS_ECEF_BIT 0 |
Definition at line 48 of file gps.h.
Referenced by ecef_int_from_gps(), gps_datalink_publish(), gps_feed_value(), gps_intermcu_parse_IMCU_REMOTE_GPS(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_parse_nav_posecef(), gps_ubx_parse_nav_sol(), gps_udp_parse(), ins_module_update_gps(), ins_vectornav_propagate(), lla_int_from_gps(), nmea_parse_GGA(), sbp_pos_ecef_callback(), and sirf_parse_2().
| #define GPS_VALID_POS_LLA_BIT 1 |
Definition at line 49 of file gps.h.
Referenced by ecef_int_from_gps(), ecef_vel_int_from_gps(), gps_datalink_publish(), gps_feed_value(), gps_mtk_read_message(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_parse_nav_posllh(), gps_ubx_parse_nav_pvt(), gps_udp_parse(), ins_module_update_gps(), ins_vectornav_propagate(), lla_int_from_gps(), ned_vel_int_from_gps(), nmea_parse_GGA(), parse_xsens_msg(), sbp_pos_llh_callback(), sensors_hitl_parse_HITL_GPS(), sirf_parse_41(), update_geoid_height(), utm_float_from_gps(), and utm_int_from_gps().
| #define GPS_VALID_POS_UTM_BIT 2 |
Definition at line 50 of file gps.h.
Referenced by gps_ubx_parse_nav_posutm(), nav_reset_utm_zone(), utm_float_from_gps(), and utm_int_from_gps().
| #define GPS_VALID_VEL_ECEF_BIT 3 |
Definition at line 51 of file gps.h.
Referenced by ecef_vel_int_from_gps(), gps_cb(), gps_datalink_publish(), gps_feed_value(), gps_intermcu_parse_IMCU_REMOTE_GPS(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_parse_nav_sol(), gps_ubx_parse_velecef(), gps_udp_parse(), ins_module_update_gps(), ned_vel_int_from_gps(), sbp_vel_ecef_callback(), sensors_hitl_parse_HITL_GPS(), and sirf_parse_2().
| #define GPS_VALID_VEL_NED_BIT 4 |
Definition at line 52 of file gps.h.
Referenced by ecef_vel_int_from_gps(), gps_cb(), gps_datalink_publish(), gps_feed_value(), gps_skytraq_read_message(), gps_uavcan_cb(), gps_ubx_msg(), gps_ubx_parse_nav_pvt(), gps_ubx_parse_nav_velned(), ins_module_update_gps(), ned_vel_int_from_gps(), parse_xsens700_msg(), parse_xsens_msg(), sbp_vel_ned_callback(), and sensors_hitl_parse_HITL_GPS().
| #define GpsFixValid | ( | ) |
Definition at line 171 of file gps.h.
Referenced by alt_filter_periodic(), cloud_sensor_callback(), geo_mag_periodic(), gps_has_been_good(), reset_ref(), reset_ref(), reset_vertical_ref(), and reset_vertical_ref().
| #define GpsId | ( | _x | ) |
| #define GpsIsLost | ( | ) |
Definition at line 173 of file gps.h.
Referenced by autopilot_failsafe_checks(), and autopilot_static_on_rc_frame().
| #define MULTI_GPS_MODE GPS_MODE_AUTO |
Definition at line 65 of file gps.h.
Referenced by gps_init().
|
extern |
Get GPS ecef pos (float) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 494 of file gps.c.
References ecef_float_from_gps(), ECEF_FLOAT_OF_BFP, and ecef_int_from_gps().
Referenced by ecef_float_from_gps().
|
extern |
Get GPS ecef pos (integer) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 507 of file gps.c.
References ecef_int_from_gps(), ecef_of_lla_i(), GpsState::ecef_pos, GPS_VALID_POS_ECEF_BIT, GPS_VALID_POS_LLA_BIT, GpsState::lla_pos, and GpsState::valid_fields.
Referenced by ecef_float_from_gps(), ecef_int_from_gps(), gps_cb(), gps_cb(), gps_cb(), gps_cb(), ins_float_invariant_reset_ref(), ins_float_invariant_update_gps(), ins_int_update_gps(), ins_module_update_gps(), reset_cb(), reset_cb(), reset_ref(), reset_ref(), reset_ref(), and send_gps_int().
|
extern |
Get GPS ecef velocity (float) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 523 of file gps.c.
References ECEF_FLOAT_OF_BFP, ecef_vel_float_from_gps(), and ecef_vel_int_from_gps().
Referenced by ecef_vel_float_from_gps(), gps_cb(), and ins_float_invariant_update_gps().
|
extern |
Get GPS ecef velocity (integer) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 536 of file gps.c.
References ecef_of_ned_vect_i(), GpsState::ecef_pos, GpsState::ecef_vel, ecef_vel_int_from_gps(), GPS_VALID_POS_LLA_BIT, GPS_VALID_VEL_ECEF_BIT, GPS_VALID_VEL_NED_BIT, GpsState::lla_pos, ltp_def_from_ecef_i(), ltp_def_from_lla_i(), GpsState::ned_vel, and GpsState::valid_fields.
Referenced by ecef_vel_float_from_gps(), ecef_vel_int_from_gps(), gps_cb(), gps_cb(), gps_cb(), ins_int_update_gps(), and send_gps_int().
Number of days since navigation epoch (6 January 1980).
| [in] | year | current year |
| [in] | month | current month |
| [in] | day | current day |
Definition at line 653 of file gps.c.
References month_days.
Referenced by gps_week_number().
|
extern |
Check if GPS fix is valid.
If GPS_FIX_TIMEOUT is configured, check for 3D fix with timeout, otherwise, returns the last value from GPS module
Definition at line 308 of file gps.c.
References get_sys_time_float(), gps, GPS_FIX_3D, and gps_time_since_last_3dfix().
|
inlinestatic |
Definition at line 189 of file gps.h.
References GpsFixValid.
|
extern |
initialize the global GPS state
Definition at line 377 of file gps.c.
References ABI_BROADCAST, DefaultPeriodic, gpio_setup_output(), gps, gps_cb(), gps_disable_fix, gps_ev, GPS_FIX_NONE, gps_relpos_cb(), gps_relpos_ev, LED_OFF, MULTI_GPS_MODE, multi_gps_mode, preflight_check_register(), register_periodic_telemetry(), send_gps(), send_gps_int(), send_gps_lla(), send_gps_relpos(), send_gps_sol(), and send_svinfo().
GPS packet injection (default empty).
GPS packet injection (default empty).
Definition at line 432 of file gps.c.
References gps_piksi_write(), and sbp_state.
Referenced by gps_parse_GPS_INJECT(), and gps_parse_RTCM_INJECT().
|
extern |
Definition at line 438 of file gps.c.
References gps_inject_data().
|
extern |
Definition at line 451 of file gps.c.
References gps_inject_data().
|
extern |
Periodic GPS check.
Marks GPS as lost when no GPS message was received for GPS_TIMEOUT seconds
Definition at line 292 of file gps.c.
References GpsState::comp_id, GpsState::fix, gps, GPS_FIX_NONE, GPS_TIMEOUT, GpsState::last_msg_time, and sys_time::nb_sec.
Referenced by gps_ubx_periodic_check(), and uwb_positioning_periodic().
| void gps_periodic_fix_counter | ( | void | ) |
|
inlinestatic |
Returns the time since last 3D fix in seconds (float).
Definition at line 199 of file gps.h.
References sys_time::cpu_ticks_per_sec, and gps.
Referenced by gps_fix_valid().
Convert time in sys_time ticks to GPS time of week.
The resolution is sys_time.resolution, see also get_sys_time_tow()
Definition at line 421 of file gps.c.
References get_sys_time_tow(), MSEC_PER_WEEK, sys_time::nb_tick, and sys_time::ticks_per_sec.
Referenced by acInfoSetPositionEnu_f(), acInfoSetPositionEnu_i(), acInfoSetPositionLla_f(), acInfoSetPositionLla_i(), acInfoSetPositionUtm_f(), acInfoSetPositionUtm_i(), acInfoSetVelocityEnu_f(), acInfoSetVelocityEnu_i(), parse_acinfo_dl(), target_parse_target_pos(), and windturbine_periodic().
Number of weeks since navigation epoch (6 January 1980).
| [in] | year | current year |
| [in] | month | current month |
| [in] | day | current day |
Definition at line 663 of file gps.c.
References gps_day_number().
Referenced by gps_ubx_parse_nav_pvt().
Get GPS lla (float) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 465 of file gps.c.
References lla_float_from_gps(), LLA_FLOAT_OF_BFP, and lla_int_from_gps().
Referenced by lla_float_from_gps().
Get GPS lla (integer) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 478 of file gps.c.
References GpsState::ecef_pos, GPS_VALID_POS_ECEF_BIT, GPS_VALID_POS_LLA_BIT, lla_int_from_gps(), lla_of_ecef_i(), GpsState::lla_pos, and GpsState::valid_fields.
Referenced by gps_cb(), ins_float_invariant_reset_ref(), lla_float_from_gps(), lla_int_from_gps(), reset_ref(), reset_ref(), reset_ref(), reset_ref(), reset_vertical_ref(), and reset_vertical_ref().
Get GPS ned velocity (float) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 558 of file gps.c.
References ned_vel_float_from_gps(), ned_vel_int_from_gps(), and VECT3_FLOAT_OF_CM.
Referenced by gps_cb(), gps_cb(), gps_cb(), gps_cb(), gps_cb(), ins_alt_float_update_gps(), ins_float_invariant_update_gps(), and ned_vel_float_from_gps().
Get GPS ned velocity (integer) Converted on the fly if not available.
| [in] | gps_s | pointer to the gps structure |
Definition at line 571 of file gps.c.
References GpsState::ecef_pos, GpsState::ecef_vel, GPS_VALID_POS_LLA_BIT, GPS_VALID_VEL_ECEF_BIT, GPS_VALID_VEL_NED_BIT, GpsState::lla_pos, ltp_def_from_ecef_i(), ltp_def_from_lla_i(), ned_of_ecef_vect_i(), GpsState::ned_vel, ned_vel_int_from_gps(), and GpsState::valid_fields.
Referenced by ned_vel_float_from_gps(), and ned_vel_int_from_gps().
Convenience function to get utm position in float from GPS structure.
Beware that altitude is initialized to zero but not set to the correct value
| [in] | gps_s | pointer to the gps structure |
| [in] | zone | set the utm zone in which the position should be computed, 0 to try to get it automatically from lla position |
Convenience function to get utm position in float from GPS structure.
Definition at line 591 of file gps.c.
References UtmCoor_f::alt, GPS_VALID_HMSL_BIT, GPS_VALID_POS_LLA_BIT, GPS_VALID_POS_UTM_BIT, utm_float_from_gps(), UTM_FLOAT_OF_BFP, utm_of_lla_i(), wgs84_ellipsoid_to_geoid_i(), UtmCoor_f::zone, and UtmCoor_i::zone.
Referenced by gps_cb(), gps_cb(), gps_cb(), gps_cb(), ins_alt_float_update_gps(), ins_float_invariant_reset_ref(), ins_float_invariant_update_gps(), reset_ref(), reset_ref(), reset_ref(), and utm_float_from_gps().
Convenience function to get utm position in int from GPS structure.
Beware that altitude is initialized to zero but not set to the correct value
| [in] | gps_s | pointer to the gps structure |
| [in] | zone | set the utm zone in which the position should be computed, 0 to try to get it automatically from lla position |
Definition at line 616 of file gps.c.
References UtmCoor_i::alt, GPS_VALID_HMSL_BIT, GPS_VALID_POS_LLA_BIT, GPS_VALID_POS_UTM_BIT, UTM_COPY, utm_int_from_gps(), utm_of_lla_i(), wgs84_ellipsoid_to_geoid_i(), and UtmCoor_i::zone.
Referenced by send_gps(), and utm_int_from_gps().
|
extern |
global GPS state
Definition at line 74 of file gps.c.
Referenced by airspeed_ets_read_event(), alt_filter_periodic(), ArduIMU_periodicGPS(), autopilot_failsafe_checks(), baro_apogee_event(), baro_sim_periodic(), build_nmea_sentence(), calculate_new_heading(), cloud_sensor_callback(), draw_osd(), error_output(), formation_flight(), generic_com_periodic(), geo_mag_event(), get_fix_mode(), gps_cb(), gps_fix_valid(), gps_init(), gps_nmea_get_system_date_str(), gps_periodic_check(), gps_sim_init(), gps_sim_publish(), gps_time_since_last_3dfix(), gps_vectornav_init(), gsm_send_report_continue(), hff_update_gps(), home_direction(), humid_sht_periodic(), ins_float_invariant_reset_ref(), ins_float_invariant_reset_vertical_ref(), ins_vectornav_monitor(), ins_vectornav_propagate(), ins_vectornav_set_pacc(), ins_vectornav_set_sacc(), mavlink_send_gps_raw_int(), mavlink_send_gps_status(), meteo_stick_send_data(), mf_daq_send_report(), mf_ptu_periodic(), nav_reset_utm_zone(), nps_sensor_gps_init(), nps_sensor_gps_run_step(), parse_acinfo_dl(), parse_xsens_msg(), potential_task(), push_gps_to_vision(), put_alt(), recover_gps_data(), reset_cb(), reset_ref(), reset_ref(), reset_ref(), reset_ref(), reset_ref(), reset_ref(), reset_vertical_ref(), reset_vertical_ref(), reset_vertical_ref(), reset_vertical_ref(), reset_vertical_ref(), reset_vertical_ref(), send_acinfo_lla(), send_cloud_sensor_data(), send_fp_min(), send_gps(), send_gps_int(), send_gps_lla(), send_gps_sol(), send_minimal_com(), send_status(), send_svinfo(), send_svinfo_available(), send_svinfo_id(), sim_overwrite_lidar(), snav_on_time(), tcas_periodic_task_1Hz(), temod_event(), and update_geoid_height().
|
extern |
Disable fix.
Definition at line 82 of file gps.c.
Referenced by gps_cb(), gps_init(), gps_periodic_fix_counter(), and send_gps().
|
extern |
Definition at line 81 of file gps.c.
Referenced by gps_init().