Closed afischerdev closed 7 years ago
Oups, I need to check this out. I thought one was len and the other one length.
I had a quick, looks like message length could be a private date (if ever JS had this concept). Also renaming this.lenght in this.msglen and keep this.length for boat length should fix this. I'm currently traveling and wont have time to patch this before next week. In the mean time feel free to propose a patch I will be more than happy to merge it.
I'll do that and send a pull request
One question before I close this: How do we get that to the npm source? This is 0.1.10 now.
Just update in encoder/package.json version nulber and do a "npm publish". I just did it for you with version 0.1.11
in encoder/lib/GG-AisDecode.js The var this.length is used for message length and ship length. So when I call it from Signal K there is always a value for ship length in all messages.