Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibration & Deviatoin #6

Open
MichaKersloot opened this issue Aug 16, 2024 · 6 comments
Open

Calibration & Deviatoin #6

MichaKersloot opened this issue Aug 16, 2024 · 6 comments

Comments

@MichaKersloot
Copy link
Contributor

I've just build 'your' project and have a question about the calibration. You've implemented a few options for AutoCalibration mode, but what do they mean?

I see you have already implemented the deviation recording? What do you need to use them?

@MichaKersloot
Copy link
Contributor Author

MichaKersloot commented Aug 19, 2024

To answer the first part of my question ;-)

Off, means.... Off, no autocalibration
On, means Autocalibration on for Gyro, Accelerometer and Magnetometer
Locked, means Off, no autocalibration and store the calibration as a profile
Auto, means Autocalibration off for Gyro and Accelerometer. On for Magnetometer

Not sure how to use the settings, but my best guess for now is:
On, and calibrate following the cmps14.pdf calibration routine. Then switch to locked.

@MichaKersloot MichaKersloot changed the title Hi Hans Calibration & Deviatoin Aug 20, 2024
@MichaKersloot
Copy link
Contributor Author

For the deviation, I see https://github.com/BerndCirotzki/ESP32_Precision-9_compass_BNO055 uses COG as an input to calibrate the compass. Is that an option you are interested in?

@htool
Copy link
Owner

htool commented Aug 20, 2024

For deviation the plan was to use somehow discover the waveform in the information and use that to make a function that would give back the deviation for a rad.
But I never got to it as I couldn't get the cpms14 to give a reliable reading on my boat :/

@MichaKersloot
Copy link
Contributor Author

That's a-shame. My first tests on the boat weren't very good also, but I hadn't time to dig into that further. At home it seems to work flawless ;-)

For the deviation, If I'm able to get it a sort of stable I'm probably able to implement the COG version of detecting the deviation. The math for working with a waveform or to do something like https://github.com/kriswiner/MPU6050/wiki/Simple-and-Effective-Magnetometer-Calibration is a bit over my head.

@MichaKersloot
Copy link
Contributor Author

Hi @htool did you ever find another solution? It seems the cpms14 does deviate a bit during a trip, but with when 'locked' it seems to be ok-ish. I'm thinking about sticking the box with Velcro and manually calibrate now and then. That's why I added the bluetooth, because calibrating depends on the status byte and is a lot easier to follow on my phone while sitting with the box in my hand.

It also seems I do need a deviation table, so I probably will look into that next.

@htool
Copy link
Owner

htool commented Sep 25, 2024

I was looking at other compass chips or even fully enclosed ones to get better input, but got distracted.

The deviation table still needs to be done, yes.
The idea was to

  • do a 360 in a steady way
  • record the degrees
  • use some transformation to create a smooth wave form
  • use the deviation table to offset the output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants