MOT0110_0 Magnetometer Calibration

Comments & issues
Post Reply
G_Gagnon
Phidgetsian
Posts: 6
Joined: Sat Sep 07, 2024 8:48 pm
Contact:

MOT0110_0 Magnetometer Calibration

Post by G_Gagnon »

I am trying to use a Phidgets MOT0110_0 AHRS unit to get the attitude of an astronomical telescope so I can view remotely the position of the mount and optical tube assembly in quasi real-time with 'vpython'.

Everything seems to be working correctly except for one thing, the magnetometer calibration (either 2D or 3D). There is a heading error that I can't get rid of so, magnetometer calibration time it is.

Unfortunately, and it seems other people had a similar problem too, the calibration window closes unexpectedly right after a message that mentions the calibration had gathered so many calibration points. I get the red sphere, no problem, but whether I get a few points or a few hundred, the calibration does not get to display the green calibration sphere and the calibration parameters.

I have tried to run the software on many Windows PC (Windows 10 and 11) but none get me to complete calibration. Is there anything that needs to be set for the calibration to work, or is this an unfortunate bug?

Thanks for all the help.
G_Gagnon
Phidgetsian
Posts: 6
Joined: Sat Sep 07, 2024 8:48 pm
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by G_Gagnon »

As a follow-up on my post, I have since found the C language magnetometer calibration software "Phidget22_Spatial_CompassCalibrator_C_Ex_20240411" and, after correcting a small linker bug related to a doubly defined variable, I ran it to perform calibration of the MOT0110_0. It does the job nicely, even though there is not visual feedback.

As far as the doubly defined variable error is concerned, it is related to the following two files:

1) In compasscal_lib/compasscalroutines.c:

Code: Select all

double compassData[MAXSAMPLES][3];
is defined in line 7

2) In compasscal_ex/compass.c:

Code: Select all

double compassData[MAXSAMPLES][3];
is also defined in line 4

One as to be declared "extern" for the linker problem to go away:

Code: Select all

extern double compassData[MAXSAMPLES][3];
My environment:
Ubuntu Linux 22.04 LTS

Hoping this can be useful.
User avatar
Patrick
Lead Developer
Posts: 630
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by Patrick »

Hi,

For the graphical calibration, are you running the latest version? There was a fix related to gathering too many samples, but perhaps you are running into a new bug.

I've updated the command line utility to fix the build error, thanks for pointing that out.

-Patrick
G_Gagnon
Phidgetsian
Posts: 6
Joined: Sat Sep 07, 2024 8:48 pm
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by G_Gagnon »

As I do not use Windows often, I had to go through a longish Windows update before I could install the latest Phidget22 libraries (Phidget22-x65_1.20.20240910.exe) and test the GUI and graphical calibration.

Unfortunately, neither the magnetometer calibration routine nor the 'spatial' window run to completion. I can get the red calibration points but soon after I get to see the number of data points recorded, the window closes. For the 'spatial' window, it displays for a few seconds and closes as well.

If there is a way to generate a log or debug info of what is going on, I could have a look at it and/or send it to you for analysis.

Thanks again for your help.

Sincerely.
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by jdecoux »

The Spatial sample in the Phidget Control Panel is also crashing for you? That seems particularly unusual. Both magnetometer calibration and the Spatial sample are stable when I run them using that version.

For completeness' sake, what firmware version are you running on the MOT0110?

You can find the Phidget22 logs under Help->Open Logs Folder in the Phidget Control Panel

The main log file is "Phidget22Manager.log". I would be interested to see what that says shortly after either example crashes.
G_Gagnon
Phidgetsian
Posts: 6
Joined: Sat Sep 07, 2024 8:48 pm
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by G_Gagnon »

Well, I found what causes the closing/crashing of the Phidget Control Panel! But as far as why it does that, I do not have a clue.

The root cause is the linguistic duality of our country! Being francophones in the province of Quebec, our Windows PC are set to the Canada french language and, running the Phidget Control Panel under that language setting is what closed (calibration) and crashed (spatial) the application. Setting the language to english resulted in the control panel working fine, magnetometer calibration and spatial ran flawlessly. Again, as to why... I'm clueless!

I just wonder if this problem happens in any other language than Canada french!

Thanks again for your help, your information made me dig further and figure out the source of the issue, unfortunately, not the solution.

Have a nice weekend.
G_Gagnon
Phidgetsian
Posts: 6
Joined: Sat Sep 07, 2024 8:48 pm
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by G_Gagnon »

As there was no further reply to my last post, I just hope it did not cause any concern as it was not intended as such.

Thanks.
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: MOT0110_0 Magnetometer Calibration

Post by jdecoux »

Thanks for following up! We didn't respond as it sounded like your issue had been resolved.

However, you may be interested to know that your post did inspire us to look into localizing numbers in text fields in the Control Panel to ensure stability regardless of the operating system's language settings. I will update this post again once those changes are released.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests