n2k-signalk icon indicating copy to clipboard operation
n2k-signalk copied to clipboard

Problem converting MMSI with leading zero?

Open tkurki opened this issue 1 year ago • 0 comments

% grep 129038  ../server/samples/aava-n2k.data | ../canboatjs/bin/analyzerjs | grep 27653800 | head -1 | json
{
  "prio": 4,
  "pgn": 129038,
  "dst": 255,
  "src": 43,
  "timestamp": "2014-08-15T19:01:57.883Z",
  "input": [
    "2014-08-15T19:01:57.883Z,4,129038,43,255,27,03,a8,f6,a5,01,3e,9f,b9,0e,40,b9,70,23,e0,00,00,00,00,00,00,00,ff,ff,ff,7f,05,fe"
  ],
  "fields": {
    "Message ID": 3,
    "Repeat Indicator": "Initial",
    "User ID": 27653800,
    "Longitude": 24.704595,
    "Latitude": 59.4590016,
    "Position Accuracy": "Low",
    "RAIM": "not in use",
    "Time Stamp": "56",
    "COG": 0,
    "SOG": 0,
    "Communication State": "0",
    "AIS Transceiver information": "Channel A VDL reception",
    "Nav Status": "Moored",
    "Special Maneuver Indicator": "Not available",
    "Reserved1": "0",
    "AIS Spare": "6"
  },
  "description": "AIS Class A Position Report"
}

canboatjs is version 1.22.2

27653800 is 8 characters, which probably means it is missing a leading zero. 276 MID is Estonia, so it makes sense this appears in the log file that is from Gulf of Finland. 0MIDXXXXX are group call identities, which makes little sense in class A position report (?).

tkurki avatar Dec 04 '22 13:12 tkurki