This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pypilot compass calibration getting lost
#21
Hello all

I am having trouble with compass calibration changing after the pypilot service is shut down and restarted or rebooted.

My updated system is RPi4 running Bullseye 32bit OS, OpenCPN 5.6.2, pypilot 0.35 and pypilot_pi 0.34.4.0 but had a similar issue on an older Buster 32 installation.  Note no Openplotter.

At the moment I have the system off the boat for updating and testing.  To replicate, start, set level and calibrate the compass.  IMU is ICM20948 and calibration seems ok without additional work.  Note heading and leave in that position.  Stop pypilot.service or reboot, note heading not the same.  Typical numbers 347 deg after calibration, 298 deg after restart, so close to 50 deg different.  Also, rotating the unit to approximate NESW positions, after calibration the implied offset is within 6 deg on the 4 points so quite reasonable, after restart, the implied offset varied from -64 to +13, so very wayward.

Checking the pypilot.conf file, there was no difference between the compass calibration points in the files after calibration to that after restarting. To check there wasn't a permission issue, I deleted the ,conf file and redid the comparison.  The compass calibration points recorded were not the same as the deleted file but the same on the before and after test. My conclusion is that the calibration is not being read from the file after restarting.  This is consistent with my most recent experience on the water.

Any ideas?

John
Reply
#22
The problem is recent bug not saving keys not already in pypilot.conf

I have corrected in git, or if you simply added imu.compass.calibration key to pypilot.conf it would store it
Reply
#23
That seems to have done the trick, thanks Sean.

After a restart, the compass calibration display now looks like it is after calibration.  The only thing I noted is that it requires a full 360 deg rotation to achieve a calibration, no real problem, just different to the workbook.

I suspect this change may also cure the problem I had with poor linearity, the calibration display is quite different to any I saw post restart previously.

Thanks again  John
Reply
#24
it really needs less than 360 but it may be ignoring some data points if there is much noise.


Thanks for being patient and reporting... it is quite a problematic bug that appeared causing this, so very important to fix.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)