-
Notifications
You must be signed in to change notification settings - Fork 39
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
NaN Error in updating AIS Record into MySQL #2
Comments
I'm not sure what's happening here. Your AIS packet is view as an alarm packet. This should never happen !!! The data.valid=''" you add does not hurt, but it should not solve the issue. The call must be originated from _TcpClient line 167 the question is how your data.cmd may have a value different from TrackerCmd.GetFrom.LOGIN or TrackerCmd.GetFrom.TRACKER as it is the two only value set into AisTcpFeed. Nevertheless one thing is WRONG in lib/TcpClient at line:164. Case value should be "SPEEDON" and not "SPEED_ON". Because of the '' the value is undefined. Under Linux the error does not hurt but we may have a different comportment on Windows. CONCLUSION: Could you remove the "_" and write ""SPEEDON", hopefully this is the issue. If it still fails place a breakpoint in _TcpClient:164 and check for "data" value. If you do not know how to operate "nodejs" source debugger, then place console.log before the call to UpdateAlarmDev. Thank you for your support in debuging my code on Windows. I did not expect to many side effect when moving node.js from Linux to M$. |
Just fixing SPEEDON still gives following error
I noticed that you use |
As you can see in the debug you have "cmd: undefined" and this should be the error. As command is invalid _TcpClient select the wrong backend option, witch lead to impossible error. Replacing TRACKER by TRACK should fix this. |
Yup, it solves the issue. Will close it :) |
Thank you for helping finding this error, that was a real breakdown in the AIS code. |
Encountered NaN error using GGSimulator to pump NmeaAis data to GGServer.
NmeaAis Simulator Config for GGSimulator
MySqlDb-Config for GGServer
GGServer Console Log
It may be caused by following code:
AisTcpFeed-adapter.js line 117
data.cmd= TrackerCmd.GetFrom.TRACKER;
should bedata.cmd=TrackerCmd.GetFrom.TRACK;
and _TcpClient.js line 171 may need to add
data.valid = "";
The text was updated successfully, but these errors were encountered: