solutions
LoRa Basics Modem and LoRa Edge documentation
Scenario - LoRa Basics™ Almanac Update¶
Introduction¶
The LR1110 chip is able to reduce GNSS scanning time by taking into account coarse orbital parameters for different GNSS constellations (the almanac). In conjunction with a coarse time and position estimate, the LR1110 chip uses this information to optimize the search for, and acquisition of, GNSS signals. Over time, the true satellite positions diverge from those stored in the almanac, as a result the almanac has to be updated regularly.
The LoRa Cloud™ Modem & Geolocation Services Almanac Update Over-the-Air (AUOTA) feature allows a device built on the LR1110 chip with LoRa Basics™ Modem-E firmware to automatically perform efficient partial almanac updates over a LoRaWAN® network. The almanac is stored entirely in flash memory; therefore it is kept after power-off and after sleep mode without retention.
Once enabled, AUOTA is carried out by the LoRa Basics™ Modem-E without any action on the host MCU side.
Note
A full almanac update can also be performed by the device application. For details, see User Loaded Almanac Update.
Compatibility¶
Prerequisites¶
Common:
The end device must have joined the network.
The application server forwards uplinks on a configured modem management FPort (199 by default) to the LoRa Cloud™ Modem & Geolocation Services.
The application server forwards LoRa Cloud™ Modem & Geolocation Services downlinks to the end device.
Step-by-Step Procedure¶
To use the LoRa Cloud™ Modem & Geolocation Services Almanac Update Over-the-Air feature, the LoRa Basics™ Modem-E must include the almanac status in the modem management uplinks.
To enable this function, add the field DM_INFO_TYPE_GNSS_ALMANAC_STATUS
to the modem management frame, using the set_dm_info_field()
command.
The almanac will then be kept up-to-date by the Modem & Geolocation Services, without further action from the device application.
Sample Code¶
Use the following sample code to activate automatic almanac updates on the device:
#include "lr1110_modem_lorawan.h"
lr1110_modem_dm_info_fields_t dm_info_fields;
lr1110_modem_response_code_t set_dm_info_field_response_code;
/* Set modem management info field */
dm_info_fields.dm_info_field[0] = LR1110_MODEM_DM_INFO_TYPE_GNSS_ALMANAC_STATUS;
/*
* This command erases the previous fields activated in the
* modem, and adds all the fields required by the application.
*/
dm_info_fields.dm_info_field[1] = LR1110_MODEM_DM_INFO_TYPE_CHARGE;
dm_info_fields.dm_info_field[2] = LR1110_MODEM_DM_INFO_TYPE_TEMPERATURE;
dm_info_fields.dm_info_field[3] = LR1110_MODEM_DM_INFO_TYPE_VOLTAGE;
dm_info_fields.dm_info_length = 4;
set_dm_info_field_response_code = lr1110_modem_set_dm_info_field(
&context,
&dm_info_fields
);
Adjust the modem management frame interval to trigger almanac updates:
#include "lr1110_modem_lorawan.h"
lr1110_modem_response_code_t set_dm_info_field_response_code;
/*
* Set modem management interval to 1 hour
* Units can be:
* - LR1110_MODEM_REPORTING_INTERVAL_IN_SECOND
* - LR1110_MODEM_REPORTING_INTERVAL_IN_DAY
* - LR1110_MODEM_REPORTING_INTERVAL_IN_HOUR
* - LR1110_MODEM_REPORTING_INTERVAL_IN_MINUTE
*/
set_dm_info_field_response_code = lr1110_modem_set_dm_info_interval(
&context,
LR1110_MODEM_REPORTING_INTERVAL_IN_HOUR,
1
);
In-Depth Behavior¶
A value representing the almanac state is embedded in the modem management frame every time it is sent by the modem. The Modem & Geolocation Services can then determine whether the device’s almanac needs to be updated. If it does, the Modem & Geolocation Services creates a downlink with updated almanac data to be sent to the modem.
Note
The Modem & Geolocation Services API parameter dn_mtu
is important and should be provided in the Modem & Geolocation Services query if it is
known by the application server. (For details, see the
LoRa Cloud™ Modem & Geolocation Services uplink documentation.) This parameter tells the
Modem & Geolocation Services how many bytes can be put in the downlink, which can increase the update speed and lower the number of downlinks
required to update the device almanac. The minimum downlink MTU supported by the Modem & Geolocation Services for updating the almanac
is 28 bytes.
Note
By default the Modem & Geolocation Services assumes an available downlink MTU of 51 bytes. This corresponds to the minimum defined by the LoRaWAN® Standard in most regions.
Note
The most effective way to keep the almanac up-to-date from a data volume perspective is to send the almanac status (via the modem management frame) every two or three days.
Used By¶
GNSS
LoRa Basics Modem and LoRa Edge documentation
Table of Contents
- Overview - LoRa Edge™ Asset Management Platform
- Use Case - Basic Asset Tracking
- Use Case - IR Image Upload on Detected Motion
- Scenario - GNSS Assisted Scan
- Scenario - GNSS Autonomous Scan
- Scenario - LoRa Basics™ Wi-Fi Passive Scan
- Scenario - GNSS Scan with ROSE
- Scenario - Wi-Fi Scan with ROSE
- Scenario - LoRa Cloud™ Join Server
- Scenario - Claiming a Device
- Scenario - Unclaiming a Device
- Scenario - Modem-E Initialization
- Scenario - LoRa Basics™ Almanac Update
- Scenario - User Loaded Almanac Update
- Scenario - Intermittent Network
- Component - Clock Synchronization
- Component - Large File Upload
- Component - Reliable Octet Stream Encoding
- Cryptographic Engine
- Glossary
ADDITIONAL RESOURCES - VIDEOS