|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Go to the source code of this file.
Macros | |
| #define | BAUD_COUNT (sizeof(kBauds) / sizeof(kBauds[0])) |
Functions | |
| static void | open_at (gnss_core_t *c, uint32_t baud) |
| static void | detect (gnss_core_t *c, uint32_t now_us) |
| static void | send_config (gnss_core_t *c, uint32_t now_us) |
| static void | configure (gnss_core_t *c, uint32_t now_us) |
| static void | restart (gnss_core_t *c, uint32_t now_us) |
| void | gnss_core_init (gnss_core_t *c, uint32_t now_us) |
| void | gnss_core_set_pps (gnss_core_t *c, uint32_t edge_us) |
| static void | on_pvt (gnss_core_t *c, uint32_t now_us) |
| static void | on_frame (gnss_core_t *c, gnss_frame_kind_t kind, uint32_t now_us) |
| void | gnss_core_feed (gnss_core_t *c, const uint8_t *bytes, size_t n, uint32_t now_us) |
| void | gnss_core_poll (gnss_core_t *c, uint32_t now_us) |
| bool | gnss_core_request_status (gnss_core_t *c) |
| uint32_t | gnss_core_wait_us (const gnss_core_t *c, uint32_t now_us) |
Variables | |
| static const uint32_t | kBauds [] = {9600U, 38400U, GNSS_RUN_BAUD} |
Definition at line 6 of file gnss_core.c.
Referenced by gnss_core_poll().
|
static |
Definition at line 34 of file gnss_core.c.
References gnss_core_t::baud, gnss_io_t::ctx, frame(), GNSS_CONFIG, GNSS_RUN_BAUD, gnss_core_t::io, open_at(), gnss_io_t::send, send_config(), gnss_core_t::state, gnss_core_t::tries, UBX_KEY_UART1_BAUDRATE, and ubx_valset().
Referenced by on_frame().
|
static |
Definition at line 14 of file gnss_core.c.
References gnss_core_t::candidate, gnss_core_t::deadline_us, GNSS_DETECT, GNSS_LISTEN_US, kBauds, open_at(), and gnss_core_t::state.
Referenced by gnss_core_init(), gnss_core_poll(), and restart().
| void gnss_core_feed | ( | gnss_core_t * | c, |
| const uint8_t * | bytes, | ||
| size_t | n, | ||
| uint32_t | now_us ) |
Definition at line 139 of file gnss_core.c.
References gnss_frame_feed(), GNSS_FRAME_NONE, on_frame(), and gnss_core_t::parser.
Referenced by fly(), gnss_task(), and run().
| void gnss_core_init | ( | gnss_core_t * | c, |
| uint32_t | now_us ) |
Definition at line 53 of file gnss_core.c.
References gnss_core_t::candidate, detect(), GNSS_DETECT, gnss_core_t::pps_us, and gnss_core_t::state.
Referenced by gnss_task(), rig(), and world_init().
| void gnss_core_poll | ( | gnss_core_t * | c, |
| uint32_t | now_us ) |
Definition at line 149 of file gnss_core.c.
References BAUD_COUNT, gnss_core_t::candidate, gnss_core_t::deadline_us, detect(), GNSS_CONFIG, GNSS_CONFIG_TRIES, GNSS_DETECT, GNSS_RUN, restart(), send_config(), gnss_core_t::state, and gnss_core_t::tries.
Referenced by fly(), gnss_task(), and run().
| bool gnss_core_request_status | ( | gnss_core_t * | c | ) |
Definition at line 171 of file gnss_core.c.
References gnss_io_t::ctx, frame(), GNSS_RUN, gnss_core_t::io, gnss_io_t::send, gnss_core_t::state, UBX_CLASS_MON, UBX_CLASS_NAV, UBX_ID_MON_RF, UBX_ID_NAV_SAT, and ubx_poll().
Referenced by gnss_task().
| void gnss_core_set_pps | ( | gnss_core_t * | c, |
| uint32_t | edge_us ) |
Definition at line 60 of file gnss_core.c.
References gnss_core_t::pps_us.
Referenced by fly(), gnss_task(), and test_pps_is_stamped().
| uint32_t gnss_core_wait_us | ( | const gnss_core_t * | c, |
| uint32_t | now_us ) |
Definition at line 183 of file gnss_core.c.
References gnss_core_t::deadline_us.
Referenced by gnss_task().
|
static |
Definition at line 93 of file gnss_core.c.
References gnss_core_t::baud, gnss_core_t::configs, configure(), gnss_core_t::deadline_us, gnss_core_t::detected_baud, GNSS_CONFIG, GNSS_DETECT, GNSS_FRAME_UBX, GNSS_FRAME_UBX_CAPTURE, GNSS_RUN, GNSS_SILENCE_US, gnss_core_t::naks, on_pvt(), p, gnss_core_t::parser, restart(), gnss_core_t::rf, gnss_core_t::rf_reports, gnss_core_t::sat_reports, gnss_core_t::sats, gnss_core_t::state, UBX_CLASS_ACK, UBX_CLASS_CFG, UBX_CLASS_MON, UBX_CLASS_NAV, UBX_ID_ACK_ACK, UBX_ID_CFG_VALSET, UBX_ID_MON_RF, UBX_ID_NAV_PVT, UBX_ID_NAV_SAT, ubx_parse_mon_rf(), and ubx_sat_summary().
Referenced by gnss_core_feed().
|
static |
Definition at line 64 of file gnss_core.c.
References record_sink_t::ctx, gnss_core_t::deadline_us, gnss_core_t::fixes, GNSS_SILENCE_US, gnss_core_t::latest, gnss_core_t::parser, gnss_core_t::pps_us, pvt(), r, REC_GNSS, rec_gnss_t, record_sink_t::record, gnss_core_t::sink, gnss_frame_parser_t::ubx_len, ubx_parse_nav_pvt(), and gnss_frame_parser_t::ubx_payload.
Referenced by on_frame().
|
static |
Definition at line 8 of file gnss_core.c.
References gnss_core_t::baud, gnss_io_t::ctx, gnss_frame_init(), gnss_core_t::io, gnss_core_t::parser, and gnss_io_t::set_baud.
Referenced by configure(), and detect().
|
static |
Definition at line 47 of file gnss_core.c.
References gnss_core_t::candidate, detect(), and gnss_core_t::resets.
Referenced by gnss_core_poll(), and on_frame().
|
static |
Definition at line 20 of file gnss_core.c.
References gnss_io_t::ctx, gnss_core_t::deadline_us, frame(), GNSS_ACK_US, GNSS_RATE_MS, gnss_core_t::io, gnss_io_t::send, UBX_DYNMODEL_AIR4, UBX_KEY_MSGOUT_NAV_PVT_UART1, UBX_KEY_NAVSPG_DYNMODEL, UBX_KEY_RATE_MEAS, UBX_KEY_UART1OUTPROT_NMEA, and ubx_valset().
Referenced by configure(), and gnss_core_poll().
|
static |
Definition at line 5 of file gnss_core.c.
Referenced by detect().