Hello,
Is it possible to access the Active
Route, or even just 'total distance to run on the active route', via the
Plugin interface?
I have had a good look through the source and it seems that I can only access/manipulate routes in the
plugin that are first instantiated in the plugin and then passed to the main application - but not routes that already exist in the application?
I am trying to implement a simple calculator that shows how much 'slack time' is available on a voyage, based on the active
route, a fixed arrival time, and predicted average
cruise speed scenarios. This is relevant on our ship.
I have already implemented this externally to
OpenCPN, by monitoring
NMEA $..RMB sentences to
monitor progress on the
current leg, but I also need the rest of the route data (to calculate total distance to run), which I communicate to my external application using the "Send to
GPS..." method to send WPT and RTE sentences, but this can only send serially (not via sockets, like for other
NMEA messages) and so I have to send it through a
serial loopback, which is awkward. I was hoping I could improve this by using the plugin mechanism, but I'm not sure that I can access the data that I require in the API?
I see where the total remaining distance to run is calculated in 'concanv.cpp', but it is able to access the g_pRouteMan instance, which I don't think is possible in a plugin?
Ideas and/or alternatives very welcome and appreciated.
Thanks and regards,
Brett