Replies: 4 comments
-
Please explain more about why you need this or what you are wanting to achieve. |
Beta Was this translation helpful? Give feedback.
-
@plfinch replied: I have a land-based AIS monitoring and reporting station and use OpenCPN for viewing the nearby vessels reporting AIS data. On boot or restart of OpenCPN I want to automatically display the NMEA Debug and AIS Targets windows to verify proper operation and then close the windows after 5 minutes. Anytime AIS data is not received for 2 minutes I want the NMEA Debug window to open until resolved. Anytime a new vessel is acquired I want the AIS Targets window to display for 20 seconds. I already have the javascript plugin installed and use it for various housekeeping tasks as well as highlighting new vessels. |
Beta Was this translation helpful? Give feedback.
-
@plfinch... I am reluctant to provide the extensions you have requested as they seem specific to you and I want to avoid plugin bloat. Firstly, the script sets up a time-delayed call to function Secondly, every I do not have a source of AIS data here at home. So I have not been able to test the script - that's for you. For your information, a forthcoming version of OpenCPN is to have a new arrangement for raising alerts and this may be useful to you. But the methods used in this sample script will still work.
|
Beta Was this translation helpful? Give feedback.
-
Thanks for taking the time to reply, Tony.
I have actually developed a quite sophisticated javascript to maintain my own AIS table, track vessels, alert on new vessels detected, alert on NMEA AIS stream loss, alert on vessel beyond range (anything over 20 miles indicates atmospheric or tropospheric ducting, an interesting phenomenon with my current AIS ship distance record at 253 miles), send me a text messages when NMEA stream is down, etc. I keep the OpenCPN screen up on my TV when not watching or streaming anything as it is fun to watch the arrival, departure, and transit of ships and tugs.I do understand your desire to not bloat the API although I do feel the feature I am asking for, simply show or hide any of the UI menu accessible windows, does have general usefulness beyond myself for those customizing OpenCPN. I looked through the C++ API but, at first glance, did not find any menu/submenu navigation functions or I would have just switched all my stuff to a custom C++ plugin. Of course, that also means adding that feature to the Javascript API may be non-trivial.
Cheers,Peter
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This started as issue #119
@plfinch writes:
Create ability to show or hide/close the OpenCPN NMEA Debug and AIS Target List windows from the javascript plugin. There may also be other OpenCPN windows I am not familiar with yet or in the future that this would be useful for so I propose a generic solution rather than new functions for each such window.
OCPNwindowShow(windowName)
OCPNwindowHide(windowName)
Where windowName is the string "NMEA Debug" or "AIS Target List".
I want to be able to programmatically from javascript open and close these windows as needed.
Beta Was this translation helpful? Give feedback.
All reactions