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
    }
  ]
} 
JS

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

ParameterTypeOptionalDescription
idstring(tick)It must be equal to "sbgDataLogger"
version
string(error)The version of the processing file and should be set to "1.0.0"
general
object(error)general block, it defines the general parameters of the logger
diffCorr
object(tick)diffCorr block, it defines the parameters of the differential corrections slot
slots
array(error)slots array, it defines the list of slots

General block

ParameterTypeOptionalDescription
outputDirectory
string(error)

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(error)If true, The creation date is added at the beginning of the logged files
splitInterval
enum(tick)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

ParameterTypeOptionalDescription
gga
object(error)GGA block, it defines the parameters of the GGA sending
logData
bool(error)If set to false, no logging will happens, sbgDataLogger will just connect the interface and forward the stream
type
enum(error)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(question)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

ParameterTypeOptionalDescription
enabled
bool(error)If set to true, it enables to send decoded positions as NMEA's GGA frames to the differential corrections slot
rate
enum(error)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(tick)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:

ParameterTypeOptionalDescription
description
string(tick)Text description
logData
bool(error)If set to false, no logging will happens, sbgDataLogger will just connect the interface
name
string(error)A unique name that will be used to identify the slot and for the name of the files produced when logging starts
forwardDiffCorr
bool(error)If set to true, sbgDataLogger will forward the differential corrections stream to this slot
type
enum(error)It defines the type of the interface. It can be one of the following values: "serial", "udp",  or "file"
serial, udp or file
object(question)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

ParameterTypeOptionalDescription
baudrate
number(error)The baudrate of the serial port.
port
string(error)Serial port system location

UDP

ParameterTypeOptionalDescription
host
string(tick)The host IP address. If it is not provided, this slot will listen and broadcast to all connected network interfaces
portIn
number(error)The port on which the host receive data.
portOut
number(error)The port on which the host write data.

FILE

ParameterTypeOptionalDescription
file
string(error)The path of the file to be used for the streaming
byteRate
number(error)Number of bytes to be read per second

NTRIP

ParameterTypeOptional
host
string(error)Address of the NTRIP caster
port
number(error)Port of the NTRIP caster
mountPoint
string(error)The mount point of the stream to be used. You can use the command ntrip-info to get the available mount points
username
string(tick)Name of the registered user of the NTRIP caster
password 
string(tick)Password of the registered user of the NTRIP caster