lriot  2.1.0.0
lr1110_gnss.h
Go to the documentation of this file.
1 
35 #ifndef LR1110_GNSS_H
36 #define LR1110_GNSS_H
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /*
43  * -----------------------------------------------------------------------------
44  * --- DEPENDENCIES ------------------------------------------------------------
45  */
46 
48 #include "common/lr1110_types.h"
49 #include "common/lr1110_hal.h"
50 
51 /*
52  * -----------------------------------------------------------------------------
53  * --- PUBLIC MACROS -----------------------------------------------------------
54  */
55 
56 /*
57  * -----------------------------------------------------------------------------
58  * --- PUBLIC CONSTANTS --------------------------------------------------------
59  */
60 
61 /*
62  * -----------------------------------------------------------------------------
63  * --- PUBLIC TYPES ------------------------------------------------------------
64  */
65 
66 /*
67  * -----------------------------------------------------------------------------
68  * --- PUBLIC FUNCTIONS PROTOTYPES ---------------------------------------------
69  */
70 
81 err_t lr1110_gnss_get_result_size( lriot_t *ctx, uint16_t* result_size );
82 
98 err_t lr1110_gnss_read_results( lriot_t *ctx, uint8_t* result_buffer, uint16_t result_buffer_size );
99 
111 
125 err_t lr1110_gnss_almanac_update( lriot_t *ctx, uint8_t* blocks, uint8_t nb_of_blocks );
126 
136 
147 
157 err_t lr1110_gnss_push_solver_msg( lriot_t *ctx, uint8_t* payload, uint16_t payload_size );
158 
171 
184 
195 
206 
216 
227 
239 
254  uint8_t gnss_input_parameters, uint8_t nb_sat );
255 
270  uint8_t gnss_input_parameters, uint8_t nb_sat );
271 
283 
298 
308 err_t lr1110_gnss_push_dmc_msg( lriot_t *ctx, uint8_t* dmc_msg, uint16_t dmc_msg_len );
309 
325 
334 err_t lr1110_gnss_get_nb_detected_satellites( lriot_t *ctx, uint8_t* nb_detected_satellites );
335 
349 err_t lr1110_gnss_get_detected_satellites( lriot_t *ctx, uint8_t nb_detected_satellites,
350  lr1110_gnss_detected_satellite_t* detected_satellite_id_snr_doppler );
351 
365  lr1110_gnss_context_status_t* context_status );
366 
376 err_t lr1110_gnss_get_result_destination( uint8_t* result_buffer, uint16_t result_buffer_size, uint8_t* destination );
377 
399 uint16_t lr1110_gnss_compute_almanac_age( uint16_t almanac_date,
400  uint16_t nb_days_between_epoch_and_corresponding_gps_time_rollover,
401  uint16_t nb_days_since_epoch );
402 
403 #ifdef __cplusplus
404 }
405 #endif
406 
407 #endif // LR1110_GNSS_H
408 
409 /* --- EOF ------------------------------------------------------------------ */
lr1110_gnss_constellation_mask_t
uint8_t lr1110_gnss_constellation_mask_t
Bit mask of constellation configurations.
Definition: lr1110_gnss_types.h:148
lr1110_gnss_read_results
err_t lr1110_gnss_read_results(lriot_t *ctx, uint8_t *result_buffer, uint16_t result_buffer_size)
Read GNSS results.
lriot_t
LR IoT Click context object.
Definition: lriot.h:259
lr1110_gnss_read_assistance_position
err_t lr1110_gnss_read_assistance_position(lriot_t *ctx, lr1110_gnss_solver_assistance_position_t *assistance_position)
Function to read the assistance position.
lr1110_gnss_read_almanac
err_t lr1110_gnss_read_almanac(lriot_t *ctx, lr1110_gnss_almanac_full_read_bytestream_t almanac_bytestream)
Read the almanac.
lr1110_gnss_context_status_bytestream_t
uint8_t lr1110_gnss_context_status_bytestream_t[LR1110_GNSS_CONTEXT_STATUS_LENGTH]
Buffer that holds data for context status.
Definition: lr1110_gnss_types.h:249
lr1110_gnss_get_almanac_age_for_satellite
err_t lr1110_gnss_get_almanac_age_for_satellite(lriot_t *ctx, lr1110_gnss_satellite_id_t sv_id, uint16_t *almanac_age)
Get almanac age for a satellite.
lr1110_gnss_compute_almanac_age
uint16_t lr1110_gnss_compute_almanac_age(uint16_t almanac_date, uint16_t nb_days_between_epoch_and_corresponding_gps_time_rollover, uint16_t nb_days_since_epoch)
Helper function that computes the age of an almanac.
lr1110_gnss_solver_assistance_position_s
Assistance position.
Definition: lr1110_gnss_types.h:255
lr1110_gnss_scan_autonomous
err_t lr1110_gnss_scan_autonomous(lriot_t *ctx, lr1110_gnss_date_t date, lr1110_gnss_search_mode_t effort_mode, uint8_t gnss_input_parameters, uint8_t nb_sat)
Gnss scan with no assisted parameters needed.
lr1110_gnss_set_scan_mode
err_t lr1110_gnss_set_scan_mode(lriot_t *ctx, lr1110_gnss_scan_mode_t scan_mode)
Function to set the GNSS scan mode configuration.
lr1110_gnss_satellite_id_t
uint8_t lr1110_gnss_satellite_id_t
Satellite ID type.
Definition: lr1110_gnss_types.h:109
lr1110_gnss_get_result_size
err_t lr1110_gnss_get_result_size(lriot_t *ctx, uint16_t *result_size)
Get the size of results.
lr1110_hal.h
Hardware Abstraction Layer (HAL) interface for LR1110.
lr1110_gnss_search_mode_t
lr1110_gnss_search_mode_t
Search mode for GNSS scan.
Definition: lr1110_gnss_types.h:154
lr1110_gnss_parse_context_status_buffer
err_t lr1110_gnss_parse_context_status_buffer(lr1110_gnss_context_status_bytestream_t context_status_bytestream, lr1110_gnss_context_status_t *context_status)
Parse a raw buffer of context status.
lr1110_gnss_date_t
uint32_t lr1110_gnss_date_t
Representation of absolute time for GNSS operations.
Definition: lr1110_gnss_types.h:239
lr1110_gnss_set_almanac_update
err_t lr1110_gnss_set_almanac_update(lriot_t *ctx, lr1110_gnss_constellation_mask_t constellations_to_update)
Activate the almanac update.
lr1110_gnss_detected_satellite_s
Detected SV structure.
Definition: lr1110_gnss_types.h:264
lr1110_gnss_read_used_constellations
err_t lr1110_gnss_read_used_constellations(lriot_t *ctx, lr1110_gnss_constellation_mask_t *constellations_used)
Read constellation used by the GNSS scanner from the almanac update configuration.
lr1110_gnss_get_nb_detected_satellites
err_t lr1110_gnss_get_nb_detected_satellites(lriot_t *ctx, uint8_t *nb_detected_satellites)
Get the number of detected satellites during last scan.
lr1110_gnss_scan_assisted
err_t lr1110_gnss_scan_assisted(lriot_t *ctx, lr1110_gnss_date_t date, lr1110_gnss_search_mode_t effort_mode, uint8_t gnss_input_parameters, uint8_t nb_sat)
Gnss scan with assisted parameters.
lr1110_gnss_read_supported_constellations
err_t lr1110_gnss_read_supported_constellations(lriot_t *ctx, lr1110_gnss_constellation_mask_t *supported_constellations)
Function to read the supported constellation, GPS or BEIDOU other constellations.
lr1110_gnss_read_almanac_update
err_t lr1110_gnss_read_almanac_update(lriot_t *ctx, lr1110_gnss_constellation_mask_t *constellations_to_update)
Function to read the almanac update configuration.
lr1110_gnss_push_solver_msg
err_t lr1110_gnss_push_solver_msg(lriot_t *ctx, uint8_t *payload, uint16_t payload_size)
Push data received from solver to LR1110.
lr1110_gnss_context_status_s
Structure for GNSS context status.
Definition: lr1110_gnss_types.h:292
lr1110_gnss_timings_s
GNSS timings of the LR1110.
Definition: lr1110_gnss_types.h:274
lr1110_types.h
Type definitions for LR1110.
lr1110_gnss_almanac_full_read_bytestream_t
uint8_t lr1110_gnss_almanac_full_read_bytestream_t[LR1110_GNSS_FULL_ALMANAC_READ_BUFFER_SIZE]
Buffer that holds data for all almanacs full update - when reading.
Definition: lr1110_gnss_types.h:244
lr1110_gnss_scan_mode_t
lr1110_gnss_scan_mode_t
GNSS single or double scan mode.
Definition: lr1110_gnss_types.h:203
lr1110_gnss_get_timings
err_t lr1110_gnss_get_timings(lriot_t *ctx, lr1110_gnss_timings_t *timings)
Get the time spent in signal acquisition and signal analysis.
lr1110_gnss_push_dmc_msg
err_t lr1110_gnss_push_dmc_msg(lriot_t *ctx, uint8_t *dmc_msg, uint16_t dmc_msg_len)
Host receives an update from the network or assembles itself the update message and send it to the LR...
lr1110_gnss_get_detected_satellites
err_t lr1110_gnss_get_detected_satellites(lriot_t *ctx, uint8_t nb_detected_satellites, lr1110_gnss_detected_satellite_t *detected_satellite_id_snr_doppler)
Get the satellites detected on last scan with their IDs, C/N (aka CNR) and doppler.
lr1110_gnss_get_result_destination
err_t lr1110_gnss_get_result_destination(uint8_t *result_buffer, uint16_t result_buffer_size, uint8_t *destination)
Extract the destination from the result returned by a GNSS scan.
lr1110_gnss_version_s
Version structure of the LR1110 GNSS firmware.
Definition: lr1110_gnss_types.h:283
lr1110_gnss_types.h
GNSS scan driver types for LR1110.
lr1110_gnss_set_constellations_to_use
err_t lr1110_gnss_set_constellations_to_use(lriot_t *ctx, lr1110_gnss_constellation_mask_t constellation_mask)
Activate the GNSS scan constellation.
lr1110_gnss_get_context_status
err_t lr1110_gnss_get_context_status(lriot_t *ctx, lr1110_gnss_context_status_bytestream_t context_status_buffer)
Get the GNSS context status.
lr1110_gnss_read_firmware_version
err_t lr1110_gnss_read_firmware_version(lriot_t *ctx, lr1110_gnss_version_t *version)
Function to read the GNSS firmware version.
lr1110_gnss_almanac_update
err_t lr1110_gnss_almanac_update(lriot_t *ctx, uint8_t *blocks, uint8_t nb_of_blocks)
Update almanacs given as parameter.
lr1110_gnss_set_assistance_position
err_t lr1110_gnss_set_assistance_position(lriot_t *ctx, lr1110_gnss_solver_assistance_position_t *assistance_position)
Function to set the assistance position.