-
Notifications
You must be signed in to change notification settings - Fork 14
Input Data
OSNMAlib is not a GNSS receiver, hence it piggybacks on a full-featured GNSS receiver to work. From this receiver, OSNMAlib needs the navigation bits transmitted by the satellites, the ID of the satellite that transmitted the data and the GNSS time.
The reception of the GNSS time is key because is the only way OSNMAlib can track time. OSNMAlib receives the navigation bits in nominal pages (also called double pages) and expects these to come timestamped.
The time indicated in each epoch shall never go back, it must always be equal to or greater than the time indicated in the previous epoch.
OSNMAlib gets the navigation bits and complementary data encapsulated in a DataFormat
object. This object accepts as mandatory parameters the satellite ID, the GNSS time and the navigation data.
-
svid
[int] - ID of the satellite transmitting the navigation data. Valid values: [1,36] -
wn
[int] - Week number of when the navigation data was transmitted with respect to Galileo start time. -
tow
[int] - Time of Week in seconds of when the navigation data was transmitted. -
nav_bits
[BitArray] - The 240 navigation data bits concerning a nominal page. Some of these bits are of no use by OSNMAlib so they can be filled with 0, but the software expects the full page. The parameter shall be a BitArray object. -
band
[str] - Optional parameter to specify the band form which the navigation bits come from. Currently, OSNMAlib only supports I/NAV data, but in the future F/NAV may be of interest. Possible values areGAL_L1BC
for I/NAV andGAL_E5b
for F/NAV. Defaults toGAL_L1BC
. -
crc
[bool] - Optional parameter to specify if the page passed the CRC verification. Defaults toTrue
.
The code implementing this class can be found here.
The data reception of OSNMAlib is abstracted behind an iterator. The software receiving loop expects at each iteration a DataFormat
object.
In Python, an iterator is an object which implements the iterator protocol, which consists of the methods
__iter__
and __next__
. The __iter__
method allows to do some initializing, but must always return the
iterator object itself. The __next__
method also allows to do operations and must return the next item in the
sequence.
Therefore, any data input class must implement the iterator interface and do the internal operations to provide a DataFormat
object for every nominal page with a GNSS time that never goes backwards. For that purpose, the abstract class PageIterator
is provided here.
Of course, you are free to implement any extra feature in the iterator (filter by satellite number, connect to an IP, etc) as long as you implement the iterator methods.
class PageIterator:
"""
Abstract class to be implemented by any input format
"""
def __init__(self):
pass
def __iter__(self) -> 'PageIterator':
return self
def __next__(self) -> 'DataFormat':
pass
If the custom navigation data is available in Septentrio Binary Format (SBF) file, the receiver already includes the input
iterator SBF
to handle it. The SBF file used needs to contain the block with the raw Galileo INAV bits (GALRawINAV)
so OSNMAlib can process them.
We are also including the iterator SBFAscii
for the cases where the GALRawINAV
data is in SBF ascii mode (converted from an SBF file using the official tools).
Both can be found here.
The SBF live input uses the same parser as the SBF file but reads the binary data from a TCP socket. There are 2 variations of the input based on the TCP logging options of the Septentrio receiver:
- SBFLive: Connects to a host and port and starts reading SBF data.
- SBFLiveServer: Opens a TCP server at host and port. When a connection is received, it starts to read SBF data.
The galmon network is an open-source project that aggregates GNSS data from receivers around the globe for monitoring purposes. They have a dashboard for the main GNSS constellations and signals, with live information about the satellite status and data transmitted. Any user can contribute or receive data from the distributed network; hence, it is a very nice way to use OSNMAlib without any receiver.
Explicitly for the dissemination of OSNMA data bits, they facilitate the endpoint 86.82.68.237:10000, where every I/NAV message sent in the network is redirected. The navigation messages are encapsulated using the protobuf standard.
The input format for galmon can be found here. The input module not only parses the protobuf format but also fixes some problems in the network (TOW jumps and wrong estimation of word type 16 TOW).
An example of how to use the input is provided here.
GNSS-SDR is an open-source GNSS software-defined receiver that supports Galileo. The receiver is highly configurable using a text-based file and completely independent of the radio-frequency front-end used.
To integrate GNSS-SDR with OSNMAlib we need to access the navigation message bits, which is done using the Galileo_E1B_Telemetry_Decoder
block that decodes the INAV message of E1-B signal component. To retrieve the decoded bits we use a monitor block that sends the telemetry decoder information to an IP and UDP port in protobuf format.
The extra lines needed in the configuration file are the following:
TelemetryDecoder_1B.implementation = Galileo_E1B_Telemetry_Decoder
NavDataMonitor.enable_monitor = true
NavDataMonitor.client_addresses = 127.0.0.1
NavDataMonitor.port = 1234
Within OSNMAlib we have prepared a folder to run the GNSS-SDR input easily. The folder contains the file gnss-sdr_galileo_8bit_run.conf
configured to process Galileo and send the navigation data bits to OSNMAlib, and the file run.py
with the proper iterator configured. The binary file with the raw data for the test run can be downloaded from here.
TBC