Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 28-05-2020, 13:34   #31
Registered User

Join Date: Sep 2019
Posts: 4
Re: AIS Radar Plugin missing information

Hi all,

I have a brand new Pi 4, Daisy Hat AIS receiver and a fresh install of OpenPlotter.

When trying to install via opencpn-plugin-aisradar I get the following error:

pi@openplotter:~ $ sudo apt-get install opencpn-plugin-aisradar
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package opencpn-plugin-aisradar
pi@openplotter:~ $

Does anyone have any ideas on how I can get this to work? It works fine on Windows but not on the Pi which is the important one!

Many thanks.
MerryFisher is offline   Reply With Quote
Old 28-05-2020, 14:53   #32
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: AIS Radar Plugin missing information

Quote:
Originally Posted by MerryFisher View Post
Hi all,

I have a brand new Pi 4, Daisy Hat AIS receiver and a fresh install of OpenPlotter.

When trying to install via opencpn-plugin-aisradar I get the following error:

pi@openplotter:~ $ sudo apt-get install opencpn-plugin-aisradar
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package opencpn-plugin-aisradar
pi@openplotter:~ $

Does anyone have any ideas on how I can get this to work? It works fine on Windows but not on the Pi which is the important one!

Many thanks.

You probably have to build it from source.

Why do you want the AIS radar plugin? The same functionality is built into OpenCPN where it shows all AIS targets.
transmitterdan is offline   Reply With Quote
Old 29-05-2020, 01:06   #33
Registered User

Join Date: Sep 2019
Posts: 4
Re: AIS Radar Plugin missing information

Thanks transmitterdan.

I know OpenCPN has the system built in but it was more curiosity. I just wanted to see what it would look like and since it is on the site for people to "use" surely it should do that?
MerryFisher is offline   Reply With Quote
Old 29-05-2020, 07:04   #34
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: AIS Radar Plugin missing information

I will see if I can build the plugin for Rpi 4 this weekend. The RPi 4 came out late last year and the present OpenCPN version was long before the RPi 4 existed. It cannot use the same libraries as the RPi 3. The RPi is a bit of an experimenter's machine and not everything has been updated to the RPi 4 requirements. It takes time and effort. We are always looking for more help. Coding/support for Linux (many flavors), Windows, RPi 3 and RPi 4 are all created by volunteers.
transmitterdan is offline   Reply With Quote
Old 29-05-2020, 23:29   #35
Registered User

Join Date: Sep 2019
Posts: 4
Re: AIS Radar Plugin missing information

I totally understand the huge effort required to maintain something like this, it must be a huge feat to get something working again.

I would be very grateful for your efforts if you were able to get things working on the Pi 4.

Come the near future I could be in a position to make a small donation towards the project.
MerryFisher is offline   Reply With Quote
Old 31-05-2020, 21:22   #36
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: AIS Radar Plugin missing information

Quote:
Originally Posted by MerryFisher View Post
I totally understand the huge effort required to maintain something like this, it must be a huge feat to get something working again.

I would be very grateful for your efforts if you were able to get things working on the Pi 4.

Come the near future I could be in a position to make a small donation towards the project.
Try downloading this file to your RPi.

https://dl.cloudsmith.io/public/dan-....1-1_armhf.deb

Then at a command line in the folder where the download file is stored type:

sudo dpkg -i aisradar_pi_1.1-1_armhf.deb

This is a manual install so it does not need any PPA setup.
transmitterdan is offline   Reply With Quote
Old 31-05-2020, 23:59   #37
Registered User

Join Date: Sep 2019
Posts: 4
Re: AIS Radar Plugin missing information

Smooth install and opened without a hitch.

I am just waiting on a new VHF antenna in order to test the data to be piped into it.

I will PM you.
MerryFisher is offline   Reply With Quote
Old 21-08-2020, 06:12   #38
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

Verezano's AISradar has been configured for Plugin Manager here in github,

the windows version builds and deploys to Cloudsmith and the tarball version can be downloaded and tested (working) with Options>Plugins using "Import Plugin"

However all linux, macos, and mingw builds fail. (Click on the red X and find the errors screens for each build.) Here are the mingw build errors.

Quote:
[ 93%] Building CXX object CMakeFiles/aisradar_pi.dir/src/Canvas.cpp.obj /usr/bin/i686-w64-mingw32-c++ -DPI_JSON_SCHEMA_VALIDATOR -DPLUGIN_USE_SVG -DTIXML_USE_STL -DUSE_S57 -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXMSW__ -Daisradar_pi_EXPORTS @CMakeFiles/aisradar_pi.dir/includes_CXX.rsp -mthreads -O2 -DNDEBUG -Wall -Wno-unused -Wno-cpp -fexceptions -g -fno-strict-aliasing -DUNICODE -std=gnu++11 -o CMakeFiles/aisradar_pi.dir/src/Canvas.cpp.obj -c /root/project/src/Canvas.cpp In file included from /root/project/src/Target.h:34,
from /root/project/src/aisview.h:34,
from /root/project/src/Canvas.h:33,
from /root/project/src/Canvas.cpp:35:
/root/project/api-16/ocpn_plugin.h:1102:18: error: 'wxDialog' does not name a type; did you mean 'wxYield'?
extern DECL_EXP wxDialog *GetActiveOptionsDialog(); ^~~~~~~~ wxYield

[ 96%] Building CXX object CMakeFiles/aisradar_pi.dir/src/Target.cpp.obj
Which is typical. I need some help fixing this and would like to learn how to do it.
https://github.com/rgleason/AISradar_pi/tree/frontend2
rgleason is online now   Reply With Quote
Old 21-08-2020, 09:21   #39
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

I have tried fixing a number of things including disabling of json validator and fixing paths, but I am still getting the same error, I need someone who understands how to fix this problem.. all linux, macos and mingw are failing, but windows builds and works fine!


Quote:
[ 93%] Building CXX object CMakeFiles/aisradar_pi.dir/src/Canvas.cpp.obj /usr/bin/i686-w64-mingw32-c++ -DPLUGIN_USE_SVG -DTIXML_USE_STL -DUSE_S57 -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXMSW__ -Daisradar_pi_EXPORTS @CMakeFiles/aisradar_pi.dir/includes_CXX.rsp -mthreads -O2 -DNDEBUG -Wall -Wno-unused -Wno-cpp -fexceptions -g -fno-strict-aliasing -DUNICODE -std=gnu++11 -o CMakeFiles/aisradar_pi.dir/src/Canvas.cpp.obj -c /root/project/src/Canvas.cpp. In file included
- from /root/project/src/Target.h:33,
- from /root/project/src/aisview.h:34,
- from /root/project/src/Canvas.h:33,
- from /root/project/src/Canvas.cpp:35:
/root/project/api-16/ocpn_plugin.h:1102:18: error: 'wxDialog' does not name a type; did you mean 'wxYield'? extern DECL_EXP wxDialog *GetActiveOptionsDialog();
------------^~~~~~~~ wxYield
rgleason is online now   Reply With Quote
Old 21-08-2020, 11:04   #40
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

Windows works, others don't
Attached Thumbnails
Click image for larger version

Name:	aisradar.png
Views:	75
Size:	31.9 KB
ID:	221708  
rgleason is online now   Reply With Quote
Old 21-08-2020, 19:17   #41
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,514
Re: AIS Radar Plugin missing information

Rick...
Surprising that it compiles on Windows...


You need this at the top of Canvas.cpp, and probably all other .cpp files:


Code:
#include "wx/wxprec.h"

#ifndef  WX_PRECOMP
  #include "wx/wx.h"
#endif //precompiled headers

Put this code before line 35.




Dave
bdbcat is offline   Reply With Quote
Old 23-08-2020, 04:35   #42
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

Thanks that helped. Now Windows and MacOS build, but linux is proving picky. Target.cpp:313:46:error 'wxDegtoRad not declared in this scope double angle=wxDegToRad(Brg-Mycog) etc.

https://github.com/rgleason/AISradar...mits/frontend2

Have made sure to put the header you gave on each .cpp file.

Quote:
/home/circleci/project/src/Target.cpp:192:12: warning: enumeration value ‘ATON_REAL_ONPOSITION’ not handled in switch [-Wswitch] /home/circleci/project/src/Target.cpp:192:12: warning: enumeration value ‘ATON_REAL_OFFPOSITION’ not handled in switch [-Wswitch] /home/circleci/project/src/Target.cpp: In member function ‘bool Target::Render(wxDC&)’: /home/circleci/project/src/Target.cpp:313:46: error: ‘wxDegToRad’ was not declared in this scope double angle=wxDegToRad(Brg-Mycog); ^ /home/circleci/project/src/Target.cpp:319:51: error: ‘wxDegToRad’ was not declared in this scope double ScrCog = wxDegToRad(targetHdt-Mycog); ^

Got some files deploying https://cloudsmith.io/~opencpn/repos...beta/packages/
rgleason is online now   Reply With Quote
Old 23-08-2020, 04:45   #43
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

This is the code from Target.cpp down at line 313



Quote:
bool Target::Render( wxDC& dc ) {
bool Result=false;
// Check if the target is less than sqrt 2 times the range away
// This way targets in the corners of the square are still displayed
// Anything furthur away won't display
if (Dist < Range * 1.4) {
// Default to center of view
int x = CanvasCenter.x;
int y = CanvasCenter.y;
if (Dist>(double)0.) {
// Calculate the drawing position using trigonometry
double delta= Dist/Range*(double)Radius;
double angle=wxDegToRad(Brg-Mycog); <----LINE 313 -Error
x += sin(angle) * delta;
y -= cos(angle) * delta;
}
double targetHdt = Cog;
// Calculate the targets direction on the screen
double ScrCog = wxDegToRad(targetHdt-Mycog); <---LINE 319 -Error
DrawShape(dc, x, y, ScrCog);
}
return Result;
}
rgleason is online now   Reply With Quote
Old 23-08-2020, 04:53   #44
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

He has a whole bunch of icons at the beginning of the file. Maybe the includes need to be reiterated below the icons. I think the icons should go in a separate file 'icons.cpp' or something, but I haven't done this before.
https://github.com/rgleason/AISradar...src/Target.cpp


I have copied the include headers down below the icons and will try that.


https://github.com/rgleason/AISradar_pi/tree/frontend2



That is not the problem I guess. There is a suggestion in the error message....
Quote:
^~~~~~~~~~ /home/circleci/project/src/Target.cpp:330:26: note: suggested alternative: ‘wxDecToHex’ double angle=wxDegToRad(Brg-Mycog);
So I will try that.
rgleason is online now   Reply With Quote
Old 23-08-2020, 05:24   #45
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,779
Images: 2
Re: AIS Radar Plugin missing information

I've changed to 'wxDegToRad' in the two locations in Target.cpp Line 313 & 319 basically,

Now I am getting other errors from that change.

Quote:
/home/circleci/project/src/Target.cpp:209:12: warning: enumeration value ‘ATON_REAL_OFFPOSITION’ not handled in switch [-Wswitch] /home/circleci/project/src/Target.cpp: In member function ‘bool Target::Render(wxDC&)’: /home/circleci/project/src/Target.cpp:331:36: error: cannot convert ‘wxString’ to ‘double’ in initialization 331 | double angle=wxDecToHex(Brg-Mycog) | ~~~~~~~~~~^~~~~~~~~~~ | | | wxString /home/circleci/project/src/Target.cpp:338:35: error: cannot convert ‘wxString’ to ‘double’ in initialization 338 | double ScrCog = wxDecToHex(targetHdt-Mycog); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~ | | | wxString
https://github.com/rgleason/AISradar_pi/tree/frontend2


And nothing builds, not even windows. So I think that is a dead end and I am stuck.
I am going to change those two changes back.


So I haven't a clue how to get the two lines

  • double angle=wxDegToRad(Brg-Mycog); <----LINE 313 -Error
  • double ScrCog = wxDegToRad(targetHdt-Mycog); <---LINE 319 -Error
back "in scope"! ... "was not declared in this scope"


I understand now that the images are for the aisradar view, not the toolbar.
rgleason is online now   Reply With Quote
Reply

Tags
ais, plug, radar


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin development... How to receive chart objects in my plugin? dmartinez OpenCPN 6 04-08-2017 00:56
Plugin AIS Radar : EBL ? Gilletarom OpenCPN 8 28-02-2016 18:31
AIS RADAR and findit plugin icon can not display in OpenCPN Version 3.1.814 xiurong OpenCPN 1 16-08-2012 11:05
AIS Radar plugin wizard-merlin OpenCPN 1 04-08-2012 07:59
Can You Get Radar & AIS Overlay on Laptop ? AIS Transceiver Recommendations ? lunasea.ds Marine Electronics 22 27-12-2010 13:06

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 04:09.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.