boatd / boatd-opencpn

Small utility to feed boatd information into opencpn
0 stars 2 forks source link

Investigate how to send waypoints from opencpn #2

Open kragniz opened 7 years ago

kragniz commented 7 years ago

There's a nmea standard for sending waypoints which opencpn appears to implement, figure out how to read them from opencpn.

jack-webb commented 7 years ago

(Alt account, lost my 2FA keys and in the process of retrieving them)

https://github.com/Knio/pynmea2 looks to be the easiest way of getting the NMEA sentences in a nice format. I'm not sure how far we want (or need) to go using NMEA sentencing, so we could just use the WPL code rather than the whole thing.

That leaves the issues of getting the sentences from openCPN and converting from NMEA to latlong. The latter is pretty trivial and I guess you might have an idea of the former?

Let me know what you think and what else needs doing and I'll go away and write something.

kragniz commented 7 years ago

Parsing the data out on the nmea strings will be pretty easy once we've got them, the harder bit appears to be getting them out of opencpn. If you create a route, there's the option to send directly to a gps device:

https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:connections#sending_routes_and_waypoints_to_a_gps

but it seems like that only works with a serial device? Find out if there's any way of sending that information over a network instead

kragniz commented 7 years ago

As an uglier fallback it allows exporting as KML, so we could use that instead