r1053 of MatrixPilot trunk has an improvement to the magnetometer calculations to automatically compensate for misalignment of the magnetometer. If you are using a magnetometer with the UDB, you would do well to use this latest version.
Because the UDB and the magnetometer are mounted separately, it is possible for there to be a slight misalignment between the two. Because of the strong vertical component of the earth's magnetic field in many parts of the world, the errors due to misalignment get magnified. For example, where I fly, the vertical component of the magnetic field is 3 times as large as the horizontal component. So, for example, a 5 degree roll or pitch misalignment between the UDB and the magnetometer can produce a 15 degree error in the yaw information provided by the magnetometer.
Fortunately, there is enough information during rotation of the plane to determine the misalignment. The misalignment causes a shift in the computed magnetic field in the earth frame of reference. The shift serves as the starting point for calculations that infer the misalignment. I have revised the MatrixPilot magnetometer driver to compute, and correct for slight misalignment of the magnetometer. The result is improved accuracy in those situations in which the magnetometer alignment is not precise.
For those who might be interested in how the adjustments are computed, I plan to eventually write a paper on the subject.
> r1053 of MatrixPilot trunk has an improvement to the magnetometer > calculations to automatically compensate for misalignment of the > magnetometer. If you are using a magnetometer with the UDB, you would do > well to use this latest version.
> Because the UDB and the magnetometer are mounted separately, it is possible > for there to be a slight misalignment between the two. Because of the strong > vertical component of the earth's magnetic field in many parts of the world, > the errors due to misalignment get magnified. For example, where I fly, the > vertical component of the magnetic field is 3 times as large as the > horizontal component. So, for example, a 5 degree roll or pitch misalignment > between the UDB and the magnetometer can produce a 15 degree error in the > yaw information provided by the magnetometer.
> Fortunately, there is enough information during rotation of the plane to > determine the misalignment. The misalignment causes a shift in the computed > magnetic field in the earth frame of reference. The shift serves as the > starting point for calculations that infer the misalignment. I have revised > the MatrixPilot magnetometer driver to compute, and correct for slight > misalignment of the magnetometer. The result is improved accuracy in those > situations in which the magnetometer alignment is not precise.
> For those who might be interested in how the adjustments are computed, I > plan to eventually write a paper on the subject.
Team, I made a couple of additional minor revisions to the magnetometer yaw drift compensation that will further improve performance. If you are using a magnetometer, I recommend r1055 of MatrixPilot trunk. Morli, I always enjoy hearing from you. I hope that you are having fun. Best regards, Billu Bhaya
On Mon, Oct 10, 2011 at 2:16 PM, Murali- VU3MUV <vu3...@gmail.com> wrote: > Thanks Billu Bhaya & team for continues improvements to MP, it gets better > and better . All we folks can do is fly it and have fun.
> Kind regards > Morli
> On Mon, Oct 10, 2011 at 8:14 AM, William Premerlani <wpremerl...@gmail.com > > wrote:
>> Team,
>> r1053 of MatrixPilot trunk has an improvement to the magnetometer >> calculations to automatically compensate for misalignment of the >> magnetometer. If you are using a magnetometer with the UDB, you would do >> well to use this latest version.
>> Because the UDB and the magnetometer are mounted separately, it is >> possible for there to be a slight misalignment between the two. Because of >> the strong vertical component of the earth's magnetic field in many parts of >> the world, the errors due to misalignment get magnified. For example, where >> I fly, the vertical component of the magnetic field is 3 times as large as >> the horizontal component. So, for example, a 5 degree roll or pitch >> misalignment between the UDB and the magnetometer can produce a 15 degree >> error in the yaw information provided by the magnetometer.
>> Fortunately, there is enough information during rotation of the plane to >> determine the misalignment. The misalignment causes a shift in the computed >> magnetic field in the earth frame of reference. The shift serves as the >> starting point for calculations that infer the misalignment. I have revised >> the MatrixPilot magnetometer driver to compute, and correct for slight >> misalignment of the magnetometer. The result is improved accuracy in those >> situations in which the magnetometer alignment is not precise.
>> For those who might be interested in how the adjustments are computed, I >> plan to eventually write a paper on the subject.
I made yet a few more improvements to the magnetometer software in r1060 of MatrixPilot trunk. At this point I am completely satisfied with it, I don't think there are any more improvements possible. In any case, I am now going to move on to the next research topic on my list, after I write up a report.
Here are the changes in r1060:
1. There is a completely new magnetometer offset removal algorithm that is more accurate than the previous one in the face of magnetometer misalignment.
2. Realignment is done with a full rotation matrix that can handle any amount of misalignment.
Attached are a few plots of the test results, including cases of magnetometer yaw misalignment of 10, 90 and 180 degrees.
In other words, with the new software, you can mount the magnetometer in any orientation whatsoever, and the software can figure it out and compensate perfectly. That said, you should mount your magnetometer within 10 degrees of the correct alignment, that way the software will compensate for the misalignment more quickly.
Best regards, Bill
On Wed, Oct 12, 2011 at 5:43 PM, William Premerlani <wpremerl...@gmail.com>wrote:
> Team, > I made a couple of additional minor revisions to the magnetometer yaw drift > compensation that will further improve performance. If you are using a > magnetometer, I recommend r1055 of MatrixPilot trunk. > Morli, > I always enjoy hearing from you. I hope that you are having fun. > Best regards, > Billu Bhaya
> On Mon, Oct 10, 2011 at 2:16 PM, Murali- VU3MUV <vu3...@gmail.com> wrote:
>> Thanks Billu Bhaya & team for continues improvements to MP, it gets better >> and better . All we folks can do is fly it and have fun.
>> Kind regards >> Morli
>> On Mon, Oct 10, 2011 at 8:14 AM, William Premerlani < >> wpremerl...@gmail.com> wrote:
>>> Team,
>>> r1053 of MatrixPilot trunk has an improvement to the magnetometer >>> calculations to automatically compensate for misalignment of the >>> magnetometer. If you are using a magnetometer with the UDB, you would do >>> well to use this latest version.
>>> Because the UDB and the magnetometer are mounted separately, it is >>> possible for there to be a slight misalignment between the two. Because of >>> the strong vertical component of the earth's magnetic field in many parts of >>> the world, the errors due to misalignment get magnified. For example, where >>> I fly, the vertical component of the magnetic field is 3 times as large as >>> the horizontal component. So, for example, a 5 degree roll or pitch >>> misalignment between the UDB and the magnetometer can produce a 15 degree >>> error in the yaw information provided by the magnetometer.
>>> Fortunately, there is enough information during rotation of the plane to >>> determine the misalignment. The misalignment causes a shift in the computed >>> magnetic field in the earth frame of reference. The shift serves as the >>> starting point for calculations that infer the misalignment. I have revised >>> the MatrixPilot magnetometer driver to compute, and correct for slight >>> misalignment of the magnetometer. The result is improved accuracy in those >>> situations in which the magnetometer alignment is not precise.
>>> For those who might be interested in how the adjustments are computed, I >>> plan to eventually write a paper on the subject.
*thanks Billu Bhaiya, Yes we are all having fun , a ton of it is just because of you as always ( other ton/s are because of the team as we know). I can only imagine like most of us as to how many hours of mathematics/brain storming goes into these improvements.I only wish I can understand it. I am waiting for right tide to wash me into right current sooner or later. Once again wishing every one best and happy Indian Depawali ( a celebration with/ of fire crackers and lights). It is either magnetometer or UDB4 for me this this festive season :))))
kind regards Morli
* On Thu, Oct 13, 2011 at 3:13 AM, William Premerlani <wpremerl...@gmail.com>wrote:
> Team, > I made a couple of additional minor revisions to the magnetometer yaw drift > compensation that will further improve performance. If you are using a > magnetometer, I recommend r1055 of MatrixPilot trunk. > Morli, > I always enjoy hearing from you. I hope that you are having fun. > Best regards, > Billu Bhaya
> On Mon, Oct 10, 2011 at 2:16 PM, Murali- VU3MUV <vu3...@gmail.com> wrote:
>> Thanks Billu Bhaya & team for continues improvements to MP, it gets better >> and better . All we folks can do is fly it and have fun.
>> Kind regards >> Morli
>> On Mon, Oct 10, 2011 at 8:14 AM, William Premerlani < >> wpremerl...@gmail.com> wrote:
>>> Team,
>>> r1053 of MatrixPilot trunk has an improvement to the magnetometer >>> calculations to automatically compensate for misalignment of the >>> magnetometer. If you are using a magnetometer with the UDB, you would do >>> well to use this latest version.
>>> Because the UDB and the magnetometer are mounted separately, it is >>> possible for there to be a slight misalignment between the two. Because of >>> the strong vertical component of the earth's magnetic field in many parts of >>> the world, the errors due to misalignment get magnified. For example, where >>> I fly, the vertical component of the magnetic field is 3 times as large as >>> the horizontal component. So, for example, a 5 degree roll or pitch >>> misalignment between the UDB and the magnetometer can produce a 15 degree >>> error in the yaw information provided by the magnetometer.
>>> Fortunately, there is enough information during rotation of the plane to >>> determine the misalignment. The misalignment causes a shift in the computed >>> magnetic field in the earth frame of reference. The shift serves as the >>> starting point for calculations that infer the misalignment. I have revised >>> the MatrixPilot magnetometer driver to compute, and correct for slight >>> misalignment of the magnetometer. The result is improved accuracy in those >>> situations in which the magnetometer alignment is not precise.
>>> For those who might be interested in how the adjustments are computed, I >>> plan to eventually write a paper on the subject.
Thanks. This time I became obsessed, and spent most of 3 weeks thinking about magnetometer alignment, and coming up with better and better ideas. Most of the creative thinking was done while I was bicycling.
On Fri, Oct 14, 2011 at 2:29 PM, Murali- VU3MUV <vu3...@gmail.com> wrote: > *thanks Billu Bhaiya, > Yes we are all having fun , a ton of it is just because of you as always ( > other ton/s are because of the team as we know). I can only imagine like > most of us as to how many hours of mathematics/brain storming goes into > these improvements.I only wish I can understand it. I am waiting for right > tide to wash me into right current sooner or later. Once again wishing > every one best and happy Indian Depawali ( a celebration with/ of fire > crackers and lights). It is either magnetometer or UDB4 for me this this > festive season :))))
I will read your paper with great interest. Looking forward to take part of your outstanding creativity!
Just a pity you aren't that interested in helicopters ;-)
Soon it's full winter here and I will then take up the part of my project where I left it last spring, when the "moblie GCS" was bought. It has taken all my "useable" time to get in shape. Today finally, it passed the certification inspection and is now fully road legal. Now it's time to continue with the flying part of the project. I'm REALLY looking forward to the UDB4 to get much needed I/O for my "needs".
I also have a little surprise coming that hopefully will be good news for parts of the UDB community ;-)
Best regards and all my best wishes!
// Marc
Sent from a mobile device with a development Linux / "Android" kernel.
----- Opprinnelig melding ----- Fra: William Premerlani <wpremerl...@gmail.com> Sendt: 15. oktober 2011 00:59 Til: uavdevboard@googlegroups.com Emne: Re: automatic inflight magnetometer alignment
Hi Morli,
Thanks. This time I became obsessed, and spent most of 3 weeks thinking about magnetometer alignment, and coming up with better and better ideas. Most of the creative thinking was done while I was bicycling.
If anyone is interested, I am writing two technical reports on the subject. The first one, a short report on the subject of a better way to remove magnetometer offsets, is finished. Here is a link.
Tomorrow I will start the second, longer one, on the subject of automatically adjusting for magnetometer misalignment.
Best regards, Bill
On Fri, Oct 14, 2011 at 2:29 PM, Murali- VU3MUV <vu3...@gmail.com> wrote:
thanks Billu Bhaiya, Yes we are all having fun , a ton of it is just because of you as always ( other ton/s are because of the team as we know). I can only imagine like most of us as to how many hours of mathematics/brain storming goes into these improvements.I only wish I can understand it. I am waiting for right tide to wash me into right current sooner or later. Once again wishing every one best and happy Indian Depawali ( a celebration with/ of fire crackers and lights). It is either magnetometer or UDB4 for me this this festive season :))))
Good to hear from you, and good luck to you in your endeavors...
I have not forgotten about helicopters, its just that I get so easily distracted with other things.
I have built my own quad as a stepping stone to helis. Its flying quite nicely in stabilized mode, but its been on the "back burner" for a while. I have one more research topic to look into before getting back to it.
The nice thing is I can always fly the quad in my garage, and even in the wintertime on most days I can fly it in my driveway, so its going to be my winter project.
Best regards, Bill
On Fri, Oct 14, 2011 at 7:32 PM, Marcus Fahlén <marcus.fah...@gmail.com>wrote:
> I will read your paper with great interest. Looking forward to take part of > your outstanding creativity!
> Just a pity you aren't that interested in helicopters ;-)
> Soon it's full winter here and I will then take up the part of my project > where I left it last spring, when the "moblie GCS" was bought. It has taken > all my "useable" time to get in shape. Today finally, it passed the > certification inspection and is now fully road legal. Now it's time to > continue with the flying part of the project. I'm REALLY looking forward to > the UDB4 to get much needed I/O for my "needs".
> I also have a little surprise coming that hopefully will be good news for > parts of the UDB community ;-)
> Best regards and all my best wishes!
> // Marc
> Sent from a mobile device with a development Linux / "Android" kernel.
> Thanks. This time I became obsessed, and spent most of 3 weeks thinking > about magnetometer alignment, and coming up with better and better ideas. > Most of the creative thinking was done while I was bicycling.
> Tomorrow I will start the second, longer one, on the subject of > automatically adjusting for magnetometer misalignment.
> Best regards, > Bill
> On Fri, Oct 14, 2011 at 2:29 PM, Murali- VU3MUV <vu3...@gmail.com> wrote:
>> *thanks Billu Bhaiya, >> Yes we are all having fun , a ton of it is just because of you as always ( >> other ton/s are because of the team as we know). I can only imagine like >> most of us as to how many hours of mathematics/brain storming goes into >> these improvements.I only wish I can understand it. I am waiting for right >> tide to wash me into right current sooner or later. Once again wishing >> every one best and happy Indian Depawali ( a celebration with/ of fire >> crackers and lights). It is either magnetometer or UDB4 for me this this >> festive season :))))
Congrats Bill on another fantastic feature addition. Your analysis,
design, math, and coding work never cease to amaze!
A little question... I'm wondering if an optional misalignment 'hint'
setting might be useful so that the algorithm might compensate more
quickly. This would be for cases in which the magnetometer is
intentionally misaligned (by say 180 degrees).
Thanks again for all the great work!
BTW, I just posted a video that shows the ailerons and elevator
control surfaces during an aggressive flight of my HawkSky. The flight
includes several steep rolling dives and barrel rolls. Recovery from
each maneuver is controlled entirely by the UDB, since I let go of the
controls at the end of each one. It's interesting to see how fast the
control surfaces respond and how quickly the plane recovers to stable
level flight.
> I made yet a few more improvements to the magnetometer software in r1060 of
> MatrixPilot trunk. At this point I am completely satisfied with it, I don't
> think there are any more improvements possible. In any case, I am now going
> to move on to the next research topic on my list, after I write up a report.
> Here are the changes in r1060:
> 1. There is a completely new magnetometer offset removal algorithm that is
> more accurate than the previous one in the face of magnetometer
> misalignment.
> 2. Realignment is done with a full rotation matrix that can handle any
> amount of misalignment.
> Attached are a few plots of the test results, including cases of
> magnetometer yaw misalignment of 10, 90 and 180 degrees.
> In other words, with the new software, you can mount the magnetometer in any
> orientation whatsoever, and the software can figure it out and compensate
> perfectly. That said, you should mount your magnetometer within 10 degrees
> of the correct alignment, that way the software will compensate for the
> misalignment more quickly.
> Best regards,
> Bill
> On Wed, Oct 12, 2011 at 5:43 PM, William Premerlani
> <wpremerl...@gmail.com>wrote:
> > Team,
> > I made a couple of additional minor revisions to the magnetometer yaw drift
> > compensation that will further improve performance. If you are using a
> > magnetometer, I recommend r1055 of MatrixPilot trunk.
> > Morli,
> > I always enjoy hearing from you. I hope that you are having fun.
> > Best regards,
> > Billu Bhaya
> > On Mon, Oct 10, 2011 at 2:16 PM, Murali- VU3MUV <vu3...@gmail.com> wrote:
> >> Thanks Billu Bhaya & team for continues improvements to MP, it gets better
> >> and better . All we folks can do is fly it and have fun.
> >> Kind regards
> >> Morli
> >> On Mon, Oct 10, 2011 at 8:14 AM, William Premerlani <
> >> wpremerl...@gmail.com> wrote:
> >>> Team,
> >>> r1053 of MatrixPilot trunk has an improvement to the magnetometer
> >>> calculations to automatically compensate for misalignment of the
> >>> magnetometer. If you are using a magnetometer with the UDB, you would do
> >>> well to use this latest version.
> >>> Because the UDB and the magnetometer are mounted separately, it is
> >>> possible for there to be a slight misalignment between the two. Because of
> >>> the strong vertical component of the earth's magnetic field in many parts of
> >>> the world, the errors due to misalignment get magnified. For example, where
> >>> I fly, the vertical component of the magnetic field is 3 times as large as
> >>> the horizontal component. So, for example, a 5 degree roll or pitch
> >>> misalignment between the UDB and the magnetometer can produce a 15 degree
> >>> error in the yaw information provided by the magnetometer.
> >>> Fortunately, there is enough information during rotation of the plane to
> >>> determine the misalignment. The misalignment causes a shift in the computed
> >>> magnetic field in the earth frame of reference. The shift serves as the
> >>> starting point for calculations that infer the misalignment. I have revised
> >>> the MatrixPilot magnetometer driver to compute, and correct for slight
> >>> misalignment of the magnetometer. The result is improved accuracy in those
> >>> situations in which the magnetometer alignment is not precise.
> >>> For those who might be interested in how the adjustments are computed, I
> >>> plan to eventually write a paper on the subject.
Regarding Phil's suggestion of the possibility of providing a "hint" to the algorithm, that would be rather easy to do, if there is any interest. It basically boils down to whether or not MatrixPilot supports mounting orientation options for the magnetometer. So far, I do not recall anyone asking for any other mounting orientation other than the "standard" one, with the component side of the board facing up, and the connection facing forward. If anyone wants options for other orientations, please speak up.
> Regarding Phil's suggestion of the possibility of providing a "hint" to the > algorithm, that would be rather easy to do, if there is any interest. It > basically boils down to whether or not MatrixPilot supports mounting > orientation options for the magnetometer. So far, I do not recall anyone > asking for any other mounting orientation other than the "standard" one, > with the component side of the board facing up, and the connection facing > forward. If anyone wants options for other orientations, please speak up.
I have made another update to the magnetometer alignment software. I fixed a bug that was in r1060. The latest version is now in r1062 of MatrixPilot, trunk, use it instead of r1060 if you are using a magnetometer.
There will be another revision in probably a few days to support several mounting orientations for the magnetometer.
I'm really looking forward to hook up my lab environment again! Now with a tested and working UDB...
The T3 competition provided me with both the MediaTek GPS and one magnetometer that isn't tested yet.
If I understood correctly the MediaTek is now fully supported and works well?
I have also bought a barometer chip from SparkFun that I will test together with the UDB and Dragon Labs OSD that is a really nice bit of PIC based hardware which will be loaded with UDB customized firmware in not too long... This will make it possible to use the UDB telemetry data for it's sensor input instead of needing a separate set of IMU and other sensors. Hopefully a feature that will benefit more of the members of our community.
Best wishes!
///Marc
----- Opprinnelig melding ----- Fra: William Premerlani <wpremerl...@gmail.com> Sendt: 18. oktober 2011 06:32 Til: uavdevboard@googlegroups.com Emne: Re: automatic inflight magnetometer alignment
Team,
I have made another update to the magnetometer alignment software. I fixed a bug that was in r1060. The latest version is now in r1062 of MatrixPilot, trunk, use it instead of r1060 if you are using a magnetometer.
There will be another revision in probably a few days to support several mounting orientations for the magnetometer.
I have added four options for the mounting orientation of the magnetometer, now available in r1067 MatrixPilot trunk.
The four options are the "flat" ones: forwards, backwards, inverted, and flipped. Select the magnetometer, and the orientation, in the magnetometer options file in the UDB headers subdirectory.
Align the magnetometer to the UDB to within 45 degrees of the target orientation.
> I have added four options for the mounting orientation of the magnetometer,
> now available in r1067 MatrixPilot trunk.
> The four options are the "flat" ones: forwards, backwards, inverted, and
> flipped. Select the magnetometer, and the orientation, in the magnetometer
> options file in the UDB headers subdirectory.
> Align the magnetometer to the UDB to within 45 degrees of the target
> orientation.