1042 User Guide: Difference between revisions
Line 70: | Line 70: | ||
====Magnetic Error Correction (Calibration)==== | ====Magnetic Error Correction (Calibration)==== | ||
In order to get numbers of useful accuracy from the 1042's compass you will need to provide calibration parameters. To make determining them easy, we distribute a program with our drivers that does this for you. | In order to get numbers of useful accuracy from the 1042's compass you will need to provide calibration parameters. To make determining them easy, we distribute a program with our drivers that does this for you. | ||
'''To calibrate your compass:''' | '''To calibrate your compass:''' | ||
[[image:calibration1.png|thumb|200px|link= | [[image:calibration1.png|thumb|200px|link={{SERVER}}/wiki/images/3/32/Calibration1.png]] | ||
*Navigate to the Phidgets installation folder on your computer. Open the 'examples' folder and find the Compass Calibrator program. | *Navigate to the Phidgets installation folder on your computer. Open the 'examples' folder and find the Compass Calibrator program. | ||
<br clear = "all"> | <br clear = "all"> | ||
[[image:calibration2.png|thumb|200px|link= | [[image:calibration2.png|thumb|200px|link={{SERVER}}/wiki/images/b/b5/Calibration2.png]] | ||
*Start the program and find the link in the Settings/Status text box. Go to the website listed. (http://www.ngdc.noaa.gov/geomag-web/#igrfwmm) | *Start the program and find the link in the Settings/Status text box. Go to the website listed. (http://www.ngdc.noaa.gov/geomag-web/#igrfwmm) | ||
<br clear = "all"> | <br clear = "all"> | ||
[[image:calibration3.png|thumb|200px|link= | [[image:calibration3.png|thumb|200px|link={{SERVER}}/wiki/images/3/3a/Calibration3.png]] | ||
*Select your country and city. Click 'Get Location' and then 'Compute'. A table of values will show up in an overlaid window. The value you will need is the 'Total Field' value in nT. | *Select your country and city. Click 'Get Location' and then 'Compute'. A table of values will show up in an overlaid window. The value you will need is the 'Total Field' value in nT. | ||
<br clear="all"> | <br clear="all"> | ||
[[image:calibration4.png|thumb|200px|link= | [[image:calibration4.png|thumb|200px|link={{SERVER}}/wiki/images/0/02/Calibration4.png]] | ||
*Enter the magnetic field value into the calibration program. | *Enter the magnetic field value into the calibration program. | ||
*Depending on what your application is this step as well as the next step might be a bit different. If you are intending on mounting the | *Depending on what your application is this step as well as the next step might be a bit different. If you are intending on mounting the 1044 onto a large vehicle such as a car then you should mount the 1044 securely to the vehicle in its final intended position then check the 2-axis bubble, click the 'Start' button. | ||
*If you are using a smaller, more easily handled vehicle such as a small robot (something you could physically pick up) you will mount the | *If you are using a smaller, more easily handled vehicle such as a small robot (something you could physically pick up) you will mount the 1044 and use the 3-axis calibration instead. Click 'Start'. | ||
<br clear="all"> | <br clear="all"> | ||
[[image:calibration5.png|thumb|200px|link= | [[image:calibration5.png|thumb|200px|link={{SERVER}}/wiki/images/6/67/Calibration5.png]] | ||
*Rotate the compass around (including whatever equipment you have mounted it to) such that the red dots being generated on screen outline as much of a full sphere (in 3-axis) as possible. This will take several minutes. Being perfect is not necessary but try to be as thorough as time permits. Once done, click stop. | *Rotate the compass around (including whatever equipment you have mounted it to) such that the red dots being generated on screen outline as much of a full sphere (in 3-axis) as possible. This will take several minutes. Being perfect is not necessary but try to be as thorough as time permits. Once done, click stop. | ||
*If you are in a large vehicle, you will be aiming to fill out a disc instead of a sphere. This can be done by simply driving around for a few minutes making sure to do complete 360° turns in the process. | *If you are in a large vehicle, you will be aiming to fill out a disc instead of a sphere. This can be done by simply driving around for a few minutes making sure to do complete 360° turns in the process. | ||
<br clear="all"> | <br clear="all"> | ||
[[image:calibration6.png|thumb|200px|link= | [[image:calibration6.png|thumb|200px|link={{SERVER}}/wiki/images/8/88/Calibration6.png]] | ||
* | *The calibration tool will automatically write these values to the Flash memory on board and are remembered until the device is calibrated again. | ||
<br clear="all"> | <br clear="all"> | ||
Revision as of 14:15, 20 June 2013
Go to this device's product page |
Getting Started
Checking the Contents
You should have received:
|
||
Connecting the Pieces
Connect the PhidgetSpatial 3/3/3 to your PC using the Mini-B USB cable. |
| |
Testing Using Windows 2000 / XP / Vista / 7
Make sure you have the current version of the Phidget library installed on your PC. If you don't, follow these steps:
- Go to the Quick Downloads section on the Windows page
- Download and run the Phidget21 Installer (32-bit, or 64-bit, depending on your system)
- You should see the icon on the right hand corner of the Task Bar.
Running Phidgets Sample Program
Double clicking on the icon loads the Phidget Control Panel; we will use this program to ensure that your new Phidget works properly.
The source code for the Spatial-full sample program can be found in the quick downloads section on the C# Language Page. If you'd like to see examples in other languages, you can visit our Languages page.
Updating Device Firmware
If an entry in this list is red, it means the firmware for that device is out of date. Double click on the entry to be given the option of updating the firmware. If you choose not to update the firmware, you can still run the example for that device after refusing.
Double Click on the icon to activate the Phidget Control Panel and make sure that the Phidget Spatial 3/3/3 is properly attached to your PC. |
||
|
Testing Using Mac OS X
- Go to the Quick Downloads section on the Mac OS X page
- Download and run the Phidget OS X Installer
- Click on System Preferences >> Phidgets (under Other) to activate the Preference Pane
- Make sure that the Phidget Spatial 3/3/3 is properly attached.
- Double Click on Phidget Spatial 3/3/3 in the Phidget Preference Pane to bring up the Spatial-full Sample program. This program will function in a similar way as the Windows version.
Using Linux
For a step-by-step guide on getting Phidgets running on Linux, check the Linux page.
Using Windows Mobile / CE 5.0 / CE 6.0
Technical Details
3-Axis Accelerometer
The PhidgetSpatial 3/3/3 has a 3-Axis accelerometer that can measure ±8 g (±78 m/s2) per axis. It will measure both dynamic acceleration (change in velocity) and static acceleration (gravity vector).
For more information on how to use the accelerometer, check the Accelerometer Primer.
3-Axis Gyroscope
For more information on the gyroscope, see the Gyroscope Primer.
3-Axis Magnetometer (Compass)
The magnetometer reports the sum of all magnetic fields acting on the 1042 device. The earth’s magnetic field is only one source that affects this measurement. In order to get accurate bearing data from the magnetometer - ie. to find magnetic north as a compass - any interfering magnetic effects need to be calibrated out. For more information about calibration, see the section below, or the Compass Primer.
Any magnetic field that is stationary with respect to the 1042 device, and less than ± 3 Gauss, can be calibrated out of the magnetic field measurement. This includes both hard and soft iron effects caused by nearby ferrous and magnetic materials. Interfering magnetic fields that vary in strength and orientation with respect to the 1042 device cannot be easily calibrated out.
Magnetic field data will become unavailable during every other sample as the compass performs internal calibrations. When this happens, the magneticField array in the SpatialData structure will either have a length of zero, or each element will equal PUNK_DBL
, depending on the API being used. This needs to be handled explicitly in the event handling code to avoid erroneous program behavior. The maximum sampling rate of the compass is 125 Hz.
Magnetic Error Correction (Calibration)
In order to get numbers of useful accuracy from the 1042's compass you will need to provide calibration parameters. To make determining them easy, we distribute a program with our drivers that does this for you.
To calibrate your compass:
- Navigate to the Phidgets installation folder on your computer. Open the 'examples' folder and find the Compass Calibrator program.
- Start the program and find the link in the Settings/Status text box. Go to the website listed. (http://www.ngdc.noaa.gov/geomag-web/#igrfwmm)
- Select your country and city. Click 'Get Location' and then 'Compute'. A table of values will show up in an overlaid window. The value you will need is the 'Total Field' value in nT.
- Enter the magnetic field value into the calibration program.
- Depending on what your application is this step as well as the next step might be a bit different. If you are intending on mounting the 1044 onto a large vehicle such as a car then you should mount the 1044 securely to the vehicle in its final intended position then check the 2-axis bubble, click the 'Start' button.
- If you are using a smaller, more easily handled vehicle such as a small robot (something you could physically pick up) you will mount the 1044 and use the 3-axis calibration instead. Click 'Start'.
- Rotate the compass around (including whatever equipment you have mounted it to) such that the red dots being generated on screen outline as much of a full sphere (in 3-axis) as possible. This will take several minutes. Being perfect is not necessary but try to be as thorough as time permits. Once done, click stop.
- If you are in a large vehicle, you will be aiming to fill out a disc instead of a sphere. This can be done by simply driving around for a few minutes making sure to do complete 360° turns in the process.
- The calibration tool will automatically write these values to the Flash memory on board and are remembered until the device is calibrated again.
For more information on magnetometers (compasses), see the Compass Primer.
API
Data Structures
SpatialData {
- double acceleration[3];
- double angularRate[3];
- double magneticField[3];
- Timestamp time;
};
Timestamp {
- int seconds; -time since attach event
- int microseconds; -time since last second
};
The SpatialData Structure is used by the OnSpatialData event. This contains acceleration data, angular rate data, magnetic field data, and a timestamp. The timestamp is an accurate measurement streamed from the hardware,and can be trusted over a local software timestamp. This timestamp is generally used for integrating angular rate into a heading over time.