berndcirotzki / raymarine_autopilot_pi Goto Github PK
View Code? Open in Web Editor NEWRaymarine Autopilot Plugin for OpenCPN
License: GNU General Public License v3.0
Raymarine Autopilot Plugin for OpenCPN
License: GNU General Public License v3.0
I am trying to compile against wx32 but the libs are not found.
CMake Error at /usr/local/src/cmake-3.26.3-linux-x86_64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/local/src/cmake-3.26.3-linux-x86_64/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/local/src/cmake-3.26.3-linux-x86_64/share/cmake-3.26/Modules/FindwxWidgets.cmake:977 (find_package_handle_standard_args)
cmake/PluginConfigure.cmake:546 (find_package)
CMakeLists.txt:132 (include)
When I use ci/circleci-build-debian.sh I get
E: Failed to fetch http://repo.netdata.cloud/repos/edge/debian/bullseye/Packages.xz Hash Sum mismatch
Debian 11
-- CMakeLists: Adding target link libraries to autopilot_route_pi
-- CMakeLists_TINYXML: Building TinyXML
CMake Error at libs/nmea0183/CMakeLists.txt:63 (include):
include could not find load file:
SimpleWxConfig
CMake Error at libs/nmea0183/CMakeLists.txt:64 (SimpleWxConfig):
Unknown CMake command "SimpleWxConfig"
Bernd,
Sorry if this sounds very stupid, but I am not an OPENCPN user and I need to find out how to install this to assist someone.
First, is this different from the AutoTrackRaymarine plugin that appears in the plugins? ??
Second.. where is the .tar to allow me to load it into OpenCPN?
The reason I ask is that I work (unpaid) with Luis at VelaNaviga, who sells the very reasonably priced ;-) NMEA3WIFI as a hobby.
This multiplexer accepts $STALK commands and sends them as Seatalk. (I helped with that coding)
I have been trying to help a French user, but it appears he also has (only?) the AutoTrackRaymarine plugin, and this does not seem to offer the $STALK output .. - it just offers an option to talk to an com port for an NGT-1: which is a NMEA2000 interface!
Many thanks!!
Dagnall
You use this in GetAutopilotCompasCourse()
to produce the course received from the autopilot in $STALK 84,:
CompassValue = (int)((parameter[0] & 0x0c) >> 2) * 90 + parameter[1] / 2)
Using Thomas Knauf as the reference I am using this in an attempt at making a Raymarine Autopilot simulator:
CompassValue = (int)((parameter[0] & 0x3) * 90) + (parameter[1] & 0x3F) * 2) + (parameter[1] & 0xC ? (parameter[1] & 0xC == 0xC ? 2 : 1): 0)
The result:
You: 9
Me : 126
Could you explain the logic of your formula? This is new territory for me.
Are you missing + (parameter[1] & 0x3F) * 2)
?
Next I went to cloudsmith and made new repositories raymarine-autopilot-alpha raymarine-autopilot-beta raymarine-autopilot-prod and declared them to be open source (very important and added the opensource license and the opencpn website. I then set the retainage of files settings for each of the 3 repositories. https://cloudsmith.io/~opencpn/repos/?page=2
I then synchronized with your repository, remote and local, and updated the TP FE2 frontend to v1.0.223.1 which bdbcat has just improved for O5.7.1 (and future O5.8). I have pushed that in hope that it would build.
It did not. I have to setup the keys next, for appeveyor, circleci, and cloudsmith. (You need to have accounts for this. I can point you in the right direction for this.) You will also need to do this if you are going to build in the cloud.
I am can also send you an invitation to join the OpenCPN organization on Cloudsmith, once you have an account. That will enable you to manage your plugin on the cloudsmith OpenCPN repository.
More later. Will make a PR to your repository too.
The OpenCPN Plugin Documentation:
Original manual was derived from Bernd's documentation by rgleason and was hosted in the Opencpn Manual wiki.
Mike [rasbats] translated this from dokuwiki to antora/asciidoctor and moved the documentation to github.com.
https://opencpn-manuals.github.io/main/autopilot-rm/0.1/index.html
This page can be edited when logged into your github account, there is a "Edit this page" on the upper right. This is essentially making a new commit, which is then merged.
The other way to do it is to edit locally in your local repository and then make a commit, then it would be PR and merged to my repos and then it would be updated in the github documentation. (I think that is the way it works for us)
Hi Bernd,
I installed your Plugin on android and it seems to be working overall, except for the settings dialog which cannot be used because it's too big and cannot be scrolled to the bottom where the ok button is.
So, I adjusted the settings direct in the conf file.
The main window is also not really scaled right on Android but functional. I put in the maximum Skalefaktor of 21.
But what happens mostly is that the autopilot will go on standby about every 10 minutes or so.
And that's exactly what I was trying to prevent with the Plugin.
It seems that the autopilot is confused by the echoed back stalk sentences from OpenCPN and shuts off?
How can you prevent it from echoing everything to the output without compiling your own version of OpenCPN?
Grüsse,
Hans
Bernd we are improving TP Frontend over the next several days.
We are using a new "streamline" branch v1.0.6.0
https://github.com/rgleason/raymarine_autopilot_pi
The results should be found in cloudsmith here.
https://cloudsmith.io/~opencpn/repos/raymarine-autopilot-beta/packages/?q=1.0.6
There are other changes coming.
I will make a PR to your repos when we are done.
Dear Bernd,
I see your PR here to
https://github.com/rgleason/raymarine_autopilot_pi/pulls
and I just wonder if these changes are in the language crowdin files too? The reason I ask is if they are not, then the next time someone like Hakan or Dave or someone else updates all the language translation files, those changes will not be there.
I think you should review the process with @Hakansv https://github.com/Hakansv as he is well versed in this process. I cannot find the Development documents anymore, which cover Language so I cannot provide a link to that (This is a separate problem).
Once we know that the crowdin files have these improvements, we can probably merge them.
Also, I think you should add more description to the readme explaining that the type of autopilot needs to be set in preferences and providing a connection settings examples for each of the autopilot types.
These additions should also be made in the manual too.
https://opencpn-manuals.github.io/main/autopilot-rm/0.1/index.html
Thanks. Rick
rgleason@fe70419
include_directories(BEFORE ${PROJECT_SOURCE_DIR}/opencpn-libs/wxJSON/include/wx)
Bernd, Thank you! Pulled your changes to my repos, and built locally and tested.
The control panel is much better. There are some adjustments needed.
For reference, I have a display resolution of 3840 x 2400 and the Windows 11 "Display" "Scale" is set to the recommended 250% .
We need a little more ability to zoom the png bigger. Also the separate icons in the control panel seem to be cut off and need more area. Don't know how that is fixed....
See screenshots please.
I will try testing some more.
Raspberry Pi 4
AArch64 Bullseye
cmake 3.18.4
wxWidgets-3.2.2.1
OpenCPN 5.8.4-1+1637c28 (flatpak)
07:26:10 AM: Warning: Unknown image data format.
../src/gtk/bitmap.cpp(595): assert ""image.IsOk()"" failed in InitFromImage(): invalid image
07:26:10 AM: Warning: Unknown image data format.
../src/gtk/bitmap.cpp(595): assert ""image.IsOk()"" failed in InitFromImage(): invalid image
07:26:10 AM: Creating Raymarine Autopilot Plugin
../src/gtk/bitmap.cpp(970): assert ""IsOk()"" failed in GetWidth(): invalid bitmap
../src/gtk/bitmap.cpp(963): assert ""IsOk()"" failed in GetHeight(): invalid bitmap
../src/gtk/bitmap.cpp(1060): assert ""IsOk()"" failed in GetSubBitmap(): invalid bitmap
../src/gtk/bitmap.cpp(970): assert ""IsOk()"" failed in GetWidth(): invalid bitmap
../src/gtk/bitmap.cpp(963): assert ""IsOk()"" failed in GetHeight(): invalid bitmap
../src/gtk/bitmap.cpp(1060): assert ""IsOk()"" failed in GetSubBitmap(): invalid bitmap
07:26:10 AM: Deleting Raymarine Autopilot Plugin
Bernd,
I was just thinking of updating Autopilot-Plugin (RM) to Jon Goughs Frontend2 version 1.0.222 (which is for Opencpn 5.7.1 plugins - we will leave the 5.6.2 plugins available) and I notice you did some work yesterday and made some commits.
Should I make a PR to my repos and use that now to then do the FE2 1.0.222 update?
Will that fit with your workflow?
I set a premade route active, autopilot_raymarine and then started Marco Bergman's ais-simulation.exe
https://github.com/marcobergman/ais_simulation
and finally got things right and recorded a session (I had autopilot_route enabled at first, which messed up things!)
Hi Bernd,
I compiled and enabled your fantastic plugin. I don't get the autopilot status and also don't see any outgoing msgs generated by the plugin..
I connected the PC with an Actisense NGW-1. I get all data from the seatalk ng bus instruments and use them on Opencpn without issue.
Is plugin written exclusively for your hardware? (stng->nmea converter?)
This plugin could reach way more users when it's not just using a single API ($STALK at the moment) but different ones (selected by the user). The Pitufino gateway for example is able to control most of the NMEA2000 pilots out there and the API is public:
https://github.com/ch-fb/pitufino-doc/tree/main/protocols
For receiving pilot status it uses a new NMEA0183 sentence, but for sending control commands, HTTP POST requests need to be sent (in this way security and authentication can be provided. By using just NMEA messages, a pilot could be easily hijacked by another close-by vessel!)
Hi Bernd
I'm in the middle of adding an ST2000+ to a pi openplotter system
and I'm wondering if your tiller also requires an NMEA code for
Apparent Wind Angle and Speed = VWR .
This is a problem on mine as none of my instruments produce this code.
So I have been trying to find a converter for MWV to VWR.
If I get this to work with your plugin it will be another for your list of working devices
thanks, james
Hi Bernd,
I have a Seatalk1 to NMEA0183 multiplexer as recommended from you and I have your Plugin running on OpenCPN 5.0.0.
Next weekend I have in mind to test the autopilot features at my Raymarine S2G together with an ST6002 on my boat.
The multiplexer already seems to be ready as I was able to connect to it by receiveing a response from it by typing "$SWVERSION" in putty telnet.
But now I have some doubts how to do the connection setting in open CPN: How do your plugin know from which COM ports it shall receive the Seatalk1 data and to which COM port it shall send?
The settings possible in the OpenCPN connections window seems to be very limited for that
Thanks for your assistance!
Dirk
Bernd, here is some info about language translation
https://opencpn-manuals.github.io/main/ocpn-dev-manual/0.1/dm-i18n.html
Later: I am going to do what Hakan suggested to help fix the conflicts.
Do you want the plugin to be named
"raymarine_autopilot_pi"
"autopilot_raymarine_pi"
"autopilotRM_pi"?
obviously your choice, but I need to know before I make the 3 cloudsmith repositories.
https://cloudsmith.io/~opencpn/repos/?page=1
The name can be changed reasonably easily now, (I can show you how) but later when it gets into the PIM plugin manager catalog and setup with a workflow landing in cloudsmith it cannnot be changed as easily..
https://cloudsmith.io/~opencpn/repos/?page=1
Two main issues:
Tested it with Marco Bergman's ais_simulator
https://github.com/marcobergman/ais_simulation
Another small suggestion:
3. At some point it would be good to simplify the icon and make it more black and white.
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.