Comments (6)
Thanks for the insight. I do not know what the standard says, I do not have it, nor have I seen it.
Found the information about ALR here: https://www.cruisersforum.com/forums/f134/opencpn-and-external-nmea0183-alarms-81396.html
According to the examples provided there, it seems the alarm description can contain whitespaces.
Interpreting your screenshots, the device delivers
$AIALR,00000.00,026,A,V,AIS: no position sensor in use*5D
but nmeatool prints
$AIALR,00000.00,026,A,V,AIS:nopositionsensorinuse*5D
and claims the checksum is wrong? Yes, this clearly seems wrong.
Thanks for finding the bug!
from marnav.
You're sure you're screenshots are accurate?
I try to reproduce and do:
echo "\$AIALR,00000.00,026,A,V,AIS: no position sensor in use*5D" | ./nmeatool
I get
$AIALR,00000.00,026,A,V,AIS: no position sensor in use*5D
error: checksum error: checksum error (actual:6D, expected:5D)
There seems to be an issue with checksum, but I do not get your result.
Also your nmeatool output seems to strip the whitespaces, which I cannot reproduce.
Various sources (quickly found by your favorite search engine), examples:
- https://alekunderwater.github.io/nmea0183_checksum_calculator.html
- https://code.activestate.com/recipes/576789-nmea-sentence-checksum/
do not seem to treat whitespaces in a special way.
To me, it actually looks like $AIALR,00000.00,026,A,V,AIS: no position sensor in use*5D
is wrong
and should be $AIALR,00000.00,026,A,V,AIS: no position sensor in use*6D"
.
Cannot reproduce, does not look like a bug to me.
from marnav.
I 'm sure. You missed the one zero in the sentence after AIALR. There are six zero chars. The array that is seen in the picture is
AIALR,000000.00,026,A,V,AIS: no position sensor in use
Also, I fixed the bug in my local code by getting
marnav/src/marnav-io/nmea_reader.cpp
Line 68 in 34e0bd2
raw_ <= 31.
from marnav.
You're right, I missed a 0
. Then I try again:
echo "\$AIALR,000000.00,026,A,V,AIS: no position sensor in use*5D" | ./nmeatool
yields the output:
$AIALR,000000.00,026,A,V,AIS: no position sensor in use*5D
Name : Set Alarm State
Talker: Mobile AIS station
Time UTC : 00:00:00
Alarm Number : 26
Alarm Condition : Threshold Exceeded
Alarm Acknowledge : Not Acknowledged
Alarm Text : AIS: no position sensor in use
Still does not match the output you presented with allegedly wrong checksum and spaces removed in the output of nmeatool.
As for the nmea_reader.cpp, this really looks like ignoring spaces and does not work for ALR. Will fix this, thanks!
from marnav.
See b91e74c, nmea_reader.cpp processes now spaces as well.
from marnav.
I did not try to use with nmeatool with string input. Rather I used it with reading serial data. There may be a difference with input style. Anyway issue is closed. Thank you.
from marnav.
Related Issues (20)
- RMB: fromWayPointId is before toWayPointId HOT 2
- RMB does not have a status indicator HOT 5
- return type of sog is utils::optional<units::velocity> not utils::optional<units::knots> in the rmc sentence HOT 2
- Broken link in README HOT 1
- Broken link in README HOT 2
- marnav::utils::mmsi::sar_id() missing HOT 1
- Invalid SNR GSV value. HOT 2
- Install instructions for ctags HOT 6
- GSV: Invalid satellite status for empty fields HOT 3
- rte message formatting look wrong HOT 3
- Error linking Linking CXX executable read_nmea_boostasio HOT 2
- SignalK and sensors support on raspberry Pi ideas HOT 1
- Missing support for NMEA NavTex messages (alerts) HOT 2
- Missing support for DSC NMEA alerts and messages
- Safety Messages NMEA ammendement, MOB, SMV, SM1, SM2, SM3, SM4 NMEA Messages HOT 1
- Problem with negative latitude or longitude to generate AIS message 1 HOT 12
- Build failure with GCC 12 on ARM64 HOT 3
- Problem with fmt version HOT 4
- a new tag (0.41.1 for instance) would be useful
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marnav.