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
#11
Hi Sean, I re-installed scipy and it now seems to work ok:

>>> import scipy
>>> from scipy.constants import find
>>> find ('newton')
['Newtonian constant of gravitation', 'Newtonian constant of gravitation over h-bar c']

No errors now when I run pypilot_boatimu:

pi@openplotter:~ $ sudo systemctl stop pypilot
pi@openplotter:~ $ sudo systemctl stop pypilot_web
pi@openplotter:~ $ sudo systemctl stop pypilot_boatimu
pi@openplotter:~ $ pypilot_boatimu
imu process 1280
pypilotServer process 1282
server setup has 3 pipes
made imu process realtime
Using settings file RTIMULib.ini
Settings file RTIMULib.ini loaded
Detected MPU9250/MPU9255 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: MPU-925x
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
MPU-925x init complete
imu rate set to rate 20 roll -67.25675935968249 heading 30.09384820126436
calibration loaded, starting 1279.48089847781887 heading 35.03466648572864

But, still loosing compass calibration when I reboot. So I re-installed the pypilot version that comes with OpenCPN (0.16) and this saves the calibration ok. Obviously the OpenCPN pypilot plugin no longer connects but at least I have a working autopilot. I think I will leave things like this for now and get on with some sailing!
Many thanks for all your help.
Regards
David
Reply
#12
For what it's worth, I'm running an old 0.24 version here and I get this line in the log, related to calibration.

failed to write /home/tc/.pypilot/pypilot.conf imu.compass.calibration.locked False write() argument must be str, not bool
Reply
#13
Can you try a newer version? I believe I fixed this bug anyway.
Reply
#14
Yes I can. But this might be the cause of the problem of TS, so when I saw this error I thought of this thread. I'm implying here that they would check their pypilot version as well and update if needed.
Reply
#15
Have newer tinypilot purchased April 2021. Have not upgraded firmware.

Have same problem of loosing compass calibration.
All other settings seem to persist.
After I do a circle it eventually calibrates very well although it seems to take a little while to be accurate.
Eventually track very well with compass and gps.

On restart it's  off usually about 30 degrees and never recovers unless I do a circle.
Sometimes I do not bother as it steers OK.

Any suggestions?

John
Reply
#16
Do you run for a while after calibrating? The settings dont get stored to disk for up to 2 minutes.

If you restart, the calibration is all zero again??

I suggest upgrading if you can, but use a different sd card if possible. I would like to know what is going on, because it definitely saves the calibration the same way as all the other settings.
Reply
#17
(2022-09-26, 10:04 PM)seandepagnier Wrote: Do you run for a while after calibrating?    The settings dont get stored to disk for up to 2 minutes.

 If you restart, the calibration is all zero again??

I suggest upgrading if you can, but use a different sd card if possible.    I would like to know what is going on, because it definitely saves the calibration the same way as all the other settings.
Ran for hours after calibrating.
Do not think calibration is zero but will check.

Tried locking compass calibration but that did not help.

Should I use latest tinypilot image?
If so I'll first try as is to see what happens with fresh config.
Then is OK to copy the config file from the old card.
Suppose not that hard to write down the gains etc.
Reply
#18
The next versions of pypilot have all sorts of improvements regarding this, but I have been tied up from much progress recently.

Yes, there are only a few gains, I would just take note of them, and try the new version if possible on a different sd card to make it easy to switch back.
Reply
#19
(2022-09-27, 02:50 AM)seandepagnier Wrote: The next versions of pypilot have all sorts of improvements regarding this, but I have been tied up from much progress recently.    

Yes, there are only a few gains, I would just take note of them, and try the new version if possible on a different sd card to make it easy to switch back.

Downloaded image to new sd card.

Made copies of everything in .pypilot  on both old and new.

For testing just turned tinypilot to calibrate compass. Know it's not quite right but got reasonable readings. With new image calibration persisted over restarts.

Stopped pypilot process when changing pypilot.conf

Copied old pypilot.conf  to new image. Calibration did not persist. Compared the two config.cfg files.

Merged the 2 files. Keeping my settings that I set.

Now it seems to work properly.
I thought there was a missing imu setting on the old but looking at the files on my laptop they are different but all there.
I'll double check the copies on the tinypilot tomorrow. 

It did not like settings for rudder position. Re-calibrated and its OK now.

John
Reply
#20
Thanks. No time to deal with old versions...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)