Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 30-09-2017, 14:51   #16
Registered User

Join Date: Oct 2014
Location: Cruising in SW Pacific
Boat: Jason 35'
Posts: 42
Re: Compass Deviation Plugin future requests.

Furthermore, while deviation can be reduced by 'correction' as Rooiedirk describes, it cannot be completed eliminated. Maybe it can be -0- on one or a few headings, but there will be some residual deviation on other headings. Thus a deviation table for each compass that is used for navigation or piloting is required. Being careful with stowage can help reduce deviation and random changes in deviation, e.g. don't stow tinned foods near the fluxgate compass.
__________________

OZwingle is offline   Reply With Quote
Old 30-09-2017, 18:55   #17
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

Rooiedirk you undoubtably know more than I, but my cell has asked me often enough to recalibrate the compass which involves spinnig it in 3 directions. Then presumably it is more accurate. I don't know how accurate it is, or what the process is, but couldn't that result then be compared to the fluxgate?
__________________

rgleason is offline   Reply With Quote
Old 30-09-2017, 18:59   #18
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

Much the way you would compare the compass to the course between two known points? One of the problems would be doing the comparison electronically via usb or something.
rgleason is offline   Reply With Quote
Old 01-10-2017, 16:12   #19
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

I guess this idea to measure deviation is pretty far out, but george winthur our compass adjuster uses an electric gyroscope to adjust our Ritche magnetic compass by comparisons. He got it close enough to call it zero deviation but we've removed an alu housing for old radar around the pedestal so it must be checked.
The point is he used his own special gyrocompass to adjust the compass.
rgleason is offline   Reply With Quote
Old 02-10-2017, 01:17   #20
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 395
Re: Compass Deviation Plugin future requests.

A cellphone does have a fluxgate sensor just as most electronic compasses onboard. And most fluxgate sensors are nowadays 3D that means they are actually three sensors (for x,y and z directions). A fluxgate is a way to measure magneticfield strength.
For a compass we can forget about the z direction.

If we have a compass on board our ship the reading is likely to be influenced by the ships own magnetic field. Think this ships magnetic field as being a magnetic of some strength and in some direction.
What an electronic compass is doing if 'auto compensate' is while steaming in a circle measure the strength of the magnetic field. The field thas is measured is the combination of earth and ships field. It is clear that if ships field and earth field are working in the same direction, the resulting total field will be high. Also if working in opposite direction the result will be low.
Then the compass computer starts calculating and makes an internal correction table based on the high and low course and a sinewave like correction beween them.
From then on it takes the compass reading, adds the correction and output the corrected compass course.

This works rather well for a lot of circumstances. But it could be that the ships magneticfield is equal or even stronger then the earth field. Then it is not possible to calc a correction table. (your compass will warn you to find another place for the sensor).
And aspecially on steel ships there is something like 'induced magnetic'. This is if the earth magnetic field 'sea's' a iron bar then, as the iron bar is a better magnetic conductor then air, the earth field will run trough the bar. Unfortunally we have now a bar with on one side magneticfield 'lines' going in and the otherside coming out. **** that IS a magnet. Only a magnet not constant and even changing N/S poles on different courses.

The self compensating fluxgate compass can't correct for this induced fields.
Then then there is still the Z direction. Aslong the vessel is upright this won't do anything to the compass reading. If sailing however it will cause a heeling error. And again a autocompensate cant fix this.

If you compensate a compass, or only make a deviation table, you need some way or another the true ships course and compare this with the compass reading. The modern way is bring your own GPS compass, but a gyro will also do.
Most of us won't have either of them, so we need something else. A very good and accurate one is the sun(if you have a correct time). A good compass will have a shadow pin to make it easy to take a sun bearing. But a thin line with a small weight could also throw a nice shadow line over the compass rose. A leading line (lights) is also a good true course if you steam right into it. Or what I often use is OpenCPN. Make a route to a point some distance away. Make a heading straight to that point and compare the compass course with the true course.
In my Plugin (in progress) all three could be used and the PI will take care of the calculation and drawing of the deviation table.
Dirk
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 02-10-2017, 21:56   #21
Registered User

Join Date: Oct 2014
Location: Cruising in SW Pacific
Boat: Jason 35'
Posts: 42
Re: Compass Deviation Plugin future requests.

Dirk,
Please find attached a draft "functional specifications" document.

Coefficients are not mentioned only because I am not knowledgeable enough to clearly describe them. However, including coefficients appears to be a good idea, as you have already done.

I do encourage separation of developing a deviation table(s) plugin from automating the creation of deviation tables (swinging a compass). A plugin that provides a compass course from known deviation tables would be immediately useful. And this simplifies the development process.

Let me know if I can help in any way.
Thank you for working on this.
Attached Files
File Type: doc OpenCPN.Compass_Deviation.doc (138.0 KB, 23 views)
OZwingle is offline   Reply With Quote
Old 03-10-2017, 00:10   #22
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 395
Re: Compass Deviation Plugin future requests.

Thanks for the specs. We are more or less on one line. As a point from your doc I will make it easyer to add from an existing deviation table.
Having the compasscourse in the route steering popup window is in the core code, and can't be changed from the plugin. But maybe in the future it is possible to merge with the variation plugin. Then it would be a standard addon for OpenCPN and the core code setting for magnetic-readings could be changed in compass-readings.
About your remarks about curvefitting and sine wave, the deviation is always a result of the formula Dev=A + B.sin(CC) + C.cos(CC) + D.sin(2.CC) + E.cos(2.CC). Where CC is CompassCourse and A to E constant values. I do curvefitting following above formula and calc the A..E values. In the preview the Curve including original points are visiable, so you can see how accurate your input is/was.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 05-10-2017, 09:04   #23
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

Deviation Plugin page Created using discussion and resources from this thread.
Please feel free to edit it and get it into better shape. Dirk & OZwingle, PM me to be an Editor/Manager (need your email in the PM, not here).

Is there a github site we can put in the manual?
rgleason is offline   Reply With Quote
Old 20-11-2017, 09:46   #24
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 395
Re: Compass Deviation Plugin future requests.

A first alfa release is on github now.https://github.com/RooieDirk/Deviation_pi
See attachment for a little help.
Attached Files
File Type: pdf Help page.pdf (314.6 KB, 29 views)
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 21-11-2017, 11:26   #25
Registered User

Join Date: Oct 2014
Location: Cruising in SW Pacific
Boat: Jason 35'
Posts: 42
Re: Compass Deviation Plugin future requests.

Dirk,

I have logged onto github and found the project. I downloaded the files.
Can I install the wmm_pi.pkgproj.in file as a plugin to OpenCPN for review as 'live'? It does not appear to be 'self-installing'. A few hints would be appreciated.

I like the short tutorial on a sun compass, especially the string and tea cup.
Text edits of the help document underway.

Thanks
OZwingle is offline   Reply With Quote
Old 21-11-2017, 11:36   #26
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 395
Re: Compass Deviation Plugin future requests.

Quote:
Originally Posted by OZwingle View Post
Dirk,

I have logged onto github and found the project. I downloaded the files.
Can I install the wmm_pi.pkgproj.in file as a plugin to OpenCPN for review as 'live'? It does not appear to be 'self-installing'. A few hints would be appreciated.

I like the short tutorial on a sun compass, especially the string and tea cup.
Text edits of the help document underway.

Thanks
At this moment it is only for those who can compile themselve. Still in an early stage with tons of bugs.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 22-11-2017, 00:31   #27
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

First Windows compilation for Alpha version is having trouble finding tinystr.h, jasonval.h and several others.
Quote:

Build FAILED.

"D:\Frederick\Documents\GitHub\Deviation_pi\build\ ALL_BUILD.vcxproj" (default t
arget) (1) ->
"D:\Frederick\Documents\GitHub\Deviation_pi\build\ deviation_pi.vcxproj" (defaul
t target) (3) ->
(ClCompile target) ->
D:\Frederick\Documents\GitHub\Deviation_pi\src\Sha redStuff.cpp(78): warning C
4101: 'sec' : unreferenced local variable [D:\Frederick\Documents\GitHub\Deviat
ion_pi\build\deviation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\Sha redStuff.cpp(78): warning C
4101: 'min' : unreferenced local variable [D:\Frederick\Documents\GitHub\Deviat
ion_pi\build\deviation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\Sha redStuff.cpp(306): warning
C4018: '<' : signed/unsigned mismatch [D:\Frederick\Documents\GitHub\Deviation_
pi\build\deviation_pi.vcxproj]


"D:\Frederick\Documents\GitHub\Deviation_pi\build\ ALL_BUILD.vcxproj" (default t
arget) (1) ->
"D:\Frederick\Documents\GitHub\Deviation_pi\build\ deviation_pi.vcxproj" (defaul
t target) (3) ->
(ClCompile target) ->
d:\frederick\documents\github\deviation_pi\src\tin yxml.h(52): fatal error C10
83: Cannot open include file: 'tinystr.h': No such file or directory [D:\Freder
ick\Documents\GitHub\Deviation_pi\build\deviation_ pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\tin yxml.h(52): fatal error C10
83: Cannot open include file: 'tinystr.h': No such file or directory [D:\Freder
ick\Documents\GitHub\Deviation_pi\build\deviation_ pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\tin yxml.h(52): fatal error C10
83: Cannot open include file: 'tinystr.h': No such file or directory [D:\Freder
ick\Documents\GitHub\Deviation_pi\build\deviation_ pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\tin yxml.h(52): fatal error C10
83: Cannot open include file: 'tinystr.h': No such file or directory [D:\Freder
ick\Documents\GitHub\Deviation_pi\build\deviation_ pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\tin yxml.h(52): fatal error C10
83: Cannot open include file: 'tinystr.h': No such file or directory [D:\Freder
ick\Documents\GitHub\Deviation_pi\build\deviation_ pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\sha redstuff.cpp(339): error C4
716: 'CalcSqueredDev' : must return a value [D:\Frederick\Documents\GitHub\Devi
ation_pi\build\deviation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\jso nval.cpp(32): fatal error C
1083: Cannot open include file: 'wx/jsonval.h': No such file or directory [D:\F
rederick\Documents\GitHub\Deviation_pi\build\devia tion_pi.vcxproj]

3 Warning(s)
7 Error(s)
jasonval.cpp line 32 #include <wx/jsonval.h>

should this be #include <jsonval.h>
rgleason is offline   Reply With Quote
Old 22-11-2017, 00:52   #28
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

After finding another tinystr.h and copying it in and then changing the jasonval.h path to just jasonval.h (you'd best make these changes I think)

There just two new errors which I think you will understand.



Build FAILED.

"D:\Frederick\Documents\GitHub\Deviation_pi\build\ ALL_BUILD.vcxproj" (default target) (1) ->
"D:\Frederick\Documents\GitHub\Deviation_pi\build\ deviation_pi.vcxproj" (default target) (3) ->
(ClCompile target) ->
D:\Frederick\Documents\GitHub\Deviation_pi\src\Sha redStuff.cpp(78): warning C4101: 'sec' : unreferenced local variable
[D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\Sha redStuff.cpp(78): warning C4101: 'min' : unreferenced local variable
[D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\Sha redStuff.cpp(306): warning C4018: '<' : signed/unsigned mismatch [D:
\Frederick\Documents\GitHub\Deviation_pi\build\dev iation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\rea dwritexml.cpp(217): warning C4800: 'int' : forcing value to bool 'tr
ue' or 'false' (performance warning) [D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]
D:\Frederick\Documents\GitHub\Deviation_pi\src\rea dwritexml.cpp(203): warning C4101: 'tempd' : unreferenced local vari
able [D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]


"D:\Frederick\Documents\GitHub\Deviation_pi\build\ ALL_BUILD.vcxproj" (default target) (1) ->
"D:\Frederick\Documents\GitHub\Deviation_pi\build\ deviation_pi.vcxproj" (default target) (3) ->
(ClCompile target) ->
D:\Frederick\Documents\GitHub\Deviation_pi\src\dev iation_pi.cpp(143): error C2039: 'ret_flag' : is not a member of 'de
viation_pi' [D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\rea dwritexml.cpp(223): error C4716: 'ReadWriteXML::SaveXML' : must retu
rn a value [D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]
d:\frederick\documents\github\deviation_pi\src\sha redstuff.cpp(339): error C4716: 'CalcSqueredDev' : must return a val
ue [D:\Frederick\Documents\GitHub\Deviation_pi\build\d eviation_pi.vcxproj]

5 Warning(s)
3 Error(s)
rgleason is offline   Reply With Quote
Old 23-11-2017, 09:13   #29
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 395
Re: Compass Deviation Plugin future requests.

Spend a day to setup a virtual windows box. For me compiling works, but I do it inside the opencpntree.
Anyhow the dll is here. Hope it works as I used the current wxWidgets release 3.03
Attached Files
File Type: pdf deviation_pi.dll.pdf (376.0 KB, 16 views)
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 23-11-2017, 10:24   #30
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,829
Re: Compass Deviation Plugin future requests.

Dirk, I am traveling with a SurfacePro3 with 4 gb. I runs out of memory. Installing Virtualbox is not an option. My bigger laptop had virtualbox and linux for a year but updating virtualbox became a pain and I wiped it.

Your dll works but the file is not reading or writing, partly because it is using ProgramFiles (x86) which is not a user directory, but there were some other read/write errors in my compile attempt.

The entry of data and screens all work fine, except when greater than 360. See photos.
__________________

rgleason is offline   Reply With Quote
Reply

Tags
compass, plug

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Boat compass deviation? OldFrog75 Navigation 26 29-07-2014 05:52
Deviation (Too Much) on Compass flpplfflp Construction, Maintenance & Refit 39 17-07-2011 21:25
Deviation and Variation on Compass Sailaway Kid Navigation 8 02-07-2010 19:05
Deviation card Connemara Seamanship & Boat Handling 5 11-05-2008 21:08
deviation chart jean1146 Marine Electronics 16 22-02-2008 09:20



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 00:36.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.