transmitterdan / aisconverter Goto Github PK
View Code? Open in Web Editor NEWConvert data in a text file to NMEA AIS data usable by OpenCPN
License: Other
Convert data in a text file to NMEA AIS data usable by OpenCPN
License: Other
Dear @transmitterdan,
My name is Ger from Holland.
I live close to the harbour IJMuiden en found your program on Github.
This script give me more freedom to use data what i want to see.
The artikel is several year ago but hope you will help me out.
Your program work in Python 3 but:
How make an file containing lat, lon, ship_name, cours, heading
How do i read a file with data.
Can you tell me if it is possible to input data live from variable or how to use STdin or pipe?
I get message Exiting cleanly, what is that mean?
Thanks in advance for an answer to help me out
Greetings Ger, Beverwijk, Holland
Dan..
Many thanks for your "AISconverter" function. You've saved me from "reinventing the wheel". For my radar ARPA simulation tests I needed a function to have AIS targets running beside my ship. (We're testing a method to not draw an ARPA target where an AIS is already present.) Now I use my "send_NMEA_COM app to produce a text file for your Python app. Thanks to your code it works great. It's some bite tricks to produce the AVDM message.
If you by a change would be into your AISconverter code again and get an idea to add ships name I would very much appreciate to be noted by for example a @Hakansv tag on the commit. (I've not yet been into Python coding. For me it's full time to learn some C++. )
Again - Thanks
Håkan
Hi, I am using AISconverter and has found the following issues/bugs.
Line 62. I think that the '1':33 shall be changed to '!':33
sixbitencoding = {'@':0,'A':1,'B':2,'C':3,'D':4,'E':5,'F':6,'G':7,'H':8,'I':9,'J':10,'K':11,'L':12,'M':13,'N':14,'O':15,
'P':16,'Q':17,'R':18,'S':19,'T':20,'U':21,'V':22,'W':23,'X':24,'Y':25,'Z':26,'[':27,'\':28,']':29,'^':30,'_':31,
' ':32,'1':33,'"':34,'#':35,'$':36,'%':37,'&':38,''':39,'(':40,')':41,'*':42,'+':43,',':44,'-':45,'.':46,'/':47,
'0':48,'1':49,'2':50,'3':51,'4':52,'5':53,'6':54,'7':55,'8':56,'9':57,':':58,';':59,'<':60,'=':61,'>':62,'?':63}
Line 246
aisnmea = '!' + aisnmea + '*' + '{:02x}'.format(checksum)
This checksum is printed in lower case. According to AIS standard the checksum shall be upp case. Some AIS decoders give error with lower case.
I changed to '{:02X}', and that fixed the issue.
/Petter
This is great stuff and just what I was looking for! Is there a readme available for the needed OpenCPN settings?
Hi, well am trying to build my own ais message encoder and decoder using Java can you guide me on how to convert text to nmea format.
Though i have gone through https://gpsd.gitlab.io/gpsd/AIVDM.html
I'm using the same text format as the sample file but the sample file shows a track on OpenCPN but my text files does not. I realy see no difference, what do I miss?? In the AIS list it shows the name of the track but does not display a track symbol on the chart.
I'm now stuck with this for days, please help..
I have created a textfile with multiple ships. But OpenCPN only shows the first one. I think I created the proper text file. Context: I'm getting frequent position updates from target from a rest service and want to show them on OpenCPM as AIS target. therefore I'm creating a textfile every 3 sec and input this in the AIS convertor. In the end I want to input is directly from the rest server.
As attachement my file I created.
sample1.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.