Download PDF
Download page Using The CLI.
Using The CLI
sbgDataLogger CLI relies on a JSON file to describe the parameters of the logging session. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is both human and computer friendly. You can find more information at https://www.json.org/.
In addition of processing and logging a session, the CLI tool can provide you with available serial ports on the system and the source table of a NTRIP caster
The sbgDataLogger CLI program is shipped with the Inertial SDK installation package. On Windows, if you have used the default installation path, you should find the binary at:
C:\Program Files\SBG Systems\sbgDataLogger\bin\sbgDataLoggerCli.exe
You can display a full help that lists all available options by simply typing:
sbgDataLoggerCli.exe --help-all
You should get the following output:
SBG Data logger command line interface. Usage: sbgDataLoggerCli [OPTIONS] SUBCOMMAND Options: -h,--help Print this help message and exit --help-all Expand all help -v,--version Subcommands: process Process a datalogger session using the settings defined in the specified json file Positionals: config_file REQUIRED Path to a .json configuration file Options: --ignoreSslErrors Ignore SSL errors list-serial List available serial ports on the system ntrip-info Get and show source table of the ntrip caster Options: --host <host> REQUIRED Ntrip caster host address --port <port> REQUIRED Ntrip caster port --ignoreSslErrors Ignore SSL errors
Processing logging session file
The command process is used to execute the logging session. It takes one required argument which is the path to the logging session configuration file. It can be an absolute path or relative to the executable location. And it can take one option --ignoreSslErrors which bypass any eventual SSL errors.
sbgDataLoggerCli.exe process config.json
If everything went well, sbgDataLoggerCli will display on the console periodically textual reports of the status of each slot.
Example
In the following example, we configure an NTRIP client for the differential corrections, one UDP slot and one SERIAL slot.
{
"version": "1.0.0",
"id": "sbgDataLogger",
"general": {
"outputDirectory": "C:/Users/rsiryani/Documents/sbgDataLogger",
"prependUTC": true,
"splitInterval": "1hour"
},
"diffCorr": {
"type": "ntrip",
"ntrip": {
"host": "10.10.2.100",
"port": 2101,
"username": "sbg",
"password": "sbg",
"mountPoint": "sbg"
},
"logData": true,
"gga": {
"enabled": true,
"rate": "1sec"
}
},
"slots": [
{
"name": "ELLIPSE Slot 1",
"description": "This is just a demo of the CLI",
"type": "serial",
"serial": {
"port": "COM3",
"baudrate": 921600
},
"logData": true,
"forwardDiffCorr": true
},
{
"name": "QUANTA Slot 2",
"description": "And an other slot!",
"type": "serial",
"serial": {
"port": "COM9",
"baudrate": 921600
},
"logData": true,
"forwardDiffCorr": true
}
]
}
When executing the subcommand process, you should see something like:
Configuration file
sbgDataLogger CLI uses a JSON (JavaScript Object Notation) text file to describe the logging session. The GUI application can load and the save format.
General Blocks Schema
Parameter | Type | Optional | Description |
---|---|---|---|
id | string | It must be equal to "sbgDataLogger" | |
version | string | The version of the processing file and should be set to "1.0.0" | |
general | object | general block, it defines the general parameters of the logger | |
diffCorr | object | diffCorr block, it defines the parameters of the differential corrections slot | |
slots | array | slots array, it defines the list of slots |
General block
Parameter | Type | Optional | Description |
---|---|---|---|
outputDirectory | string | The path of the root folder where the subsequent logged files would be placed. The path parts should be separated by the character "/" and not "\" | |
prependUTC | bool | If true, The creation date is added at the beginning of the logged files | |
splitInterval | enum | It defines the time interval over which the log files are split. It can be one of the following values: "15min", "30min", "1hour", "2hours" or "4hours" |
Differential corrections block
Parameter | Type | Optional | Description |
---|---|---|---|
gga | object | GGA block, it defines the parameters of the GGA sending | |
logData | bool | If set to false, no logging will happens, sbgDataLogger will just connect the interface and forward the stream | |
type | enum | It defines the type of the interface. It can be one of the following values: "ntrip", "serial", "udp", or "file" | |
ntrip, serial, udp or file | object | The key of this parameter must match the same value of the type parameter. And it defines the parameters of the interface: NTRIP, Serial, UDP or File |
GGA Block
Parameter | Type | Optional | Description |
---|---|---|---|
enabled | bool | If set to true, it enables to send decoded positions as NMEA's GGA frames to the differential corrections slot | |
rate | enum | The rate over which we update and resend the selected GNSS position as GGA frame. It can be one of the following values: "1sec", "5sec", "10sec", "30sec" or "60sec" | |
source | string | It defines the name of the slot which the decoded positions will be used. If this parameter is not provided, the first slot in the list with available position will be selected automatically. |
Slots Block
This block is an array containing slot objects. the parameters of these objects are as follows:
Parameter | Type | Optional | Description |
---|---|---|---|
description | string | Text description | |
logData | bool | If set to false, no logging will happens, sbgDataLogger will just connect the interface | |
name | string | A unique name that will be used to identify the slot and for the name of the files produced when logging starts | |
forwardDiffCorr | bool | If set to true, sbgDataLogger will forward the differential corrections stream to this slot | |
type | enum | It defines the type of the interface. It can be one of the following values: "serial", "udp", or "file" | |
serial, udp or file | object | The key of this parameter must match the same value of the type parameter. And it defines the parameters of the interface: SERIAL, UDP or FILE |
Interfaces blocks
SERIAL
Parameter | Type | Optional | Description |
---|---|---|---|
baudrate | number | The baudrate of the serial port. | |
port | string | Serial port system location |
UDP
Parameter | Type | Optional | Description |
---|---|---|---|
host | string | The host IP address. If it is not provided, this slot will listen and broadcast to all connected network interfaces | |
portIn | number | The port on which the host receive data. | |
portOut | number | The port on which the host write data. |
FILE
Parameter | Type | Optional | Description |
---|---|---|---|
file | string | The path of the file to be used for the streaming | |
byteRate | number | Number of bytes to be read per second |
NTRIP
Parameter | Type | Optional | |
---|---|---|---|
host | string | Address of the NTRIP caster | |
port | number | Port of the NTRIP caster | |
mountPoint | string | The mount point of the stream to be used. You can use the command ntrip-info to get the available mount points | |
username | string | Name of the registered user of the NTRIP caster | |
password | string | Password of the registered user of the NTRIP caster |