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

Change the compass calibration calculation #8341

Closed
wants to merge 1 commit into from
Closed

Change the compass calibration calculation #8341

wants to merge 1 commit into from

Conversation

fanchuannangang1503
Copy link
Contributor

@fanchuannangang1503 fanchuannangang1503 commented Nov 22, 2017

"result = px4_ioctl (fd, MAGIOCCALIBRATE, fd);" This sentence will cause the compass driver to self-calibrate.
The driver program of hmc5883 compass can self-calibration. This will change the scale factor of hmc5883 driver. Therefore, compass calibration input data may have been multiplied by a scale factor.So we have to consider that the scale factor in the driver might not be 1.0.
If mscale._scale is 1.0f, then it will not affect the calculation results. If mscale._scale is not 1.0, then take the scale of the driver into account.

"result = px4_ioctl (fd, MAGIOCCALIBRATE, fd);" This sentence will cause the compass driver to self-calibrate.
The driver program of hmc5883 compass  can self-calibration. This will change the scale factor of hmc5883 driver. Therefore, compass calibration input data may have been multiplied by a scale factor.So we have to consider that the scale factor in the driver might not be 1.0.
If mscale.*_scale is 1.0f. Then it will not affect the calculation results. If mscale. * _ Scale is not 1.0, then take the scale of the driver program into account.
@LorenzMeier
Copy link
Member

Thanks!

@fanchuannangang1503
Copy link
Contributor Author

Excuse me, Is my modification correct? Will my modification cause other problems?Are you going to adopt my modification ? @LorenzMeier

@mhkabir
Copy link
Member

mhkabir commented Apr 15, 2018

@dagar this seems sensible to me. Maybe something to consider?

@stale
Copy link

stale bot commented Jan 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Feb 4, 2019

Closing as stale.

@stale stale bot closed this Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants