Closed rgleason closed 8 years ago
What version should we be compiling for here? I was doing v4.2.0. I think opencpn.plugin.h is missing external declarations maybe
Route_pi.h shows API 1.8
Hi Rick,
It is excellent timing that you are checking out this plugin. I have just gone trough significant updates (ie direct export to OpenCPN) and also all bugfixed for those reported on flyspray and github. I am only planning to add a right click menu item (copy latlon to clipboard). After some testing (especially cross platform) this plugin is ready for release.
Is the plugin suitable for stand alone build? If not, how can we make it suitable, so it falls in line with all modern plugins.
I understand some of the other plugins make use of an automated build system, I would appreciate some help here.
I am using OpenCPN pi pi113
I am compiling against 4.2.1. build 2016-03-09. No problems building and running on Ubuntu 64. We may need to do some cross platform debugging.
I have just added another pull, it may fix your build issues.
Much appreciated
Hi Rick,
Thank you for checking out the plugin. I am using OCPN 4.2.1, and it builds and runs fine on Ubuntu. We may have to do some crossplatform debugging.... See my comment in on the github pages.
I have made one patch, but I would not expect this one to fix all issues.
Much appreciated,
Walbert
On Fri, May 27, 2016 at 5:53 PM, Rick Gleason notifications@github.com wrote:
Walter, I git cloned fresh and tried to build... am I missing some link file?
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\ALL_BUILD.vcxproj" (default target) (1) -
"C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj" (default target) (3) -> (Link target) -> route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall PlugInC hartBase::chartpix_to_latlong(double,double,double ,double )" (?chartpix_to_latlong@PlugInChartBa se@@UAEXNNPAN0@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Pl ugInChartBase::chartpix_to_latlong(double,double,double ,double )" (?chartpix_to_latlong@PlugInCh artBase@@UAEXNNPAN0@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall opencpn_plug in_112::~opencpn_plugin_112(void)" (??1opencpn_plugin_112@@UAE https://github.com/UAE@XZ) referenced in function "public: virtual void
- __thiscall opencpn_plugin_112::`vector deleting destructor'(unsigned int)" (??_Eopencpn_plugin_112@@UAEPAXI@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall opencpn _plugin_112::~opencpn_plugin_112(void)" (??1opencpn_plugin_112@@UAE https://github.com/UAE@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj] route_pi.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall opencpn _plugin_112::MouseEventHook(class wxMouseEvent &)" (?MouseEventHook@opencpn_plugin_112@@UAE_NAAVwxM ouseEvent@@@Z https://github.com/Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall op encpn_plugin_112::MouseEventHook(class wxMouseEvent &)"(?MouseEventHook@opencpn_plugin_112@@UAE_NAAVwxMouseEvent@@@Z https://github.com/Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall opencpn _plugin_112::SendVectorChartObjectInfo(class wxString &,class wxString &,class wxString&,double,do uble,double,int)" (?SendVectorChartObjectInfo@opencpn_plugin_112 @@UAEXAAVwxString@@00NNNH@Z) [C:\Us ers\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall op encpn_plugin_112::SendVectorChartObjectInfo(class wxString &,class wxString &,class wxString &,double,double,double,int)" (?SendVectorChartObjectInfo@opencpn_plugin_112@@UAEXAAVwxString@@00NNNH@Z) [ C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall opencpn_plug in_113::~opencpn_plugin_113(void)" (??1opencpn_plugin_113@@UAE https://github.com/UAE@XZ) referenced in function "public:virtual void
- __thiscall opencpn_plugin_113::`vector deleting destructor'(unsigned int)" (??_Eopencpn_plugin_113@@UAEPAXI@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall opencpn _plugin_113::~opencpn_plugin_113(void)" (??1opencpn_plugin_113@@UAE https://github.com/UAE@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall opencpn _plugin_113::KeyboardEventHook(class wxKeyEvent &)"(?KeyboardEventHook@opencpn_plugin_113@@UAE_NAA VwxKeyEvent@@@Z https://github.com/Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall op encpn_plugin_113::KeyboardEventHook(class wxKeyEvent &)"(?KeyboardEventHook@opencpn_plugin_113@@UAE_NAAVwxKeyEvent@@@Z https://github.com/Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall opencpn
_plugin_113::OnToolbarToolDownCallback(int)"(?OnToolbarToolDownCallback@opencpn_plugin_113 @@UAEXH@ Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall op
encpn_plugin_113::OnToolbarToolDownCallback(int)"(?OnToolbarToolDownCallback@opencpn_plugin_113 @@UAEXH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall opencpn
_plugin_113::OnToolbarToolUpCallback(int)"(?OnToolbarToolUpCallback@opencpn_plugin_113 @@UAEXH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall op
encpn_plugin_113::OnToolbarToolUpCallback(int)"(?OnToolbarToolUpCallback@opencpn_plugin_113 @@UAEXH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: __thiscall OCPN_downloadEvent:: OCPN_downloadEvent(int,int)" (??0OCPN_downloadEvent@@QAE https://github.com/QAE@HH@Z) referenced in function "public: void __thiscall OCPN_downloadEvent::`default constructor closure'(void)" (??_FOCPN_downloadEvent@@QAEXXZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: __thiscall OCPN_downloadEv ent::OCPN_downloadEvent(int,int)" (??0OCPN_downloadEvent@@QAE https://github.com/QAE@HH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall OCPN_downloa dEvent::~OCPN_downloadEvent(void)" (??1OCPN_downloadEvent@@UAE https://github.com/UAE@XZ) referenced in function "public:virtual void
- __thiscall OCPN_downloadEvent::`vector deleting destructor'(unsigned int)" (??_EOCPN_downloadEvent@@UAEPAXI@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall OCPN_do wnloadEvent::~OCPN_downloadEvent(void)" (??1OCPN_downloadEvent@@UAE https://github.com/UAE@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual class wxEvent * __thisc all OCPN_downloadEvent::Clone(void)const "(?Clone@OCPN_downloadEvent @@UBEPAVwxEvent@@XZ https://github.com/XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual class wxEvent * __ thiscall OCPN_downloadEvent::Clone(void)const "(?Clone@OCPN_downloadEvent @@UBEPAVwxEvent@@XZ https://github.com/XZ) [C:\ Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\Release\route_pi.dll : fatal error LNK11 20: 11 unresolved externals [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxp roj]
0 Warning(s) 23 Error(s)
Time Elapsed 00:00:22.42
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SaltyPaws/route_pi/issues/10, or mute the thread https://github.com/notifications/unsubscribe/AA9lfw9s6ImRfGfFkp41LESCAT0oMLUOks5qF6AhgaJpZM4Io-CA .
Wally,
I git fetched and built. It appears we are getting the same 23 errors (ah ah, this is in Ocpn 4.2.0!) that is using opencpn.lib for v4.2.0 - may be the problem...
Used opencpn-4.2.1.lib dated 4/11 about 125kb and it built and packed.
Installed in v4.2.1 and am using it.
Trouble doing great circle...with format 50 N 06 W see 1st pic,
works with 50 and -6 see 2nd pic
Wally, The fact that it did not land on the waypoint is because I simplified the lat/long. I'd really like it if we could just copy lat/long and paste lat/long, if possible.
Thanks. Rick
Walter, Just to make the problems clearer.
Hi Rick, I am glad you managed to make it work. Thanks for your test. @1 For Lat/Long Entering N, E, W, S does not work. (This is not a bug, it is a feature ;-) I will make a patch to fix it. @2 works as planned @3 One of the problems here is your finding 1. I can paste into start and finish @4&5 tested and works in linux
The copy paste is only for way point pairs. If you want to paste only e.g. lat, you can aste directly into the input box. I am planning to add a right mouse button click "Copy location to clipboard" that would enable to start/finish a route anywhere on the map. Could you please compile and check everything works?
With the latest commit coordinate input is now much more flexible:
Decimal: (+/-)38.889722(N/S). Examples: -38.889722 38.889722N° 38 88.9722 38 88 9722S
Degree Minute Seconds. Needs to contain ' or " for base 60: Examples: 38° 53' 23" N/S 38° 53' 23" N 38 53' 23" S 38 53 23"N For fractions use °'" input screen.
Walbert, Somehow I had it set on Options > Display > Units Degrees Decimal minutes. I have changed it to Decimal Degrees now, but still can't Drop a Mark, then right click on it, pick properties and then copy lat/long. when I paste it goes into one field and does not get distributed.
Also, Maybe we need a check that it is in Decimal Degrees with a message "not decimal degrees" when that is tried?
Idea, could you have 2 buttons in the menu "Pick beginning waypoint" "Pick ending waypoint" and the plugin just brings those coordinates in? That would be much easier.
With setting set to decimal degrees, I can copy individual lat and long from dropped mark properties menu to each cell in the route_pii. This is six decimal places and it this method does work and create a great route! So just using Copy now Copy Lat/Long and doing each cell individuallly worrks. Great Circle okk Rhumb line ok with decimal degrees. Just can't copy lat/long
With setting units to degrees, minutes, seconds I find that I cannot get the correct decimal degree signs when using N,W and N,W the way I expect. I have to set thinggs on S,E and S,E After converting to decimal degrees if I correct the signs both rhumb and greatcircle work.
With setting units to degrees, minutes, seconds I find that dropping a mark and using properies of the mark to copy lat/lon into deg, min, sec fields does not work it all lands in the field selected. I can't use copy because you copy too much, so it is just easier to enter each field.
Under Decimal Degree tab how do you get Coordinate Pairs in the clipboard? I see the paste button for it.
I tried copy lat/long on start waypoint and copy lat/long on end and tried paste and it said no comma found. Then I tried copy lat/long and pasting into a text editor and nothing happened.
Maybe we're not set up for this type of copying of waypoints. I thought maybe I could just drag and drop the waypoint into the plugiin. That does not work either. So I'm trying to make this easier for the user.
Here is a thought. Do you know how Weather_routing creates waypoints for itself? Or Squiddio? What these plugins do is when installed with the plugin running, there is an item added to the right click menu, in weather_routing it is something like "Make a weather routing waypoint" and then it prompts for a name and thats it. You can then later add the waypoints as start and end points for various routings.
In Squiddio its a little different where you select to show squiddio waypoints or not, and you can pick "Add a destination"
How about having two of those items in the rightclick menu: Start great circle End great circle Just pick up the location the user selects and put it in the decimal degree slots. Then they can execute.
Hi Rick,
At the moment you can only copy and paste properly when decimal degree option is selected in OCPN. The other formats are not handled properly and I will fix these... I will add a message how the conversion was done. Thanks for pointing out the problem.
For copy paste, you could try pasting the following strings:
38.8897°, -77.0089° 38° 53′ 23″ N, 77° 00′ 32″ W
yes, the right click item is on my todo list. I have already made a version that does this, so now it is just a matter of implementation. What option do you think is better:
1) Rightclick option "Make Route waypoint", and you need to press paste on start or finish button 2) Rightclick option "Start Great Circle" and "End Great Circle" and coordinates are handled from there.
With the latest commit, right click starting and finishing of route has now been implemented :smile: Please let me know what you think. I will continue to work on the issues in the readme untill ready for release
That's great. Sounds like its coming together. Should it git yet, or wait? Sounds like you have a commit. So I will git fetch tomorrow morning. Nite. Rick
On 5/31/2016 9:45 PM, SaltyPaws wrote:
With the latest commit, right click starting and finishing of route has now been implemented 😄 Please let me know what you think. I will continue to work on the issues in the readme untill ready for release
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SaltyPaws/route_pi/issues/10#issuecomment-222870791, or mute the thread https://github.com/notifications/unsubscribe/ACQSN1zyfMuwH9ONP-sAUKvR0DSLb4R8ks5qHORBgaJpZM4Io-CA.
Wally, The "start route" and "end route" right-click works!! Very very easy. Thank you!
When Dropping two marks and using right-click properties a. Copy to decimal degrees works. b. Copy lat/long to decimal degrees not working. c. Copy to deg min sec doesnt work. d. Copy lat/long to deg min secs doesnt work.
Perhaps we should just have a note on the each of the tabs dec.degs or deg min secs, which copy functions don't work.
Maybe the deg min sec should become one window so copy could work?
Or, perhaps eliminate the tab for deg min sects to eliminate c & d problem, but that is also a great converter that people can use, so I wouldn't do that.... hum...
Oh here are two pics. One problem still is the N S W E conversion to signs seems to be reversed.
Hi Rick, With the latest commit direct lat/lon past works for all OpenCPN formats! Please check if it works for you.
Walbert,
If I pick "Copy lat/long" this is what is pasted 40 50 30.120 N 017 07 36.839 W There is no comma, just spaces. So when I try this and pick "Paste" in the Great Route plugin I get a message "Clipboard does not contain a comma so no coordinate pair could be identified"
Could "Paste" be made to be "Paste L/L"?
or better yet if you could make "Paste" so it accepts both "Copy lat/long" and "Copy"?
That would be a great improvement.
Then as far as I am concerned, the Dec, Deg, Sec Tab is less important, but perhaps should be fixed. Right now with this version when I enter: 40 50 30.120 N 017 07 36.839 W and hit "Convert to degree" I get -40.8417 17.1269 This is good, because it is accepting the seconds which have 3 decimals and is pretty accurate. Also it is a little strange... because it seems to be working for you in linux ok. This sign stuff needs to be fixed for windows.
Using the Dec, Deg, Sec Tab I see your message "x or x.y or x y/z"
Which I take to mean that each field can accept different formats of coordinates.
So I tried "Copy" and then hover on a field in the Plugin menu, right-click and pick "Paste" from the Windows standard selection. In other words, when I have used "Copy" to copy a Waypoint Property" coord (lat or long) and then right click in one of the fields and pick "paste" (windows menu selection).
For example, the coordinate pair
40 50 30.120 N
017 07 36.839 W
when just "Copy" then Right-click select "Paste" (windows menu) individual coord into the first, second or third field, results in "Convert to decimal" results in
-0
-0
Also when I paste the "0" seems to hang around either at the front or back, when I highlight the zero and pick paste it does not seem to make a difference, perhaps since we are basically pasting dec.deg or dec min sec it does not matter if the zero stays.
I started looking at the buttons you have available and wondered if they could be
For Deg, Min, Sec Tab "Convert to Deg" "Paste Start" "Paste End" perhaps horizontally
For Dec Deg Tab "Convert to D,M,S" "Paste Start" "Paste End" perhaps horizontally
Just a suggestion, perhaps there are better ways to do the same thing. I hope this will help get a few of the little things worked out, but I think this plugin has come a long way. It is feeling more integrated with Opencpn to me.
I ask the next question without having thought about it much but can the plugin be used in reverse? Can it identify a great circle route and bring in the beginning and ending points so they can be modified? Perhaps a right click on the route when the cursor is hovered over a route would check that route to see if it is great circle, if not, there's a message, if it is a great circle then the beginning and end is brought in. Maybe this requires a separate button "Check and Load Great Circle start & end points" (something shorter) then you identify the great circle with the cursor... just an idea to make the tool even more useful.
By the way, I Used the great circle name, and named the start and end points and exported a great circle to gpx and then brought it back into OpenCPN and it worked fine.
Hi Rick,
I just finished the latest edits to what I consider a release candidate. Could you please check that it complies on windows and that the issues you have noted have been addressed? Thanks you so much!
Walter you've been great to work for. Will do it tomorrow morning. Thanks.
Hi Rick, Thanks for the compliment. Do you happen to have opencpn.h API 110 (1.10) somewhere?
As per the plugin guidelines, this is the lowest compatible plugin version. With this API, the plugin can be compiled against pi110 (1.10) = OpenCPN 3.3.x or OpenCPN 3.4. The OpenCPN version does not matter too much as the plugin can now be compiled as stand alone.
Walter, Am I building the right Branch? I have been building "Master". Maybe this is why my tests aren't working very well? Might be having the same problem with Weather_routing
Answered my own question -Nope, those are older snapshots.
I've been testing the plugin yesterday and I did notice some improvements, however there seems to be some disconnect in what Linux does and Windows does, and I am at a loss how to figure out exactly what the problems are. The windows version seems to be missing some of what you have written, I think. I am going to try to build it again and test, making very sure that I have done this corrrectly.
Hi Rick, Master is the right branch. I did make some changes to the cmake file as I used some of the OpenCPN functions, so I could retire local code. I will look at these changes, and send another commit to see if this helps....
Also, when building a new version, sometimes it helps to delete everything in your build directory to ensure everything is freshly compiled.
Are you building the plugin in the OpenCPN tree, or as stand alone? Try building it as stand alone, straight from the route_pi folder.
If you have problems with the plugin not loading, check the OpenCPN logfile especially for code like this: 08:15:22 AKDT: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libroute_pi.so 08:15:22 AKDT: Error: /usr/local/lib/opencpn/libroute_pi.so: undefined symbol: _ZN8routepi23DistanceBearingMercatorEddddPdS0
Please send me some screenshots of the plugin so we can compare notes.
I'm Building standalone & use MSVC++ command prompt. "cmake -T v120_xp .." "cmake --build . --config release" then "cpack" . The plugin has always loaded no problem, since this "issue" but I will look at logfile too.
It's more like I am having trouble with the feature improvements: Paste (lat/long) has error that there is no comma between. This is after a Right-click on a waypoint, pick Waypoint Properties, then right-click on Lat or Long and pick "Copy lat/long".
If I copy from the Waypoint Properties, I can then paste into the field ok. So I can do lat first then the same for long, without using "Paste".
I will report more after I try this again.
Oh, what is the lowest Version of OpenCPN that I should be compiling for? Plugin API =1.1? Keep in mind that we changed to wxwidgets 3.0.2 (I believe after v4.0)
So we could produce two plugins, one for from Opencpn 3.3 or so to v4.0 and another from v4.1 on. Do you agree?
Plugin (pi) API Versions and OpenCPN Version Compatibility http://opencpn.org/ocpn/node/233 pi18 (1.8) = OpenCPN 3.0 [Use oldest supported Opencpn 3.2.2] pi19 (1.9) = OpenCPN 3.2 [Use oldest supported Opencpn 3.2.2] pi19 (1.9) = OpenCPN 3.2.2 [Oldest supported version] pi110 (1.10) = OpenCPN 3.3.x (under design and development now). pi110 (1.10) = OpenCPN 3.4 pi111 (1.11) = OpenCPN 3.4 pi112 (1.12) = OpenCPN 3.4 ??? = OpenCPN 4.0 <---wxWidgets 2.8.1 used pi113 (1.13) = OpenCPN 4.1 <--- wxWidgets 3.0.2 used pi113 (1.13) = OpenCPN 4.2
Hi Rick,
please paste the exact same string that you are having issues with here, so l can check what is going on...
The lowest version of OCPN it can compile against is 3.4 as it currently uses the 111 ocpn_plugin.h file. However, the OCPN api used is 110. I could not find ocpn_plugin.h version 110. If we managed to find a copy of this file, and switch out the 111 ocpn_plugin.h with version 110, the lowest version it could compile against is 3.3.x.
With the stand alone plugin, there is no need to compile against a specific version of OpenCPN, is there? I guess this was one of the reasons to change to the new build system. Unless I am understanding the build system wrong.
With the stand alone plugin, there is no need to compile against a specific version of OpenCPN, is there? Actually we need to include a version of opencpn.lib which has objects for a given version. The significant thing is the switch of wxwidgets to 3.0.2. at v4.1 I believe. We can have a plugin for v4.1 forward and one for v3.3 or 3.4 forward to but not including v4.1.
Thanks for the info.
Copy from waypoint properties and paste into each cell typically, but only the first Dec Degrees works.
Decimal Degrees 39.420873 -16.868117
Degree decimal minutes 16 46.3625 N 040 46.4117 W
Degree, minutes, seconds 16 46 21.748 N 040 46 24.700 W
Decimal Degrees works with "copy" and Windows paste, the other two do not.
Copy lat/long - Does not work, has an error each time. Hit the Paste button in GC Route
Decimal Degrees 16.772708 -40.773528
Degree decimal minutes 16 46.3625 N 040 46.4117 W
Degree, minutes, seconds 16 46 21.748 N 040 46 24.700 W
None of these work, a comma seems to be expected when we push "Paste"
Here are some screen shots of the first process.
The other problem is when 16 46.3625 N is pasted it is then converted to a - (negative) and when 040 46.4117 W is pasted it is converted to a positive.
This also happens with the Deg Min Sec TAB when entries are keyed in with N W S E The signs get converted incorrectly.
Would like to see a Degree Decimal Minute TAB if possible.
I just noted the Limited Route Tab. Will have to try that.
Thanks.
Hi Dave,
something funny is going on, as you should see two more tabs: the degree decimal minute and about....
Please make sure you delete all files from the build directory before you build it again.
Decimal Degrees 39.420873 -16.868117
Degree decimal minutes 16 46.3625 N 040 46.4117 W
Degree, minutes, seconds 16 46 21.748 N 040 46 24.700 W
All of these work(in linux), but for the dms and dm.mm you need to press the calculate button for the conversion to happen. Perhaps I need to make this more clear. Do these convert when you hit calculate?
Degree decimal minutes 16 46.3625 N 040 46.4117 W
Degree, minutes, seconds 16 46 21.748 N 040 46 24.700 W
I have a problem with pasting these too. I think windows uses a different character to separate. I will make an update to fix this one.
Walter I have deleted the entire 'build' directory, done several git fetch -all and git pull origin master and when built found that I had to use opencpn.lib for at least OpenCPN v4.1.1317 (not v4.1.607 which I happen to have) but the full set of TABS does not appear. I have tried this several times. I am going to delete my local repos and git clone. Are you sure that your repository has been updated?
I see "revert to DistanceBearingMercator from internal source " from 19 hours ago https://github.com/SaltyPaws/route_pi/commit/8f700e8d7e808b3e201016167b03ce125680d097 I'm going to do the new git clone now. Rick
This is without adding 'opencpn.lib' to the 'build' directory. I thought it might make some sense to you. Next I am going to add the 'opencpn.lib' file into 'build' (as we do with all other plugins) (from Opencpn version 4.2.0) and it will probably work.
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxproj" (default target) (3) -
(ClCompile target) -> C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(97): error C2065: 'True ' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxpr oj] C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(98): error C2065: 'Fals e' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxp roj] C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\OpenCPN\georef.cpp(42): fatal error C1083 : Cannot open include file: 'cutil.h': No such file or directory [C:\Users\Rick\Documents\GitHub\o- plugin\ws-route_pi\build\route_pi.vcxproj]
0 Warning(s)
3 Error(s)
Now I've added 'opencpn.lib' into the 'build' directory and I get the same errors Now I've added the standard package of dll's into the buildwin directory from OpenCPNbuildwin.7z found on Sourceforge OpenCPN OpenCPNplugins. From buildwin I have copied
cairo.dll
expat.dll
fontconfig.dll
iconv.dll
libpng16.dll
libxml2.dll
pixman-1.dll
Which I don't think your plugin uses because it is for svg icons etc. using MSVC++ command prompt at 'route_pi/build'
'cmake -T v120_xp ..'
'cmake --build . --config release'
I still get these errors now:
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\ALL_BUILD.vcxproj" (default target) (1)
->
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxproj" (default target) (3) -
>
(ClCompile target) ->
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(97): error C2065: 'True
' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxpr
oj]
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(98): error C2065: 'Fals
e' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxp
roj]
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\OpenCPN\georef.cpp(42): fatal error C1083
: Cannot open include file: 'cutil.h': No such file or directory [C:\Users\Rick\Documents\GitHub\o-
plugin\ws-route_pi\build\route_pi.vcxproj]
0 Warning(s)
3 Error(s)
routegui_impl.cpp(98) Coordinate.Trim(True); //Removes white-space (space, tabs, form feed, newline and carriage return) from the left or from the right end
I guess 'true' needs definition as boolean?
georef.cpp line 42
I don't find cutil.h anywhere.
I added cutil.h to the OpenCPN directory, found from OpenCPN v 4.2.0 Then tried again.
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\ALL_BUILD.vcxproj" (default target) (1)
->
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxproj" (default target) (3) -
>
(ClCompile target) ->
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(97): error C2065: 'True
' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxpr
oj]
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(98): error C2065: 'Fals
e' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxp
roj]
0 Warning(s)
2 Error(s)
Also False is not identified as boolean I guess. Windows MSVC++ is sort of explicit.
Tried a fresh git clone and build and I get the same 3 errors. Would really like to get this working. Rick
Hi Rick,
I think the last commit made the trouble... I will look at it this weekend. I also would like to get the plugin out there... Also another question, for windows there is the opencpn.lib file that needs to be added, is there a respective .so file that needs to be added to compile in Linux? On 10 Jun 2016 04:24, "Rick Gleason" notifications@github.com wrote:
Tried a fresh git clone and build and I get the same 3 errors. Would really like to get this working. Rick
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/SaltyPaws/route_pi/issues/10#issuecomment-225168162, or mute the thread https://github.com/notifications/unsubscribe/AA9lf2M8pmsfw7EBSoZBGYVLuAvQeDvUks5qKVd2gaJpZM4Io-CA .
Walbert, Glad I didn't lose you!
Also another question, for windows there is the opencpn.lib file that needs to be added, is there a respective .so file that needs to be added to compile in Linux Windows has an opencpn.lib that gets added to the .../build/ directory. The version you use is dependent on what the plugin requires ... the plugin is then supposed to be forward compatible, except when something happens like a change in wxWidgets version, which happened in Opencpn 4.1 I believe. Then the plugins supposedly require a new opencpn.lib version (4.1 for example). However, you have an Opencpn directory, with all the functions that you need in that, so isn't that taking the place of the opencpn.lib file? I don't know enough about this stuff to be relied on, and you should probably ask Jon Gough, Pavel, or Bdbcat.
Also for other plugins that use svg icons, etc we need to download a compressed set of files OpenCPNbuildwin.7z and expand them into the ../buildwin/ directory. Then we need to take about 6 dlls from there and copy them into the ../build/.. directory. It appears this is not really needed for your plugin.
By the way, I was thinking about the cursor right-click menu where it says "Start Route Here" and "Finish Route Here". I am concerned that these will be confused with the main program Routes, so I was thinking that "Start GC Route" and "End GC Route" might be better.
As far as an so file for linux I can't help too much.
The build problem should be fixed. I have updated the right click menu to read: Finish Route Here (Route Plugin) Onwards to fixing the copy paste issues
Dear SaltyPaws,
The cutil.h problem is gone but the true /false issue remains..... sorry.
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxproj" (default target) (3) -
(ClCompile target) -> C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(98): error C2065: 'True ' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxpr oj] C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(99): error C2065: 'Fals e' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxp roj]
0 Warning(s) 2 Error(s)
Time Elapsed 00:00:10.58
Ok, I have fixed the copy paste and coordinate conversion issues now. Lets fix the build
Linking CXX shared library libroute_pi.so [100%] Built target route_pi this is how it looks for me...
Did you try building from an empty directory?
if you still have the build problem, please check out the master branch after commit 37c72eea4ea579c86cdc8b333a496a7269081a21 and see if this builds.
Removed all files under build. Then cmake -T v120_xp .. then cmake --build . --config release and I got this:
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\ALL_BUILD.vcxproj" (default target) (1)
->
"C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxproj" (default target) (3) -
>
(ClCompile target) ->
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(99): error C2065: 'True
' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcxpr
oj]
C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\src\routegui_impl.cpp(100): error C2065: 'Fal
se' : undeclared identifier [C:\Users\Rick\Documents\GitHub\o-plugin\ws-route_pi\build\route_pi.vcx
proj]
0 Warning(s)
2 Error(s)
What else do you want me to try? As I said earlier, MSVC++ windows is pickier and more explicit than Linux.
See if you can build the branch "old-state". If not, please let me know what was the latest commit where you could build.
Did new git clone, got same errors. Did git checkout old-state, got same errors. See attached text below.
Tried changing routegui_impl.cpp to
if (Coordinate.EndsWith(_T("."))) Coordinate=Coordinate.BeforeLast('.'); Coordinate.Trim(1); //Removes white-space (space, tabs, form feed, newline and carriage return) from the left or from the right end of the string (right is default). Coordinate.Trim(0);
That works.
Have quickly tested the copy lat/long ----> paste to Degree Tab and it works! Need to check with all formats.
Also tested separate paste to the field in Degree Tab and it works. Need to check with all formats
Hints:
Two suggestions:
Walter, I git cloned fresh and tried to build... am I missing some link file or lib?
Build FAILED.
"C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\ALL_BUILD.vcxproj" (default target) (1) -
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Pl ugInChartBase::chartpix_to_latlong(double,double,double ,double )" (?chartpix_to_latlong@PlugInCh artBase@@UAEXNNPAN0@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: virtual thiscall opencpn_plug in_112::~opencpn_plugin_112(void)" (??1opencpn_plugin_112@@UAE@XZ) referenced in function "public: virtual void * thiscall opencpn_plugin_112::`vector deleting destructor'(unsigned int)" (??_Eopencpn_plugin_112@@UAEPAXI@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall opencpn _plugin_112::~opencpn_plugin_112(void)" (??1opencpn_plugin_112@@UAE@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj] route_pi.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall opencpn _plugin_112::MouseEventHook(class wxMouseEvent &)" (?MouseEventHook@opencpn_plugin_112@@UAE_NAAVwxM ouseEvent@@@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall op encpn_plugin_112::MouseEventHook(class wxMouseEvent &)"(?MouseEventHook@opencpn_plugin_112@@UAE_NAAVwxMouseEvent@@@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall opencpn _plugin_112::SendVectorChartObjectInfo(class wxString &,class wxString &,class wxString&,double,do uble,double,int)" (?SendVectorChartObjectInfo@opencpn_plugin_112@@UAEXAAVwxString@@00NNNH@Z) [C:\Us ers\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall op encpn_plugin_112::SendVectorChartObjectInfo(class wxString &,class wxString &,class wxString &,double,double,double,int)" (?SendVectorChartObjectInfo@opencpn_plugin_112@@UAEXAAVwxString@@00NNNH@Z) [ C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: virtual thiscall opencpn_plug in_113::~opencpn_plugin_113(void)" (??1opencpn_plugin_113@@UAE@XZ) referenced in function "public:virtual void * thiscall opencpn_plugin_113::`vector deleting destructor'(unsigned int)" (??_Eopencpn_plugin_113@@UAEPAXI@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall opencpn _plugin_113::~opencpn_plugin_113(void)" (??1opencpn_plugin_113@@UAE@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall opencpn _plugin_113::KeyboardEventHook(class wxKeyEvent &)"(?KeyboardEventHook@opencpn_plugin_113@@UAE_NAA VwxKeyEvent@@@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall op encpn_plugin_113::KeyboardEventHook(class wxKeyEvent &)"(?KeyboardEventHook@opencpn_plugin_113@@UAE_NAAVwxKeyEvent@@@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall opencpn _plugin_113::OnToolbarToolDownCallback(int)"(?OnToolbarToolDownCallback@opencpn_plugin_113@@UAEXH@ Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall op encpn_plugin_113::OnToolbarToolDownCallback(int)"(?OnToolbarToolDownCallback@opencpn_plugin_113@@UAEXH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall opencpn _plugin_113::OnToolbarToolUpCallback(int)"(?OnToolbarToolUpCallback@opencpn_plugin_113@@UAEXH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall op encpn_plugin_113::OnToolbarToolUpCallback(int)"(?OnToolbarToolUpCallback@opencpn_plugin_113@@UAEXH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: __thiscall OCPN_downloadEvent:: OCPN_downloadEvent(int,int)" (??0OCPN_downloadEvent@@QAE@HH@Z) referenced in function "public: void __thiscall OCPN_downloadEvent::`default constructor closure'(void)" (??_FOCPN_downloadEvent@@QAEXXZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: __thiscall OCPN_downloadEv ent::OCPN_downloadEvent(int,int)" (??0OCPN_downloadEvent@@QAE@HH@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall OCPN_downloa dEvent::~OCPN_downloadEvent(void)" (??1OCPN_downloadEvent@@UAE@XZ) referenced in function "public:virtual void * __thiscall OCPN_downloadEvent::`vector deleting destructor'(unsigned int)" (??_EOCPN_downloadEvent@@UAEPAXI@Z) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall OCPN_do wnloadEvent::~OCPN_downloadEvent(void)" (??1OCPN_downloadEvent@@UAE@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
route_pi.obj : error LNK2001: unresolved external symbol "public: virtual class wxEvent * __thisc all OCPN_downloadEvent::Clone(void)const "(?Clone@OCPN_downloadEvent@@UBEPAVwxEvent@@XZ) [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
routegui_impl.obj : error LNK2001: unresolved external symbol "public: virtual class wxEvent * __ thiscall OCPN_downloadEvent::Clone(void)const "(?Clone@OCPN_downloadEvent@@UBEPAVwxEvent@@XZ) [C:\ Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxproj]
C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\Release\route_pi.dll : fatal error LNK11 20: 11 unresolved externals [C:\Users\Rick\Documents\GitHub\o-plugin\w-route_pi\build\route_pi.vcxp roj]
Time Elapsed 00:00:22.42