kriswiner / MPU9250

Arduino sketches for MPU9250 9DoF with AHRS sensor fusion
1.03k stars 472 forks source link

how to plot circle from magnetometer value #129

Open sexyday opened 7 years ago

sexyday commented 7 years ago

hi kris, i found some magnetometer calibration issue from others website(includeing here),but i still can't figure out why i can't plot circle even ellipse like these circle image

my result is showed below. image if i want to plot circle ,how to rotate my imu?whose coordinate should i refere to ?inertial z axis or imu? what should i operate with it?here are two methods what i realize from other website,which is right? or both are wrong? image image

kriswiner commented 7 years ago

Move the sensor in every direction up dowm rotate left right etc. The idea is to sample as much of the response surface as possible during the collection of the data.

On Sun, Mar 26, 2017 at 6:09 AM, sexyday notifications@github.com wrote:

hi kris, i found some magnetometer calibration issue from others website(includeing here),but i still can't figure out why i can't plot circle even ellipse like these [image: circle] https://cloud.githubusercontent.com/assets/23310147/24331136/c35def2a-1260-11e7-8688-ca4f2cd4fd51.png [image: image] https://cloud.githubusercontent.com/assets/23310147/24331158/25e7855c-1261-11e7-91cc-190a28663aad.png

my result is showed below. [image: image] https://cloud.githubusercontent.com/assets/23310147/24331203/c17242b4-1261-11e7-8bad-98bde29124d3.png if i want to plot circle ,how to rotate my imu?whose coordinate should i refere to ?inertial z axis or imu? what should i operate with it?here are two methods what i realize from other website,which is right? or both are wrong? [image: image] https://cloud.githubusercontent.com/assets/23310147/24331420/9af9dade-1266-11e7-9752-74b10b75b64e.png [image: image] https://cloud.githubusercontent.com/assets/23310147/24331499/3cf34b30-1268-11e7-9477-5abd7ad9cbae.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU-9250/issues/129, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qnuqvLIlsEbQWAlwHKWX6u9MTURVks5rpmNxgaJpZM4Mpa-z .

sexyday commented 7 years ago

still the same. image

should i normalize mag value like this magn=1/(sqrt(mXmX+mYmY+mZmZ)); mX=mX magn; mY=mY magn; mZ=mZ magn;

could you tell me more detail,please

kriswiner commented 7 years ago

I would say no, but I don't know what you are trying to do here.

On Sun, Mar 26, 2017 at 11:27 PM, sexyday notifications@github.com wrote:

should i normalize mag value like this

   magn=1/(sqrt(mX*mX+mY*mY+mZ*mZ));
   mX=mX* magn*100;
   mY=mY* magn*100;
   mZ=mZ* magn*100;

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU-9250/issues/129#issuecomment-289364604, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qsl2woFd89NLdlRfE1VH3kstzqTeks5rp1bBgaJpZM4Mpa-z .

sexyday commented 7 years ago

i have a new question.when there is pitch or roll angle occured ,yaw angle will be inaccurate. how to solve this problem?i find a solution the picture shows below. 222 but the problem still occure.

kriswiner commented 7 years ago

I have no idea what you are trying to do.

On Mon, May 8, 2017 at 5:31 AM, sexyday notifications@github.com wrote:

i have a new question.when there is pitch or roll angle occured ,yaw angle will be inaccurate. how to solve this problem?i find a solution the picture shows below. [image: 222] https://cloud.githubusercontent.com/assets/23310147/25804041/62da70a4-342c-11e7-9e28-0278bc3129bd.png but the problem still occure.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU-9250/issues/129#issuecomment-299853856, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qhxdOQKz0uqV9WeFEHUUMAPYvQH9ks5r3wsIgaJpZM4Mpa-z .