OpenMarine

Full Version: Pypilot compass calibration getting lost
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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
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
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
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.
Pages: 1 2 3