paynterf / MagCalTool

Magnetometer calibration GUI. Uses Octave to run MATLAB script on magnetometer point cloud
12 stars 1 forks source link

Octave Script #3

Closed psilvao closed 5 years ago

psilvao commented 5 years ago

Hi, when run for first time i see : C:\Users\Frank\Documents\Octave where is the script??

image

psilvao commented 5 years ago

As you can see

image

psilvao commented 5 years ago

Solved, I found the script inside the folder MagCalScript.m and other i use https://github.com/matthew-t-watson/Picopter/blob/master/Matlab/MgnCalibration.m

But now i got this error, please see

image

paynterf commented 5 years ago

Psilvao,

This error occurs when the 'S' matrix can't be found. Is it possible that this note applies to you?

19 July 2017 Note: I have had one report that the viewer fails to properly view a set of 3D points when the host PC is set for a non-English region. If this happens to you, please reset your region to English.

Hope this helps,

Frank

paynterf commented 5 years ago

Psilvao,

This error occurs when the 'S' matrix can't be found. Is it possible that this note applies to you?

19 July 2017 Note: I have had one report that the viewer fails to properly view a set of 3D points when the host PC is set for a non-English region. If this happens to you, please reset your region to English.

Hope this helps,

Frank

On Fri, Jan 4, 2019 at 9:12 AM psilvao notifications@github.com wrote:

Solved, I found the script inside the folder MagCalScript.m and other i use https://github.com/matthew-t-watson/Picopter/blob/master/Matlab/MgnCalibration.m

But now i got this error, please see

[image: image] https://user-images.githubusercontent.com/2114081/50692103-89914c00-1011-11e9-887a-c8edb9d6ffe4.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-451454058, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0961Jb4xVrVhNWsMwpN0l036fQ3raZks5u_2FigaJpZM4ZpqAn .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

psilvao commented 5 years ago

Hi Frank

Will test again, but how i can work with mpu9250, your software wait

mx,my,MZ by serial port only?

Regards Pablo

El dom., 6 ene. 2019 11:51 a.m., Frank Paynter notifications@github.com escribió:

Psilvao,

This error occurs when the 'S' matrix can't be found. Is it possible that this note applies to you?

19 July 2017 Note: I have had one report that the viewer fails to properly view a set of 3D points when the host PC is set for a non-English region. If this happens to you, please reset your region to English.

Hope this helps,

Frank

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-451747429, or mute the thread https://github.com/notifications/unsubscribe-auth/ACBCIfhVNkCmizQAYPk0j-Sd3yc-xefgks5vAg2AgaJpZM4ZpqAn .

paynterf commented 5 years ago

Pablo,

You'll have to figure out how to get the Mx,My,Mz data out of the 9250 and into a properly formatted text file. There are any number of examples for how to do this - just search for 'mpu9250 arduino' ;-).

Hope this helps,

Frank

psilvao commented 5 years ago

Hi Frank, Thank you very much for the suggestion, now that I change the region I do not claim the matrix S. What if I try to send the values of MPU9250 to MagCalTool and see what happens

paynterf commented 5 years ago

Pablo,

I assume by "I do not claim the matrix S", you mean "I no longer see the 'Load Command' error"? As long as the magetometer values are correctly formatted (comma, space, or tab delimited), you should be fine.

Regards,

Frank

On Mon, Jan 7, 2019 at 9:16 PM psilvao notifications@github.com wrote:

Hi Frank, Thank you very much for the suggestion, now that I change the region I do not claim the matrix S. What if I try to send the values of MPU9250 to MagCalTool and see what happens

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-452150837, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0962h7lOck49RIHptlr8j-751_nehbks5vA_-QgaJpZM4ZpqAn .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

psilvao commented 5 years ago

Hello Frank, I was trying to modify the code of kris winer, to obtain the data via serial port, the issue is that I can not understand how through its software, I can obtain the biases of the magnetometer.

My objective is to calibrate the magnetometer only once, and from there place the biases in hard along with the declination.

I understand that it uses some calculations, to obtain the ellipsoid and from there comes the W calibration matrix that you use in your script, but I try to visualize the biases and I can not find those values.

Thanks in advance Pablo

psilvao commented 5 years ago

Hello again Frank, I'm still with my consultations which point to improvements :)

You know? I realized that the EM WorkBench window can not be made a resize. That's why I do not see the W calibration matrix as well as the vector.

How can I fix that? If the maximum resolution of my notebook is 1366x768, look what I see:

image

paynterf commented 5 years ago

Pablo,

I was cleaning out my inbox and didn't see that I had ever replied to this email. Did you ever get things going to your satisfaction?

Regards,

Frank

On Thu, Jan 10, 2019 at 3:03 PM psilvao notifications@github.com wrote:

Hello again Frank, I'm still with my consultations which point to improvements :)

You know? I realized that the EM WorkBench window can not be made a resize. That's why I do not see the W calibration matrix as well as the vector.

How can I fix that? If the maximum resolution of my notebook is 1366x768, look what I see:

[image: image] https://user-images.githubusercontent.com/2114081/50993901-84dd0400-14f9-11e9-8e58-474516312050.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-453234293, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0962h-8Vd6XRy_t2ui4MLB44ZtlbP8ks5vB5x7gaJpZM4ZpqAn .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

psilvao commented 5 years ago

Hi Frank

Thanks for your work, the problem that i have Is my display resolution, because i see below the bias factors, so the Solution Will be to use other display.

Well now i have a proyect for inertial navigation, i Will tell you about this how i can use it for improve the measures AND calibration.

Regards Pablo

El jue., 11 abr. 2019 8:03 p.m., Frank Paynter notifications@github.com escribió:

Pablo,

I was cleaning out my inbox and didn't see that I had ever replied to this email. Did you ever get things going to your satisfaction?

Regards,

Frank

On Thu, Jan 10, 2019 at 3:03 PM psilvao notifications@github.com wrote:

Hello again Frank, I'm still with my consultations which point to improvements :)

You know? I realized that the EM WorkBench window can not be made a resize. That's why I do not see the W calibration matrix as well as the vector.

How can I fix that? If the maximum resolution of my notebook is 1366x768, look what I see:

[image: image] < https://user-images.githubusercontent.com/2114081/50993901-84dd0400-14f9-11e9-8e58-474516312050.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <https://github.com/paynterf/MagCalTool/issues/3#issuecomment-453234293 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AD0962h-8Vd6XRy_t2ui4MLB44ZtlbP8ks5vB5x7gaJpZM4ZpqAn

.

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-482358727, or mute the thread https://github.com/notifications/unsubscribe-auth/ACBCIVZ0onxrI16OXyfds52qJ46SR6loks5vf78vgaJpZM4ZpqAn .

paynterf commented 5 years ago

Pablo,

Yes, a higher resolution display will allow you to see the entire program window. Sounds like you are making progress :-)

Frank

On Thu, Apr 11, 2019 at 8:05 PM psilvao notifications@github.com wrote:

Hi Frank

Thanks for your work, the problem that i have Is my display resolution, because i see below the bias factors, so the Solution Will be to use other display.

Well now i have a proyect for inertial navigation, i Will tell you about this how i can use it for improve the measures AND calibration.

Regards Pablo

El jue., 11 abr. 2019 8:03 p.m., Frank Paynter notifications@github.com escribió:

Pablo,

I was cleaning out my inbox and didn't see that I had ever replied to this email. Did you ever get things going to your satisfaction?

Regards,

Frank

On Thu, Jan 10, 2019 at 3:03 PM psilvao notifications@github.com wrote:

Hello again Frank, I'm still with my consultations which point to improvements :)

You know? I realized that the EM WorkBench window can not be made a resize. That's why I do not see the W calibration matrix as well as the vector.

How can I fix that? If the maximum resolution of my notebook is 1366x768, look what I see:

[image: image] <

https://user-images.githubusercontent.com/2114081/50993901-84dd0400-14f9-11e9-8e58-474516312050.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/paynterf/MagCalTool/issues/3#issuecomment-453234293 , or mute the thread <

https://github.com/notifications/unsubscribe-auth/AD0962h-8Vd6XRy_t2ui4MLB44ZtlbP8ks5vB5x7gaJpZM4ZpqAn

.

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/paynterf/MagCalTool/issues/3#issuecomment-482358727 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ACBCIVZ0onxrI16OXyfds52qJ46SR6loks5vf78vgaJpZM4ZpqAn

.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-482378935, or mute the thread https://github.com/notifications/unsubscribe-auth/AD096zXlNYMo7AUOvqn0_SAZj3sgEowrks5vf83RgaJpZM4ZpqAn .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

psilvao commented 5 years ago

Yes Frank, i will contact soon

Regards, Pablo

On Thu, Apr 11, 2019 at 8:10 PM Frank Paynter notifications@github.com wrote:

Pablo,

Yes, a higher resolution display will allow you to see the entire program window. Sounds like you are making progress :-)

Frank

On Thu, Apr 11, 2019 at 8:05 PM psilvao notifications@github.com wrote:

Hi Frank

Thanks for your work, the problem that i have Is my display resolution, because i see below the bias factors, so the Solution Will be to use other display.

Well now i have a proyect for inertial navigation, i Will tell you about this how i can use it for improve the measures AND calibration.

Regards Pablo

El jue., 11 abr. 2019 8:03 p.m., Frank Paynter <notifications@github.com

escribió:

Pablo,

I was cleaning out my inbox and didn't see that I had ever replied to this email. Did you ever get things going to your satisfaction?

Regards,

Frank

On Thu, Jan 10, 2019 at 3:03 PM psilvao notifications@github.com wrote:

Hello again Frank, I'm still with my consultations which point to improvements :)

You know? I realized that the EM WorkBench window can not be made a resize. That's why I do not see the W calibration matrix as well as the vector.

How can I fix that? If the maximum resolution of my notebook is 1366x768, look what I see:

[image: image] <

https://user-images.githubusercontent.com/2114081/50993901-84dd0400-14f9-11e9-8e58-474516312050.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/paynterf/MagCalTool/issues/3#issuecomment-453234293 , or mute the thread <

https://github.com/notifications/unsubscribe-auth/AD0962h-8Vd6XRy_t2ui4MLB44ZtlbP8ks5vB5x7gaJpZM4ZpqAn

.

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/paynterf/MagCalTool/issues/3#issuecomment-482358727 , or mute the thread <

https://github.com/notifications/unsubscribe-auth/ACBCIVZ0onxrI16OXyfds52qJ46SR6loks5vf78vgaJpZM4ZpqAn

.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <https://github.com/paynterf/MagCalTool/issues/3#issuecomment-482378935 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AD096zXlNYMo7AUOvqn0_SAZj3sgEowrks5vf83RgaJpZM4ZpqAn

.

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-482380366, or mute the thread https://github.com/notifications/unsubscribe-auth/ACBCIQyG_zmQA2k1LkXjYJM1ygZ2Y1_gks5vf875gaJpZM4ZpqAn .

psilvao commented 5 years ago

Hi Frank!, here working, but now I see the complete software interface, i have other doubt, how i can use compensation expression on my script?, because the objetive is work with calibrate magnetometer

Reagrds Pablo

brave_EwhLvK31r1

paynterf commented 5 years ago

Pablo,

Great to hear you have it working! If I remember correctly, all you have to do is copy the calibration coefficients into your Arduino program, and then use them to correct each magnetometer measurement as it is received from the device. The 'Save Vals To Text File' button is intended to let you do this in a convenient way.

Does this answer your question?

Regards,

Frank

On Thu, May 9, 2019 at 12:53 PM psilvao notifications@github.com wrote:

Hi Frank!, here working, but now I see the complete software interface, i have other doubt, how i can use compensation expression on my script?, because the objetive is work with calibrate magnetometer

Reagrds Pablo

[image: brave_EwhLvK31r1] https://user-images.githubusercontent.com/2114081/57471460-2f232900-7259-11e9-90bb-e3082b7fc8b3.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3#issuecomment-490982602, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6T327Y7WVJAORLWIUQOE3PURJHBANCNFSM4GNGUATQ .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

psilvao commented 5 years ago

Hi Frank

I have tried to use it with your magnetometer readings and with mine of my magnetometer, and both cases I get the same matrix U and the vector V, if you like I will attach my readings if you get the same.

Have the test please, and tell me if there is something to correct. Apriori, it can not be that with two different magnetometers, in different parts of the planet we obtain the same matrix and vector. So whats the wrong?

Your data is:

`2.16498829887029,0,0.47199455636256 1.53329726155837,0.0974439084402427,0.187259828339 1.77648477778708,0.226713519454282,-0.454174193584171 2.39954902516554,0.462475167680014,-0.230480784835878 2.17917417861291,0.565417576247676,0.432240758978068 1.50130969167312,0.493077652194276,0.271614471654446 1.58631960429435,0.635066570727784,-0.406392885124525 2.15986606257335,1.02810074255833,-0.310288375757171 2.03483910720853,1.13215407411725,0.376864654371797 1.37898049121463,0.886216949980062,0.3461522602797 1.31828549372054,0.970633044837714,-0.343923478950144 1.78202247362407,1.49529440036758,-0.378881336330128 1.73260228822133,1.65203294497231,0.307867679245251 1.16108375213059,1.25705330367447,0.408179204327524 0.995354347812086,1.22518038238386,-0.269023782162624 1.30435385999472,1.83170869923981,-0.433780538242416 1.28913015994729,2.07768164991481,0.227743564049362 0.847109845569054,1.58105770705057,0.455453488430407 0.637764218955986,1.39650884271728,-0.184400864953113 0.771615888727553,2.01970064348883,-0.473001781298458 0.736415387946813,2.36832754844411,0.139388203068668 0.444079648812303,1.83052124425458,0.486266496788929 0.26199109318962,1.48582532370806,-0.0931132200324283 0.229394393425513,2.05688085805833,-0.495127507584251 0.118853914300052,2.49505071565739,0.0459949892566504 -0.0313788653928058,1.97749824647872,0.499504566998498 -0.118875123180951,1.49528452739662,0.00153977926434995 -0.281025001040843,1.95457181492686,-0.499358035703811 -0.511522519960622,2.44464449600848,-0.0490606033058846 -0.552315260796661,1.99773751048979,0.494689240710286 -0.493653287793169,1.42631750414818,0.0961371269266588 -0.726570192250035,1.73460228231923,-0.485540463348364 -1.100978973578,2.22144668828617,-0.142343017838783 -1.08249414943514,1.87493486571772,0.471994556362559 -0.851037530932479,1.27915242584254,0.187259828338997 -1.08458205612232,1.42512418727282,-0.454174193584167 -1.60028975641313,1.84683282957954,-0.230480784835879 -1.57925307408316,1.60451140982603,0.43224075897807 -1.17767261867519,1.05363350583957,0.271614471654447 -1.3431435854917,1.05625979047629,-0.406392885124522 -1.97029439199183,1.35644850768122,-0.310288375757172 -1.99789374278785,1.19614532239801,0.376864654371796 -1.45697663755441,0.751123661724987,0.346152260279701 -1.49973562144237,0.656352204583645,-0.343923478950143 -2.18597417366697,0.795629532089438,-0.378881336330133 -2.2970036423455,0.674461123768564,0.30786767924525 -1.66918197095854,0.377001373429214,0.408179204327524 -1.5587145092688,0.249411959780628,-0.269023782162623 -2.23848319587199,0.213749228659808,-0.433780538242417 -2.44389016977664,0.0775786423416446,0.227743564049362 -1.79279106193949,-0.0569102074665703,0.455453488430408 -1.52829424388076,-0.145934406118016,-0.184400864953105 -2.13492000966488,-0.34161136014265,-0.473001781298458 -2.41923951540853,-0.546409340522343,0.139388203068667 -1.80731772409771,-0.53067636495216,0.486266496788928 -1.41775802251223,-0.516021719586563,-0.0931132200324412 -1.8960082723492,-0.829779056836948,-0.495127507584251 -2.22020426063987,-1.14459484870563,0.0459949892566353 -1.69687428469336,-1.01592401781147,0.499504566998498 -1.23551682502081,-0.85059114025102,0.00153977926435093 -1.5521963447273,-1.22066069746335,-0.499358035703811 -1.86136297678484,-1.66531374489797,-0.0490606033058785 -1.45393380377891,-1.47718780199263,0.494689240710285 -0.988400548558153,-1.14067503996468,0.0961371269266598 -1.13892454582591,-1.49652938528069,-0.485540463348366 -1.37333977841963,-2.06419910429415,-0.142343017838791 -1.08249414943514,-1.87493486571772,0.471994556362559 -0.682259730625889,-1.37659633428278,0.187259828338998 -0.691902721664756,-1.65183770672711,-0.454174193584173 -0.799259268752411,-2.30930799725955,-0.230480784835879 -0.599921104529746,-2.16992898607371,0.432240758978062 -0.323637072997929,-1.54671115803384,0.271614471654442 -0.243176018802648,-1.69132636120407,-0.406392885124522 -0.189571670581516,-2.38454925023955,-0.310288375757173 -0.0369453644206745,-2.32829939651525,0.3768646543718 0.0779961463397795,-1.63734061170504,0.346152260279692 0.181450127721828,-1.62698524942136,-0.343923478950143 0.403951700042907,-2.29092393245701,-0.378881336330134 0.564401354124174,-2.32649406874088,0.307867679245244 0.508098218827947,-1.63405467710368,0.408179204327525 0.563360161456712,-1.47459234216449,-0.269023782162622 0.934129335877267,-2.04545792789962,-0.433780538242421 1.15476000982935,-2.15526029225646,0.227743564049361 0.94568121637044,-1.524147499584,0.455453488430408 0.890530024924778,-1.25057443659926,-0.184400864953104 1.36330412093733,-1.67808928334618,-0.473001781298459 1.68282412746171,-1.82191820792177,0.139388203068666 1.36323807528542,-1.29984487930242,0.486266496788931 1.1557669293226,-0.969803604121495,-0.0931132200324124 1.6666138789237,-1.22710180122139,-0.495127507584249 2.10135034633982,-1.35045586695176,0.0459949892566485 1.72825315008616,-0.961574228667263,0.499504566998498 1.35439194820176,-0.644693387145605,0.00153977926435191 1.83322134576814,-0.733911117463513,-0.499358035703811 2.37288549674546,-0.77933075111051,-0.0490606033058795 2.00624906457557,-0.520549708497161,0.494689240710285 1.48205383635132,-0.285642464183495,0.0961371269266607 1.86549473807593,-0.238072897038542,-0.485540463348362 2.47431875199764,-0.157247583992022,-0.142343017838792 2.16498829887027,1.39264420061034E-15,0.471994556362563

I Attached my data ` calculo.txt new 141.txt

Regards, Pablo

paynterf commented 5 years ago

Pablo,

Not sure what is going on. I imported your 'new_141.txt' file and it seemed to calibrate OK. I have attached a screenshot showing the 'raw' and calibrated plots, and the calibration matrix values.

[image: 190523_PabloData.jpg]

While I was troubleshooting this issue, I also ran across some GUI bugs that I fixed. The updated version is 2.1.6, and I also updated all the files on the GitHub repository.

Please let me know if you have any questions or issues with this

Frank

On Fri, May 17, 2019 at 6:06 PM psilvao notifications@github.com wrote:

Hi Frank

I have tried to use it with your magnetometer readings and with mine of my magnetometer, and both cases I get the same matrix U and the vector V, if you like I will attach my readings if you get the same.

Have the test please, and tell me if there is something to correct. Apriori, it can not be that with two different magnetometers, in different parts of the planet we obtain the same matrix and vector. So whats the wrong?

Your data is:

`2.16498829887029,0,0.47199455636256 1.53329726155837,0.0974439084402427,0.187259828339 1.77648477778708,0.226713519454282,-0.454174193584171 2.39954902516554,0.462475167680014,-0.230480784835878 2.17917417861291,0.565417576247676,0.432240758978068 1.50130969167312,0.493077652194276,0.271614471654446 1.58631960429435,0.635066570727784,-0.406392885124525 2.15986606257335,1.02810074255833,-0.310288375757171 2.03483910720853,1.13215407411725,0.376864654371797 1.37898049121463,0.886216949980062,0.3461522602797 1.31828549372054,0.970633044837714,-0.343923478950144 1.78202247362407,1.49529440036758,-0.378881336330128 1.73260228822133,1.65203294497231,0.307867679245251 1.16108375213059,1.25705330367447,0.408179204327524 0.995354347812086,1.22518038238386,-0.269023782162624 1.30435385999472,1.83170869923981,-0.433780538242416 1.28913015994729,2.07768164991481,0.227743564049362 0.847109845569054,1.58105770705057,0.455453488430407 0.637764218955986,1.39650884271728,-0.184400864953113 0.771615888727553,2.01970064348883,-0.473001781298458 0.736415387946813,2.36832754844411,0.139388203068668 0.444079648812303,1.83052124425458,0.486266496788929 0.26199109318962,1.48582532370806,-0.0931132200324283 0.229394393425513,2.05688085805833,-0.495127507584251 0.118853914300052,2.49505071565739,0.0459949892566504 -0.0313788653928058,1.97749824647872,0.499504566998498 -0.118875123180951,1.49528452739662,0.00153977926434995 -0.281025001040843,1.95457181492686,-0.499358035703811 -0.511522519960622,2.44464449600848,-0.0490606033058846 -0.552315260796661,1.99773751048979,0.494689240710286 -0.493653287793169,1.42631750414818,0.0961371269266588 -0.726570192250035,1.73460228231923,-0.485540463348364 -1.100978973578,2.22144668828617,-0.142343017838783 -1.08249414943514,1.87493486571772,0.471994556362559 -0.851037530932479,1.27915242584254,0.187259828338997 -1.08458205612232,1.42512418727282,-0.454174193584167 -1.60028975641313,1.84683282957954,-0.230480784835879 -1.57925307408316,1.60451140982603,0.43224075897807 -1.17767261867519,1.05363350583957,0.271614471654447 -1.3431435854917,1.05625979047629,-0.406392885124522 -1.97029439199183,1.35644850768122,-0.310288375757172 -1.99789374278785,1.19614532239801,0.376864654371796 -1.45697663755441,0.751123661724987,0.346152260279701 -1.49973562144237,0.656352204583645,-0.343923478950143 -2.18597417366697,0.795629532089438,-0.378881336330133 -2.2970036423455,0.674461123768564,0.30786767924525 -1.66918197095854,0.377001373429214,0.408179204327524 -1.5587145092688,0.249411959780628,-0.269023782162623 -2.23848319587199,0.213749228659808,-0.433780538242417 -2.44389016977664,0.0775786423416446,0.227743564049362 -1.79279106193949,-0.0569102074665703,0.455453488430408 -1.52829424388076,-0.145934406118016,-0.184400864953105 -2.13492000966488,-0.34161136014265,-0.473001781298458 -2.41923951540853,-0.546409340522343,0.139388203068667 -1.80731772409771,-0.53067636495216,0.486266496788928 -1.41775802251223,-0.516021719586563,-0.0931132200324412 -1.8960082723492,-0.829779056836948,-0.495127507584251 -2.22020426063987,-1.14459484870563,0.0459949892566353 -1.69687428469336,-1.01592401781147,0.499504566998498 -1.23551682502081,-0.85059114025102,0.00153977926435093 -1.5521963447273,-1.22066069746335,-0.499358035703811 -1.86136297678484,-1.66531374489797,-0.0490606033058785 -1.45393380377891,-1.47718780199263,0.494689240710285 -0.988400548558153,-1.14067503996468,0.0961371269266598 -1.13892454582591,-1.49652938528069,-0.485540463348366 -1.37333977841963,-2.06419910429415,-0.142343017838791 -1.08249414943514,-1.87493486571772,0.471994556362559 -0.682259730625889,-1.37659633428278,0.187259828338998 -0.691902721664756,-1.65183770672711,-0.454174193584173 -0.799259268752411,-2.30930799725955,-0.230480784835879 -0.599921104529746,-2.16992898607371,0.432240758978062 -0.323637072997929,-1.54671115803384,0.271614471654442 -0.243176018802648,-1.69132636120407,-0.406392885124522 -0.189571670581516,-2.38454925023955,-0.310288375757173 -0.0369453644206745,-2.32829939651525,0.3768646543718 0.0779961463397795,-1.63734061170504,0.346152260279692 0.181450127721828,-1.62698524942136,-0.343923478950143 0.403951700042907,-2.29092393245701,-0.378881336330134 0.564401354124174,-2.32649406874088,0.307867679245244 0.508098218827947,-1.63405467710368,0.408179204327525 0.563360161456712,-1.47459234216449,-0.269023782162622 0.934129335877267,-2.04545792789962,-0.433780538242421 1.15476000982935,-2.15526029225646,0.227743564049361 0.94568121637044,-1.524147499584,0.455453488430408 0.890530024924778,-1.25057443659926,-0.184400864953104 1.36330412093733,-1.67808928334618,-0.473001781298459 1.68282412746171,-1.82191820792177,0.139388203068666 1.36323807528542,-1.29984487930242,0.486266496788931 1.1557669293226,-0.969803604121495,-0.0931132200324124 1.6666138789237,-1.22710180122139,-0.495127507584249 2.10135034633982,-1.35045586695176,0.0459949892566485 1.72825315008616,-0.961574228667263,0.499504566998498 1.35439194820176,-0.644693387145605,0.00153977926435191 1.83322134576814,-0.733911117463513,-0.499358035703811 2.37288549674546,-0.77933075111051,-0.0490606033058795 2.00624906457557,-0.520549708497161,0.494689240710285 1.48205383635132,-0.285642464183495,0.0961371269266607 1.86549473807593,-0.238072897038542,-0.485540463348362 2.47431875199764,-0.157247583992022,-0.142343017838792 2.16498829887027,1.39264420061034E-15,0.471994556362563

I Attached my data ` calculo.txt https://github.com/paynterf/MagCalTool/files/3193258/calculo.txt new 141.txt https://github.com/paynterf/MagCalTool/files/3193251/new.141.txt

Regards, Pablo

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3?email_source=notifications&email_token=AA6T325BYEN3JSLFI4M63MDPV4T73A5CNFSM4GNGUAT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVV667Q#issuecomment-493612926, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6T326LDFXH5J6P5LOWIV3PV4T73ANCNFSM4GNGUATQ .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

Magnetometer Compensation Values Saved Thursday, May 23, 2019 8:33:50 PM

Compensation Matrix U11: 0.001104863 U12: 5.0575E-05 U13: -9.8687E-05 U22: 0.0010979 U23: 8.28E-05 U33: 0.0011535

Center Offset Cx: -116.31 Cx: 847.89 Cx: -1156

Format suitable for Frank's Mongoose_IMU Arduino program

s_magcalvalues magcalvals = (0.001104863, 5.0575E-05, -9.8687E-05, 0.0010979, 8.28E-05, 0.0011535, -116.31, 847.89, -1156)

psilvao commented 5 years ago

Hi Frank, can you post again please the image?

psilvao commented 5 years ago

Hi Frank

Regarding the calculation script, only the centered ellipsoid finds you, not the sphere. Did you watch that?

Regards, Pablo

psilvao commented 5 years ago

The ellipsoid with center c can be expressed in matrix form, (x-c)T A (x-c) = 1, where A is a symmetric positive definite matrix. A point y on a unit sphere centered in origin is mapped to the surface of this ellipsoid through x = My + c where MT M = A-1. M can be solved through SVD: in MATLAB, this would be [~, S, V] = svd(A); M = V diag(1./sqrt(diag(S))) V'; Then, inv(M' * M) is equal to A, and the inverse mapping from the ellipsoid to the sphere is y = M-1 (x - c).

psilvao commented 5 years ago

image

image

image

psilvao commented 5 years ago

Here my excel, for your testing

calculos-frank.xlsx

psilvao commented 5 years ago

According to what I can see I have a strong iron error that interferes with the measurements of my magnetometer, which is why the resulting matrix offered by the script that you call from your GUI is not completely positive, maybe that's why I do not reach the sphere, but to an ellipse.

paynterf commented 5 years ago

Pablo,

Here's the image again - this time posted directly into the issue comment dialog.

190523_PabloData

As I may have mentioned in my blog posts, of 3 years ago, I was ultimately unsuccessful in using a magnetometer for navigation inside my house, as there are too many strong magnetic interference sources. I haven't used this code for several years, but I believe the underlying MATLAB code is correct. All my GUI does is load in the user's data, present it to the MATLAB routine, and then display the results. If you have concerns about the accuracy of the calculations, you should talk to Alain Barraud, the MATLAB code author. See this link.

Regards,

Frank

JamesJian-tech commented 4 years ago

Hi I am wondering where are

1.2 1.2 1.16   5.997557998 ( =10*4912/8190)

come from ???@

in the excel calculos-frank.xlsx .

paynterf commented 4 years ago

Hi,

Can you give me a bit of a hint? Was in the code, or on the GUI interface box, or what? :-)

Frank

On Mon, Jan 20, 2020 at 7:22 PM JJH996 notifications@github.com wrote:

Hi I am wondering where are 1.2 1.2 1.16 5.997557998 ( =10*4912/8190) come from ???@

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3?email_source=notifications&email_token=AA6T325LY6YRZLQ55CRTYF3Q6Y54RA5CNFSM4GNGUAT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJODOPY#issuecomment-576468799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6T323NVFMJ323BJIDSY6DQ6Y54RANCNFSM4GNGUATQ .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

JamesJian-tech commented 4 years ago

Hi Frank

I mean in the calculos-frank.xlsx calculos-frank.xlsx

I dont understand where line 1

1.2 1.2 1.16   5.997557998

come from ?

paynterf commented 4 years ago

Paolo,

Sorry, I have no idea where these values come from. Remember, all my program does is make calls into Octave, which then runs a MATLAB script provided by someone else. I really don't have any idea what all the numbers are. You might try contacting the author of the MATLAB script.

Frank

On Wed, Jan 22, 2020 at 10:14 PM JJH996 notifications@github.com wrote:

Hi Frank

I mean in the calculos-frank.xlsx calculos-frank.xlsx https://github.com/paynterf/MagCalTool/files/4101096/calculos-frank.xlsx

I dont understand where line 1 1.2 1.2 1.16 5.997557998 come from ?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paynterf/MagCalTool/issues/3?email_source=notifications&email_token=AA6T324UWBRC74QQAUWIOM3Q7EDSFA5CNFSM4GNGUAT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJV3YTI#issuecomment-577485901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6T3272JWCHXCW5VGW6YU3Q7EDSFANCNFSM4GNGUATQ .

-- G.Frank Paynter, PhD OSU ESL Research Scientist (ret) EM Workbench LLC 614 638-6749 (cell)

JamesJian-tech commented 4 years ago

Hi Frank,

Thanks. I will search for it.

James Jian