ishanpranav / novatel-gnss-log-parser

A cross-platform library and application for parsing NovAtel GNSS command output message logs

Home Page:https://ishanpranav.github.io/novatel-gnss-log-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GNSS log parser

This is a cross-platform library and application for parsing NovAtel GNSS command output message logs. The project includes a standalone class library, a cross-platform command-line tool, and a Windows GUI application.

This project is a fork of the parser designed by Ishan Pranav (me!) for Arnold O. Beckman High School's Avionics Team, part of the Irvine CubeSat STEM Program. The software is designed for compatibility with NovAtel's OEM6 and OEM7 products.

You can download the software from the repository website.

Screenshots

Screenshot of the GNSS Log Visualizer application.

API

The example below uses an ASCII parser to read messages from a string. Binary and Abbreviated ASCII messages are not supported.

string value = @"#
BESTPOSA,COM1,0,90.5,FINESTEERING,1949,403742.000,02000000,b1f6,32768;
SOL_COMPUTED,SINGLE,51.11636937989,-114.03825348307,1064.533,-16.9000,
WGS84,1.3610,1.0236,2.4745,"""",0.000,0.000,19,19,19,19,00,06,00,33
*6e08fa22
";
AsciiGpsParser parser = new AsciiGpsParser();

await foreach (AsciiMessage message in parser.ParseAsync(value))
{
    // Process the message
}

Built-in logs

Each GNSS log needs a dedicated model in the parser. The following built-in logs are automatically registered.

Command Model Class
ALIGNBSLNENU EnuBaselinesUsingAlignCommand
ALIGNBSLNXYZ XyzBaselinesUsingAlignCommand
ALIGNDOP DopCommand
ALMANAC AlmanacCommand
AUTHCODES AuthorizationCodesCommand
AVEPOS PositionAveragingCommand
BDSALMANAC BdsAlmanacCommand
BDSCLOCK BdsClockCommand
BESTPOS BestPositionCommand
RXSTATUS ReceiverStatusCommand

Custom logs

To add support for the GNSS TIME command, create a new class annotated with the CommandAttribute. The parser uses CsvHelper to map strings to objects.

[Command("TIME")] // Command name
public class TimeCommand
{
    [Index(0)] // Field position
    public GnssClockModelStatus Status { get; set; } 
}

public enum GnssClockModelStatus
{
    [Name("VALID")] // ASCII message representation
    Valid = 0, // Binary message representation

    [Name("CONVERGING")]
    Converging = 1,

    [Name("ITERATING")]
    Iterating = 2,

    [Name("INVALID")]
    Invalid = 3
}

Then, add the class to the parser:

parser.TryRegister<TimeCommand>();

Command-line interface

Provide a path to a log file:

IrvineCubeSat.GpsParser.Console.exe "Logs\Log1.gps"

Or a string:

IrvineCubeSat.GpsParser.Console.exe "#BESTPOSA,COM1,0,90.5,FINESTEERING,1949,403742.000,02000000,b1f6,32768;SOL_COMPUTED,SINGLE,51.11636937989,-114.03825348307,1064.533,-16.9000,WGS84,1.3610,1.0236,2.4745,UNKNOWN,0.000,0.000,19,19,19,19,00,06,00,33*6e08fa22"

Then retrieve the JSON output:

[
  {
    "header": {
      "command": "BESTPOS",
      "port": "COM1",
      "sequenceNumber": 0,
      "idleTime": 90.5,
      "timeStatus": 180,
      "week": 1949,
      "weekOffset": "4.16:09:02",
      "timestamp": "2017-05-17T16:09:02",
      "receiverStatus": 33554432,
      "receiverSoftwareVersion": 32768
    },
    "command": {
      "solutionStatus": 0,
      "positionType": 16,
      "latitude": 51.11636937989,
      "longitude": -114.03825348307,
      "height": 1064.533,
      "undulation": -16.9,
      "datumIdNumber": 61,
      "latitudeStandardDeviation": 1.361,
      "longitudeStandardDeviation": 1.0236,
      "heightStandardDeviation": 2.4745,
      "baseStationId": "UNKNOWN",
      "differentialAge": "00:00:00",
      "solutionAge": "00:00:00",
      "satellitesTracked": 19,
      "satellitesInSolution": 19,
      "l1SatellitesInSolution": 19,
      "multiFrequencySatellitesInSolution": 19
    },
    "checksum": 1846082082,
    "expectedChecksum": 1696927800,
    "raw": "BESTPOSA,COM1,0,90.5,FINESTEERING,1949,403742.000,02000000,b1f6,32768;SOL_COMPUTED,SINGLE,51.11636937989,-114.03825348307,1064.533,-16.9000,WGS84,1.3610,1.0236,2.4745,UNKNOWN,0.000,0.000,19,19,19,19,00,06,00,33"
  }
]

The command-line interface supports all .NET-compatible operating systems.

License

This repository is licensed with the MIT license.

Attribution

This software uses third-party libraries or other resources that may be distributed under licenses different than the software. Please see the third-party notices included here.

References

About

A cross-platform library and application for parsing NovAtel GNSS command output message logs

https://ishanpranav.github.io/novatel-gnss-log-parser

License:MIT License


Languages

Language:C# 96.1%Language:XSLT 3.3%Language:PowerShell 0.6%