Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-09-2018, 14:28   #76
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by NahanniV View Post
What is the typical absolute accuracy of the heading from PyPilot ?

Is a deviation table created ?
it depends on on a lot of factors, like the actual sensors, and what metal is around, but typically 2-3 degrees. There is not a deviation table used (yet)

The absolute accuracy is really not important at all for autopilot. Relative precision is, and this is better than 0.1 degrees.
__________________

boat_alexandra is offline   Reply With Quote
Old 04-09-2018, 17:56   #77
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Hard Aground back in Canada
Boat: Finnsailer 38
Posts: 1,215
Re: Inexpensive heading sensor?

Quote:
Originally Posted by boat_alexandra View Post
it depends on on a lot of factors, like the actual sensors, and what metal is around, but typically 2-3 degrees. There is not a deviation table used (yet)

The absolute accuracy is really not important at all for autopilot. Relative precision is, and this is better than 0.1 degrees.
Maybe I don't understand, but what good is .1deg. precision if the deviation isn't corrected ? Aren't there likely to be headings where a change in course would produce a non proportional change in compass heading ? I guess the rate sensor would initially get the heading correct, but isn't the magnetic sensor eventually the final heading ?

I admit, I don't understand what your IMU calibration is doing ? I would like to if you wouldn't mind explaining.

It would be nice to be able to use the PyPilot compass output for everything aboard.

Couldn't this be as simple as a deviation calibration where you turn the boat in a few circles at a constant speed with no wind or tide, like most autopilots do ?
__________________

__________________
Cheers,
JM
nahannivatsea.blogspot.ca
NahanniV is offline   Reply With Quote
Old 05-09-2018, 06:47   #78
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by NahanniV View Post
Maybe I don't understand, but what good is .1deg. precision if the deviation isn't corrected ? Aren't there likely to be headings where a change in course would produce a non proportional change in compass heading ? I guess the rate sensor would initially get the heading correct, but isn't the magnetic sensor eventually the final heading ?
Yes, but you need to make very large turns. Like I said, turning 90 degrees might actually turn 92 degrees on compass mode. This is already true for floating compasses although they are typically more accurate (and slower)

Quote:
I admit, I don't understand what your IMU calibration is doing ? I would like to if you wouldn't mind explaining.
It removes the bias (offsets) from the sensors which is random for each sensor and also cancels nearby metal (hard iron) It also does this for the accelerometers, as many sensors have offsets for these as well.
Quote:
It would be nice to be able to use the PyPilot compass output for everything aboard.
You can
Quote:
Couldn't this be as simple as a deviation calibration where you turn the boat in a few circles at a constant speed with no wind or tide, like most autopilots do ?
What you describe is not a deviation table. To have a deviation table, you need to actually know the true orientation from another source like a floating compass etc... Then input this correction for many different courses. This compass or reference can itself have errors.

Most likely the autopilots you describe are calibrating sensor bias which what it does automatically all the time. Compare the digital magnetic heading to a floating compass (if you can read the floating compass accurately enough)

If you think you can integrate the gyro to do this automatically... the amount of correction (2-3 degrees) in worst case out of 90 is near the noise level of the gyro turning at only a few degrees per second. In many cases it's better than that already making the error to find smaller.

Furthermore, the gyro itself has scale factor and non-linearity errors (integrated value is different for different turn rates, and different ambient temperature) not compensated either, so it cannot be used in this tiny correction without being more accurate itself, and a few circles would not be enough.

Eventually, in theory, yes, the calibration could be much smarter and get more and more accurate over time for absolutes. You could throw in a second or third 9DOF sensor mounted at a different orientation to improve accuracy and reduce noise while providing redundancy. It could automatically compensate temperatures, and give absolute accuracy always better than 1 degree. This is just not implemented yet.

Then people will still complain because their floating compass will actually have more error than the digital one but they assume it is absolute.

As it is now, it works well enough for practical use.
boat_alexandra is offline   Reply With Quote
Old 05-09-2018, 07:00   #79
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 4,544
Re: Inexpensive heading sensor?

From a practical point of view, it’s 3:30am, you are solo, third night out, yo want to be able to line the boat up in a heading, maybe pointing at a light or looking at the course on your GPS, and do the Picard thing “Engage!” I don’t care what the AP thinks is a heading, I just want it to drive a straight line, if I’m off a couple of degrees, then I want to make a small correction adjustment.

This how the old 3000 wheel pilots work, and it’s how CPT is now doing their control head.

This is not to disparage all the above, good stuff. I’m just pointing out that a LOT of folks, especially folks looking at these interesting low cost solutions, won’t give a hoot about these details. As a base we want something pretty simple, then be able to follow a route, then (maybe) more bells and whistles.

From my personal point of view my main concern is: Will it drive a STEEL boat in a straight line on any point of the compass? That is MY fundamental question. As you know I’ll find out in a bit as I have a unit in order to test. I’m going to use it to drive a CPT motor.
hpeer is online now   Reply With Quote
Old 05-09-2018, 15:37   #80
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,535
Re: Inexpensive heading sensor?

Bingo!

But a heading sensor can be easily calibrated and a deviation table made automatically if you have a working GPS available. Using the GPS as the reference, all you need is a magnetic variation formula which is published by the US government. That is in the WMM plugin already.
transmitterdan is online now   Reply With Quote
Old 06-09-2018, 01:41   #81
Registered User

Join Date: Apr 2007
Location: Australia
Boat: Island Packet 40
Posts: 1,989
Images: 7
Re: Inexpensive heading sensor?

Quote:
Originally Posted by hpeer View Post
From my personal point of view my main concern is: Will it drive a STEEL boat in a straight line on any point of the compass? That is MY fundamental question. As you know I’ll find out in a bit as I have a unit in order to test. I’m going to use it to drive a CPT motor.
I had a steel boat and found that the fluxgate compass in the Raymarine autopilot was far more accurate after I had done the circling calibration thing than the fairly expensive, corrected, steel boat magnetic compass. I suspect that it was also more sensitive as well.

After reading this thread a couple of days ago I got to wondering how they made a fluxgate small enough to fit in a mobile phone and found out that the sensing element is in a small chip along with a three axis accelerometer of about one cubic millimeter in size which works on a magnetoresistive principal.
RaymondR is offline   Reply With Quote
Old 06-09-2018, 01:59   #82
Registered User

Join Date: Apr 2007
Location: Australia
Boat: Island Packet 40
Posts: 1,989
Images: 7
Re: Inexpensive heading sensor?

Quote:
Originally Posted by NahanniV View Post
Maybe I don't understand, but what good is .1deg. precision if the deviation isn't corrected ? Aren't there likely to be headings where a change in course would produce a non proportional change in compass heading ? I guess the rate sensor would initially get the heading correct, but isn't the magnetic sensor eventually the final heading ?

I admit, I don't understand what your IMU calibration is doing ? I would like to if you wouldn't mind explaining.

It would be nice to be able to use the PyPilot compass output for everything aboard.

Couldn't this be as simple as a deviation calibration where you turn the boat in a few circles at a constant speed with no wind or tide, like most autopilots do ?

I think the software assumes a constant rate of heading change and compares and corrects for non constant outputs of fluxgate heading outputs. The software must have a heading versus error lookup table in it's memory somewhere.

The heading error is accounted for when you do the compass offset calibration during the setup.

Magnetic variation all over the world is not constant and changes with time. In oilfield directional work we had tables for much of the world but I do not recall them reducing to small fractions of a degree.

My understanding is that rate gyroscopes are used for damping rather than absolute direction indication. Consequently it appears probable that for their relatively short term utility they are not fully corrected as are gyro compasses.
RaymondR is offline   Reply With Quote
Old 06-09-2018, 02:45   #83
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 4,544
Re: Inexpensive heading sensor?

I’m hoping the TinyPilot compass is better than my iPhone 6 compass by a good bit. The phone compass is better than the boat compass but still not very good, wanders around quite a bit.
hpeer is online now   Reply With Quote
Old 06-09-2018, 04:13   #84
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,535
Re: Inexpensive heading sensor?

A phone compass cannot be used to orient a chart onto a radar display. It is not stable enough nor fast enough. Radar compass is the most critical use of a heading sensor onboard.

This is a very interesting topic. Orientation sensors are getting a huge boost from the self driving car phenomena (or fad if you like). Boating should definitely benefit from the new developments.
transmitterdan is online now   Reply With Quote
Old 06-09-2018, 06:06   #85
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 4,544
Re: Inexpensive heading sensor?

I’m not wild about this circling calibration thing: flat water, no current, make a few circles. What a PITA especially if you are making some miles, not just sailing in one local.
hpeer is online now   Reply With Quote
Old 06-09-2018, 11:45   #86
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,535
Re: Inexpensive heading sensor?

It’s possible to build up a deviation table over time using COG from GPS as a reference. The math is not hard. Just takes a little programming.
transmitterdan is online now   Reply With Quote
Old 06-09-2018, 17:25   #87
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by hpeer View Post
I’m not wild about this circling calibration thing: flat water, no current, make a few circles. What a PITA especially if you are making some miles, not just sailing in one local.
You only need to turn 200 degrees one time after the autopilot is first installed. After that it automatically updates whenever you turn more than 200 degrees within 10 minutes.

You don't need flat water at all. To get accurate heading while pitching and heeling, get a reasonable 3d calibration before mounting by holding it in different orientations, but it's best to get it from boat motion. In fact rolling around while making a circle can give a 3d calibration and is the best.

Flat water is only 2d update only estimating 2 out of 3 bias axes keeping the third from previous 3d calibration.

Quote:
Originally Posted by transmitterdan View Post
It’s possible to build up a deviation table over time using COG from GPS as a reference. The math is not hard. Just takes a little programming.
Any amount of current, even 0.1 knots could potentially throw it off by more than a degree if you were traveling 5 knots! Since the error to correct is only 2-3 degrees already, a whole degree would basically make it pointless as it would be less accurate in some courses than before (introducing a degree of error)

If the sensors are mounted near soft iron, or they are bad sensors or mounted in a bad place, etc.. it's possible the error to correct is much higher than 2-3 degrees.

So, current must be known exactly to within 0.05 knots, typically this means you would only do it with absolutely no current.

Because of currents, noisy gps measurements, and because the boat does not move perfectly forward, but slips sideways especially beating up wind it is not so simple as just a little programming. Wave motion makes it more difficult. You would have to inform the computer that there are no currents, no local magnetic deviations and that you facing exactly the direction you are moving and are not slipping sideways and no waves as it has no real way to know these things otherwise.

The desired accuracy improvement of only 1 -2 degrees would mean you need to average a lot of gps data in each direction, maybe a few minutes at least at every 3-5 degrees. It's a small improvement that most people don't care about (absolute compass accuracy) except perhaps for radar overlays it would be useful. For autopilot purposes it is not really that critical, but eventually maybe nice and fun thing to try too.


Finally, if you did manage all of this, then you would need to do it all over again at different heels to get accurate 3d deviation compensation to make it work while heeling, but you would have to somehow move around while heeling and not be slipping sideways which is basically impossible because the keel would produce lift and make you slip even if you were just weighing the boat down on one side.

Now keep in mind also the sensors change over time (not much more than the typical 2-3 degrees error, but as you can see, I recalibrate automatically for a reason) So, and you would have to repeat this process... Again how often not sure

Finally, you should also calibrate the gyroscopes at various turn rates and over temperature if you want to get higher-bandwidth accurate headings.

You can probably achieve accuracy of better than one degree doing all of this which is probably better for radar overlay but I have not explored this very closely because it just is not very important to make a functioning autopilot.

I could quite easily calibrate out non-linearities in the accelerometers, getting their absolute tilt accuracy down from 0.5 degrees to 0.2 degrees or better. This would be far easier to do than the above, but it requires holding the sensors perfectly still in a minimum of 15 orientations, preferably more. The overall improvement this has would be fairly minimal though, so I did not bother.

Adding more sensors than 3, like 4 (or just 6 or 9 gyros) and mounting them on linearly independent axes offers the possibility for automatic calibration just from movements. Consider 3 9dof sensors, each mounted at 45 degrees on the side of a cube, this gives 9 axes of each sensor all on different axes. Even more sensors could improve the results further. This can cancel non-linearities, misalignments, and bias automatically from any movements over time, greatly improving automatic calibration accuracy and speed.

The compass sensors are probably very linear, but the gyros are really not. All the sensors have misalignments (not exactly 90 degrees apart) which can cause twice the heading error of the misalignment.

With redundant sensors you also can continue if some sensors fail, as well as reduce the noise to 1/sqrt(n) which is nearly double the precision in the case of 3x9dof compared to a single one. This would be nice to implement as well.
boat_alexandra is offline   Reply With Quote
Old 06-09-2018, 18:36   #88
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Hard Aground back in Canada
Boat: Finnsailer 38
Posts: 1,215
Re: Inexpensive heading sensor?

Quote:
Originally Posted by boat_alexandra View Post
.......
Adding more sensors than 3, like 4 (or just 6 or 9 gyros) and mounting them on linearly independent axes offers the possibility for automatic calibration just from movements. Consider 3 9dof sensors, each mounted at 45 degrees on the side of a cube, this gives 9 axes of each sensor all on different axes. Even more sensors could improve the results further. This can cancel non-linearities, misalignments, and bias automatically from any movements over time, greatly improving automatic calibration accuracy and speed.

The compass sensors are probably very linear, but the gyros are really not. All the sensors have misalignments (not exactly 90 degrees apart) which can cause twice the heading error of the misalignment.

With redundant sensors you also can continue if some sensors fail, as well as reduce the noise to 1/sqrt(n) which is nearly double the precision in the case of 3x9dof compared to a single one. This would be nice to implement as well.
So, Do I have this correct ? Adding one or two more Mpu9255s in different orientations could create a better compass ?
What's the downside other than the $10-$15 for each additional sensor ?
Will it create significantly more software overhead ?
__________________
Cheers,
JM
nahannivatsea.blogspot.ca
NahanniV is offline   Reply With Quote
Old 06-09-2018, 19:33   #89
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,336
Re: Inexpensive heading sensor?

Quote:
Originally Posted by NahanniV View Post
So, Do I have this correct ? Adding one or two more Mpu9255s in different orientations could create a better compass ?
Not just a better compass, but a better IMU
Quote:
What's the downside other than the $10-$15 for each additional sensor ?
The mpu9255 is only about $4, so for 3 x 9dof (we can say 27 dof) the cost is still reasonable.

Special boards are needed to mount them in different orientations, and fitting this in my existing box might be a problem, but this is the easy part. There are also only two possible i2c addresses, so this would have to be worked around somehow, maybe using SPI (unlimited slaves possible), a second i2c bus, different types of sensors that use different i2c addresses, enable pins, i2c mux, or if you have other ideas?
Quote:
Will it create significantly more software overhead ?
There is no issue in the pi being able to process the data. The 1ghz processor is more than 100x faster than it needs to be for a basic IMU, and although this would cause significantly more calculations, it is still not an issue even for the slow pi zero.

The software to deal with this is not written. The software would be significantly more complex

Most users of redundant sensors only use them to reduce noise level, and continue working if some sensors fail which is already worthwhile. This is easy to implement, but you might basically get the same improvements just by using more expensive sensors.

To fully realize all the benefits of redundant sensors, they should also auto-calibrate, cancel their misalignment, bias, scale and non-linearity and even temperature coefficients which becomes more accurate the more redundant sensors there are.

It would be a big effort to implement correctly but is my eventual intent.
boat_alexandra is offline   Reply With Quote
Old 13-09-2018, 05:10   #90
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 140
Re: Inexpensive heading sensor?

Hi,

getting the devitation with the gps works only without any current and wind.

The typical routine for getting the devitation Chart is with a moored vessel and a landmark in sight and a known bearing (from a nautical chart). Then you circle the vessel an read the bearings and compare it with the bearings from chart (in short term).

The autocalibration from such a sensor is only for adjusting magnetic changes and noise near the sensor.
I didnīt have the problems witch piluso reported.
Maybe the cmps12 modul use an other mode. The heading stays stable over hours when the sensor not moved.

The magnetic field from a boat can produce magnetic aberration wich canīt balanced by the sensor. I donīt know if the cmps12 can eliminate the devitation, the cmps11 canīt (I have some directions with +/- 5 degrees) and so I decided to add such a function in the arduino sketch.

Remember, I use the sensor for radaroverlay. When there is too much difference between the heading read by the sensor and the "right" magnetic heading then you have an angel between the chart and the radaroverlay and also by MARPA.

Regards

Andreas
__________________

Andreas29 is offline   Reply With Quote
Reply

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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 15:39.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.