Testing a DIYDrones magnetometer in HK's GCS from Pete Hollands on Vimeo.
I test the DIY Drones magnetometer ( HMC5843 magnetometer breakout board ) using Happy Killmore's Ground Control Station connected using SERIAL_UDB_EXTRA telemetry format, to a UAV DevBoard V3 running
MatrixPilot (revision 729 of trunk).
photos:
picasaweb.google.com/peter.hollands/Twinstar2Build#5547623052830239122
UAVDevBoard / MatrixPilot:
code.google.com/p/gentlenav/wiki/Home?tm=6
HK GCS:
code.google.com/p/happykillmore-gcs/
DIY Drones Store:
store.diydrones.com/HMC5843_Triple_Axis_Magnetometer_p/br-hmc5843-01.htm
Self Calibrating Mathematics, and software to integrate via I2c written by William Premerlani:-
diydrones.com/profile/WilliamPremerlani
Source Code:
code.google.com/p/gentlenav/source/browse/trunk/libUDB/magneto_udb.c
Comments
Pete,
Data is arriving in the comm window and when I click on Hex I get the numbers.
The coloured check boxes don't appear (the whole graph window doesn't appear) unless I click on simulated data and then click the simulated data box again.
No numbers changing, no plotted data.
Don't like Vista!
Bryan, regarding testing the magnetometer using MAVLink and QGroudnControl:
So data is arriving in the Comm Window ?
You can click on Hex and see it arriving as Hexadecimal Numbers ?
The Coloured Check Boxes are appearing (and by the way, they only appear when QGroundControl see's each of those variables arriving in the data stream). ?
None of the Numbers next to any of variables (e.g. accel-x, or the gyros, or the roll, pitch and yaw) are changing ?
I've been testing on Windows XP, and I think most of the developers of QGroundControl are probably on Linux / Mac. So it's possible we have a problem with QGroundControl under Vista (it is an early beta version of the code).
If you could answer the questions above, then I think we could move to the QGroundControl discussion forum to follow this up.
A new version of QGroundControl is due out.
Best wishes, Pete
Hi Pete,
Unfortunately the numbers are not changing next to the check boxes. Also, I've tried clicking on "ground clock".
Happy,
An option to display raw sensor data on your GCS sounds great. Looking forward to trying it out when it's ready.
Thanks guys
Bryan
By the way, since I posted the HK GCS video, Happy has started to support MAVLink as well. So far, I know that his HK GCS will display the roll, yaw and pitch correctly for MAVLink. There is no additional setup to do on HKGCS, it will automatically start interpreting MAVLink if you send that to it. Note: I've only seen the "Easy Star" model working correctly with MAVLink so far.
So again, another test is to fire up MatrixPilot Mavlink with HKGCS. Then, away from local magnetic disturbances, set the plane to be due North and South, so it's easy to see the orientation in the "Easy Star" instrument. Then fire up the motors, and see if the heading changes for the Easy Stgar.
I hope QGroundControl works for you as well, so you can plot the raw magnetic sensor data. It been very interesting to see the raw data.
Bryan,
Can you say whether the figures were changing next to the magnetometer values on the left hand side ? So I'm not talking here about the graph, but the numbers next to the "check box" for the 3 magnetometer vector values.
If the numbers are changing next to the check boxes, then you are nearly there.
To get the live plotting to work, you may need to click on "Ground Clock" under the graph.
Best wishes, Pete
Well Pete,
I downloaded qgroundcontrol and the Mavlink branch of Matrixpilot, set the options.h serial to Mavlink per your video tutorial, set the com port and baud rate and got serial coming into the GCS from Matrixpilot. The problem is I couldn't get the live plotting to work. My goal was to display the live magnetometer data on qgroundcontrol while moving the airframe around the magnetometer to check for magnetic deviation.
I'm running Vista on my laptop and I've set the magnetometer option to "1". Is there something else I'm missing?
Thanks,
Bryan
http://www.magnetic-declination.com/
Looks like Mavlink would be the way to go so I could see the live mag. output and there wouldn't have to be any postprocessing and trying to sinc "position with error" later. That's also a great idea to log a flight and see in FLAN if the plane's attitude from the magnetometer changes with a known throttle change.
Thanks,
Bryan
A an excerpt follows:-
"Why would we want to do the oversampling manually? The reason is that this IMU will be
mounted on a MAV containing electromotors. The strong electromagnetic field generated by
the motors is superimposed on the earth's magnetic field and the magnetic field measurement
is dominated by the field of the motors. The magnetic field of the motors has a maximum
frequency of 300Hz. Based on the sampling theorem the rotary field of the motors can be
completely reconstructed from the digital measurements if the magnetosensor is sampled at
a rate 600Hz. By appropriately low-pass filtering the signal the rotating field components
can be removed from the measurements yielding the direction of the earth's magnetic field.
If we can do this manually on the MCU, we can be sure that the low-pass filter is designed
correctly. If the oversampling is done inside the magnetosensor, we can only hope that high
frequencies are filtered correctly."
-
1
-
2
-
3
of 3 Next