saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Any hardware type questions or problems for all other Phidget devices.
mebrahimi
Fresh meat
Posts: 4
Joined: Thu Nov 09, 2017 8:51 am
Contact:

saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Postby mebrahimi » Tue Nov 14, 2017 9:23 am

What is the difference between these two methods: saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters?

also does resetMagnetometerCorrectionParameters restore original factory settings?

User avatar
mparadis
Site Admin
Posts: 626
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Postby mparadis » Tue Nov 14, 2017 9:48 am

setMagnetometerCorrectionParameters allows you to set the parameters for as long as the object remains open. If the object disconnects, the parameters will reset.

saveMagnetometerCorrectionParameters saves the currently set parameters to flash memory on the device, so that these parameters are automatically used when the device is connected. (This is not supported on the older 1056 PhidgetSpatial).

resetMagnetometerCorrectionParameters resets the current and saved parameters to zero (which is the factory setting for the parameters).

mebrahimi
Fresh meat
Posts: 4
Joined: Thu Nov 09, 2017 8:51 am
Contact:

Re: saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Postby mebrahimi » Tue Nov 14, 2017 9:49 am

Thank you. I've been struggling with getting compass to work. Will keep playing with it.

User avatar
Patrick
Lead Developer
Posts: 3067
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Postby Patrick » Tue Nov 14, 2017 1:12 pm

Unless you are using the 1056, you should not have to call these functions yourself - you should use the provided compass calibration software which will set and save the parameters to flash.

-Patrick

mebrahimi
Fresh meat
Posts: 4
Joined: Thu Nov 09, 2017 8:51 am
Contact:

Re: saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Postby mebrahimi » Tue Nov 14, 2017 1:17 pm

I'm using a 1044 and did use the calibration software. Did not get consistent results - it seemed like it could accurately detect one direction, and 180 degree opposite, but in between, it was not linear (i.e. at 90 degrees, I would see 120). I will play with it some more tonight.

User avatar
Patrick
Lead Developer
Posts: 3067
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: saveMagnetometerCorrectionParameters vs setMagnetometerCorrectionParameters

Postby Patrick » Mon Nov 20, 2017 3:17 pm

It takes a surprisingly small amount of metal to interfere with the compass. It's best to run the calibration with the spatial already bolted into it's final place in your application. Sources of metal in the environment will need to be avoided, especially during calibration.

-Patrick


Return to “All Other Phidgets”

Who is online

Users browsing this forum: No registered users and 2 guests