Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMEA 2k error at start or when satellites lost #226

Open
LennartG-Sve opened this issue Oct 13, 2021 · 4 comments
Open

NMEA 2k error at start or when satellites lost #226

LennartG-Sve opened this issue Oct 13, 2021 · 4 comments

Comments

@LennartG-Sve
Copy link

There is something odd going on when Signal K is reading NMEA 2000 before hooking up to any satellites, see also the attached picture. SK is sending a speed although no satellites are detected. The GPS unnit is a Garmin GPS24xd NMEA 2000 (probably the best they have). I've also tested with another GPS giving the same result.

HorizontalDilution equals '-0.01' (perhaps correct but should IMHO here be a high popsitive number)
MethodQuality equals 'no GPS' (no satellites in view so this is correct)
satellites equals '0' (also correct)
speedOverGround equals 655.34 m/s (this is definitely wrong and always the same value)

SK displays a speed of 1273.89 knots in NNE direction (direction varies slightly). This should be taken care of somehow.

This is also fully repeatable, I've used a tin can covering the GPS to force a test case ;-)
Skärmbild_2021-10-07_15-53-25
)

@tkurki
Copy link
Member

tkurki commented Oct 13, 2021

It would help if you could capture log data from such time (Admin => Connections => Logging checkbox for the n2k connection, restart the server). That would show exactly what is happening.

Btw your screenshot clips the PGN numbers that would tell the pgn that generated the sk value.

@tkurki
Copy link
Member

tkurki commented Oct 13, 2021

Oh right, Scott already commented that methodQuality No Gps could be used to filter the values. But it would still be useful to get some real world data.

@LennartG-Sve
Copy link
Author

Sorry for the length of this reply bu I did not manage to add a zipped log file,
Tried a few of the degug options:

canboatjs:canbus: contains the speed value "SOG":655.34
canboatjs:fromPgn: contains the speed value "SOG":655.34
signalk-to-nmea2000: contains the speed value "SOG":655.34
signalk:n2k-signalk; did not give any log info

Added a short snippet from 'canboatjs:canbus'. To me it indicates that the speed info is straight from the GNSS unit itself.

Oct 13 16:06:45 2021-10-13T14:06:45.847Z canboatjs:canbus sending {"pgn":129029,"Date":18913,"Time":50805,"Latitude":59.7436307,"Longitude":18.342027,"GNSS type":"GPS+SBAS/WAAS","Method":"DGNSS fix","Integrity":"No integrity checking","Number of SVs":16,"HDOP":0.64,"Geoidal Separation":-0.01,"Reference Stations":1,"Reference Station Type":"GPS+SBAS/WAAS","Reference Station ID":7}
Oct 13 16:06:45 2021-10-13T14:06:45.852Z canboatjs:canbus 2021-10-13T14:06:45.851Z,2,129029,100,255,43,ff,e1,49,50,3a,48,1e,00,fe,a7,e6,27,85,4a,08,20,cc,f4,85,c3,a3,8b,02,ff,ff,ff,ff,ff,ff,ff,7f,23,fc,10,40,00,ff,7f,ff,ff,ff,ff,01
Oct 13 16:06:45 2021-10-13T14:06:45.946Z canboatjs:canbus sending {"pgn":129026,"COG Reference":0,"COG":6.5534,"SOG":655.34}
Oct 13 16:06:45 2021-10-13T14:06:45.947Z canboatjs:canbus 2021-10-13T14:06:45.947Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff
Oct 13 16:06:45 2021-10-13T14:06:45.948Z canboatjs:canbus sending {"pgn":129025,"Latitude":59.7436307,"Longitude":18.342027}
Oct 13 16:06:45 2021-10-13T14:06:45.949Z canboatjs:canbus 2021-10-13T14:06:45.949Z,2,129025,100,255,8,93,27,9c,23,6e,c5,ee,0a
Oct 13 16:06:46 POST /skServer/debug 200 1.740 ms - -
Oct 13 16:06:52 POST /skServer/debug 200 1.893 ms - -
Oct 13 16:06:52 2021-10-13T14:06:52.055Z canboatjs:canbus sending {"pgn":129026,"COG Reference":0,"COG":6.5534,"SOG":655.34}
Oct 13 16:06:52 2021-10-13T14:06:52.056Z canboatjs:canbus 2021-10-13T14:06:52.055Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff
Oct 13 16:06:52 2021-10-13T14:06:52.060Z canboatjs:canbus sending {"pgn":129025,"Latitude":59.74363041069006,"Longitude":18.34202699120486}
Oct 13 16:06:52 2021-10-13T14:06:52.061Z canboatjs:canbus 2021-10-13T14:06:52.061Z,2,129025,100,255,8,90,27,9c,23,6e,c5,ee,0a
Oct 13 16:06:52 2021-10-13T14:06:52.064Z canboatjs:canbus sending {"pgn":126992,"Date":18913,"Time":50812}
Oct 13 16:06:52 2021-10-13T14:06:52.065Z canboatjs:canbus 2021-10-13T14:06:52.065Z,2,126992,100,255,8,ff,ff,e1,49,c0,4b,49,1e
Oct 13 16:06:52 2021-10-13T14:06:52.142Z canboatjs:canbus sending {"pgn":129026,"COG Reference":0,"COG":6.5534,"SOG":655.34}
Oct 13 16:06:52 2021-10-13T14:06:52.143Z canboatjs:canbus 2021-10-13T14:06:52.142Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff
Oct 13 16:06:52 2021-10-13T14:06:52.144Z canboatjs:canbus sending {"pgn":129025,"Latitude":59.7436307,"Longitude":18.342027}
Oct 13 16:06:52 2021-10-13T14:06:52.145Z canboatjs:canbus 2021-10-13T14:06:52.144Z,2,129025,100,255,8,93,27,9c,23,6e,c5,ee,0a
Oct 13 16:06:52 2021-10-13T14:06:52.243Z canboatjs:canbus sending {"pgn":129026,"COG Reference":0,"COG":6.5534,"SOG":655.34}
Oct 13 16:06:52 2021-10-13T14:06:52.244Z canboatjs:canbus 2021-10-13T14:06:52.244Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff
Oct 13 16:06:52 2021-10-13T14:06:52.246Z canboatjs:canbus sending {"pgn":129025,"Latitude":59.7436307,"Longitude":18.342027}
Oct 13 16:06:52 2021-10-13T14:06:52.248Z canboatjs:canbus 2021-10-13T14:06:52.247Z,2,129025,100,255,8,93,27,9c,23,6e,c5,ee,0a

Any idea on another debug log to try? Could generate one from candump if that is useful.
/LennartG

@tkurki
Copy link
Member

tkurki commented Oct 13, 2021

This is plenty!

The problem seems to be with canboatjs, that is outputting data when canboat's analyzer generates no output:

% echo '2021-10-13T14:06:45.947Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff' | ../canboat/rel/darwin-arm64/analyzer -json
{"version":"2.0.0","units":"std"}
INFO 2021-10-13T18:03:47.642Z [analyzer] Assuming normal format with one line per packet
INFO 2021-10-13T18:03:47.643Z [analyzer] New PGN 129026 for device 100 (heap 11151 bytes)
{"timestamp":"2021-10-13T14:06:45.947Z","prio":2,"src":100,"dst":255,"pgn":129026,"description":"COG & SOG, Rapid Update","fields":{"COG Reference":"True"}}
% echo '2021-10-13T14:06:45.947Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff' | bin/analyzerjs
{"prio":2,"pgn":129026,"dst":255,"src":100,"timestamp":"2021-10-13T14:06:45.947Z","input":["2021-10-13T14:06:45.947Z,2,129026,100,255,8,ff,fc,fe,ff,fe,ff,ff,ff"],"fields":{"COG Reference":"True","COG":6.5534,"SOG":655.34},"description":"COG & SOG, Rapid Update"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants