lriot 2.1.0.0
lr1110_modem_gnss_types.h File Reference

GNSS scan driver types definition for LR1110 modem. More...

#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  lr1110_modem_gnss_solver_assistance_position_t
 Assistance position. More...
 
struct  lr1110_modem_gnss_detected_satellite_t
 Detected satellite structure. More...
 
struct  lr1110_modem_gnss_timings_t
 GNSS timings of the LR1110 modem. More...
 
struct  lr1110_modem_gnss_version_t
 Version structure of the LR1110 GNSS firmware. More...
 
struct  lr1110_modem_gnss_context_t
 Status message struct in case of operation code = 0x18 (Status Message) More...
 

Macros

#define LR1110_MODEM_GNSS_FULL_UPDATE_N_ALMANACS   ( 128 )
 Number of almanacs in full update payload.
 
#define LR1110_MODEM_GNSS_SINGLE_ALMANAC_READ_SIZE   ( 22 )
 Size of the almanac of a single satellite when reading.
 
#define LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE   ( 20 )
 Size of the almanac of a single satellite when writing.
 
#define LR1110_MODEM_GNSS_FULL_ALMANAC_WRITE_BUFFER_SIZE    ( ( LR1110_MODEM_GNSS_FULL_UPDATE_N_ALMANACS * LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE ) + 20 )
 Size of the almanac for all satellites when writing.
 
#define LR1110_MODEM_GNSS_SCAN_RESULT_DESTINATION_INDEX   ( 0 )
 Position of the destination ID in the scan result buffer.
 
#define LR1110_MODEM_GNSS_SCAN_RESULT_EVENT_TYPE_INDEX   ( 1 )
 Position of the scan done event type in the scan result buffer,.
 

Typedefs

typedef uint8_t lr1110_modem_gnss_satellite_id_t
 Satellite ID type.
 
typedef uint8_t lr1110_modem_gnss_constellation_mask_t
 Bit mask of constellation configurations.
 
typedef uint8_t lr1110_modem_gnss_frequency_search_space_mask_t
 Bit mask of frequency search space configurations.
 
typedef uint8_t lr1110_modem_gnss_almanac_full_update_bytestream_t[LR1110_MODEM_GNSS_FULL_ALMANAC_WRITE_BUFFER_SIZE]
 Buffer that holds data for all almanacs full update.
 
typedef uint8_t lr1110_modem_gnss_almanac_one_chunk_bytestream_t[LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE]
 Buffer that hold one chunk of almanac for update.
 

Enumerations

enum  lr1110_modem_gnss_scan_done_event_t {
  LR1110_MODEM_GNSS_SCAN_DONE_PROCESS_OK = 0x00 , LR1110_MODEM_GNSS_SCAN_DONE_IQ_FAILS = 0x05 , LR1110_MODEM_GNSS_SCAN_DONE_NO_TIME = 0x06 , LR1110_MODEM_GNSS_SCAN_DONE_NO_SATELLITE_DETECTED = 0x07 ,
  LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_TOO_OLD = 0x08 , LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_UPDATE_FAILS_CRC_ERROR = 0x09 , LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_UPDATE_FAILS_FLASH_INTEGRITY_ERROR = 0x0A , LR1110_MODEM_GNSS_SCAN_DONE_GLOBAL_ALMANAC_CRC_ERROR = 0x0D ,
  LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_VERSION_NOT_SUPPORTED = 0x0E
}
 GNSS Event value for Host destinated message. More...
 
enum  lr1110_modem_gnss_destination_t { LR1110_MODEM_GNSS_DESTINATION_HOST = 0x00 , LR1110_MODEM_GNSS_DESTINATION_SOLVER = 0x01 }
 GNSS response type indicates the destination: Host MCU or GNSS solver. More...
 
enum  lr1110_modem_gnss_search_mode_t { LR1110_MODEM_GNSS_OPTION_DEFAULT = 0x00 , LR1110_MODEM_GNSS_OPTION_BEST_EFFORT = 0x01 }
 Search mode for GNSS scan. More...
 
enum  lr1110_modem_gnss_result_mask_e { LR1110_MODEM_GNSS_PSEUDO_RANGE_MASK = ( 1 << 0 ) , LR1110_MODEM_GNSS_DOPPLER_MASK = ( 1 << 1 ) , LR1110_MODEM_GNSS_BIT_CHANGE_MASK = ( 1 << 2 ) }
 bit mask indicating which information is added in the output payload More...
 
enum  lr1110_modem_gnss_constellation_t { LR1110_MODEM_GNSS_GPS_MASK = 0x01 , LR1110_MODEM_GNSS_BEIDOU_MASK = 0x02 }
 Constellation identifiers. More...
 
enum  lr1110_modem_gnss_almanac_constellation_id_t { LR1110_MODEM_GNSS_ALMANAC_CONSTELLATION_GPS = 0x01 , LR1110_MODEM_GNSS_ALMANAC_CONSTELLATION_BEIDOU = 0x02 , LR1110_MODEM_GNSS_ALMANAC_CONSTELLATION_UNDEFINED = 0x08 }
 Almanac Constellation identifiers. More...
 
enum  lr1110_modem_gnss_frequency_search_space_t { LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_250_HZ = 0x00 , LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_500_HZ = 0x01 , LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_1_KHZ = 0x02 , LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_2_KHZ = 0x03 }
 Frequency search space around the Doppler frequency. More...
 
enum  lr1110_modem_gnss_context_status_error_code_t {
  LR1110_MODEM_GNSS_CONTEXT_STATUS_NO_ERROR = 0x00 , LR1110_MODEM_GNSS_CONTEXT_STATUS_ALMANAC_TOO_OLD = 0x01 , LR1110_MODEM_GNSS_CONTEXT_STATUS_LAST_ALMANAC_UPDATE_CRC_MISMATCH = 0x02 , LR1110_MODEM_GNSS_CONTEXT_STATUS_FLASH_MEMORY_INTEGRITY_ERROR = 0x03 ,
  LR1110_MODEM_GNSS_CONTEXT_STATUS_LAST_ALMANAC_UPDATE_TOO_OLD
}
 Context status error code. More...
 

Detailed Description

GNSS scan driver types definition for LR1110 modem.

Revised BSD License Copyright Semtech Corporation 2020. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the Semtech corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ LR1110_MODEM_GNSS_FULL_ALMANAC_WRITE_BUFFER_SIZE

#define LR1110_MODEM_GNSS_FULL_ALMANAC_WRITE_BUFFER_SIZE    ( ( LR1110_MODEM_GNSS_FULL_UPDATE_N_ALMANACS * LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE ) + 20 )

Size of the almanac for all satellites when writing.

◆ LR1110_MODEM_GNSS_FULL_UPDATE_N_ALMANACS

#define LR1110_MODEM_GNSS_FULL_UPDATE_N_ALMANACS   ( 128 )

Number of almanacs in full update payload.

◆ LR1110_MODEM_GNSS_SCAN_RESULT_DESTINATION_INDEX

#define LR1110_MODEM_GNSS_SCAN_RESULT_DESTINATION_INDEX   ( 0 )

Position of the destination ID in the scan result buffer.

◆ LR1110_MODEM_GNSS_SCAN_RESULT_EVENT_TYPE_INDEX

#define LR1110_MODEM_GNSS_SCAN_RESULT_EVENT_TYPE_INDEX   ( 1 )

Position of the scan done event type in the scan result buffer,.

Note
a event type exists only if the destination is LR1110_MODEM_GNSS_DESTINATION_HOST

◆ LR1110_MODEM_GNSS_SINGLE_ALMANAC_READ_SIZE

#define LR1110_MODEM_GNSS_SINGLE_ALMANAC_READ_SIZE   ( 22 )

Size of the almanac of a single satellite when reading.

◆ LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE

#define LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE   ( 20 )

Size of the almanac of a single satellite when writing.

Typedef Documentation

◆ lr1110_modem_gnss_almanac_full_update_bytestream_t

typedef uint8_t lr1110_modem_gnss_almanac_full_update_bytestream_t[LR1110_MODEM_GNSS_FULL_ALMANAC_WRITE_BUFFER_SIZE]

Buffer that holds data for all almanacs full update.

◆ lr1110_modem_gnss_almanac_one_chunk_bytestream_t

typedef uint8_t lr1110_modem_gnss_almanac_one_chunk_bytestream_t[LR1110_MODEM_GNSS_SINGLE_ALMANAC_WRITE_SIZE]

Buffer that hold one chunk of almanac for update.

◆ lr1110_modem_gnss_constellation_mask_t

Bit mask of constellation configurations.

See also
lr1110_modem_gnss_constellation_t

◆ lr1110_modem_gnss_frequency_search_space_mask_t

Bit mask of frequency search space configurations.

See also
lr1110_modem_gnss_frequency_search_space_t

◆ lr1110_modem_gnss_satellite_id_t

Satellite ID type.

Enumeration Type Documentation

◆ lr1110_modem_gnss_almanac_constellation_id_t

Almanac Constellation identifiers.

Enumerator
LR1110_MODEM_GNSS_ALMANAC_CONSTELLATION_GPS 
LR1110_MODEM_GNSS_ALMANAC_CONSTELLATION_BEIDOU 
LR1110_MODEM_GNSS_ALMANAC_CONSTELLATION_UNDEFINED 

◆ lr1110_modem_gnss_constellation_t

Constellation identifiers.

Enumerator
LR1110_MODEM_GNSS_GPS_MASK 
LR1110_MODEM_GNSS_BEIDOU_MASK 

◆ lr1110_modem_gnss_context_status_error_code_t

Context status error code.

Enumerator
LR1110_MODEM_GNSS_CONTEXT_STATUS_NO_ERROR 

No error.

LR1110_MODEM_GNSS_CONTEXT_STATUS_ALMANAC_TOO_OLD 

Almanac too old.

LR1110_MODEM_GNSS_CONTEXT_STATUS_LAST_ALMANAC_UPDATE_CRC_MISMATCH 

Last almanac update CRC mismatch.

LR1110_MODEM_GNSS_CONTEXT_STATUS_FLASH_MEMORY_INTEGRITY_ERROR 

Flash memory integrity error.

LR1110_MODEM_GNSS_CONTEXT_STATUS_LAST_ALMANAC_UPDATE_TOO_OLD 

Last almanac update time difference more than 1 month.

◆ lr1110_modem_gnss_destination_t

GNSS response type indicates the destination: Host MCU or GNSS solver.

Enumerator
LR1110_MODEM_GNSS_DESTINATION_HOST 

Host MCU.

LR1110_MODEM_GNSS_DESTINATION_SOLVER 

GNSS Solver.

◆ lr1110_modem_gnss_frequency_search_space_t

Frequency search space around the Doppler frequency.

Enumerator
LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_250_HZ 
LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_500_HZ 
LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_1_KHZ 
LR1110_MODEM_GNSS_FREQUENCY_SEARCH_SPACE_2_KHZ 

◆ lr1110_modem_gnss_result_mask_e

bit mask indicating which information is added in the output payload

Enumerator
LR1110_MODEM_GNSS_PSEUDO_RANGE_MASK 
LR1110_MODEM_GNSS_DOPPLER_MASK 
LR1110_MODEM_GNSS_BIT_CHANGE_MASK 

◆ lr1110_modem_gnss_scan_done_event_t

GNSS Event value for Host destinated message.

These values are the meaning of the second byte of a message destinated to host obtained when reading LR1110_MODEM_LORAWAN_EVENT_GNSS_SCAN_DONE buffer

Enumerator
LR1110_MODEM_GNSS_SCAN_DONE_PROCESS_OK 
LR1110_MODEM_GNSS_SCAN_DONE_IQ_FAILS 
LR1110_MODEM_GNSS_SCAN_DONE_NO_TIME 
LR1110_MODEM_GNSS_SCAN_DONE_NO_SATELLITE_DETECTED 
LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_TOO_OLD 
LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_UPDATE_FAILS_CRC_ERROR 
LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_UPDATE_FAILS_FLASH_INTEGRITY_ERROR 
LR1110_MODEM_GNSS_SCAN_DONE_GLOBAL_ALMANAC_CRC_ERROR 
LR1110_MODEM_GNSS_SCAN_DONE_ALMANAC_VERSION_NOT_SUPPORTED 

◆ lr1110_modem_gnss_search_mode_t

Search mode for GNSS scan.

Enumerator
LR1110_MODEM_GNSS_OPTION_DEFAULT 

Search all requested satellites or fail.

LR1110_MODEM_GNSS_OPTION_BEST_EFFORT 

Add additional search if not all satellites are found.