Re: [UDB-dev] Magnetometer, location, location, locat

瀏覽次數:60 次
跳到第一則未讀訊息

Peter Hollands

未讀,
2012年9月27日 凌晨2:31:452012/9/27
收件者:uavdevb...@googlegroups.com

Just to add to Bill's comments. Without a magnetometer, True plane heading is derived from the GPS ground heading adjusted for wind strength and direction. One of the amazing features of MatrixPilot is the effectiveness  of  Bill's algorithm for calculating wind vectors any time the plane flies a curve. ( wonderful and inventive maths formulated in Bill's creative moments while walking the dog. ). (remember to credit the dog in the source code). The GPS / wind derived heading is more accurate and consistent than the magnetometer.

The Mag is vital when GPS ground speed is close to zero; strong head wind, hover, pre-take-off on runway.

I am not sure what happens when a strong headwind causes plane to go backwards.

A hybrid algorithm which smoothly used both sources for heading, and which understood their relative accuracy would be ideal. Another idea on the to do list.

Best wishes Pete


On 27 Sep 2012 02:31, "DB" <dber...@gmail.com> wrote:
Hi Bill.
 
Life is a continuing university.. and thanks for making it excitingly more so.  This group and thread has had me into very interesting new fields as well as the push to relearning old ones.. 
 
Magnetometer sounds like a handfull to manage  and all your explanation and recommendations certainly will give me essentially what I need to get it working more effectively. 
 
I do use the latest revisions, e.g., right now have r1714 as (final-freeze) baseline for the enhancements:  LOGO functions and use of sonar, Pete, Ben and I are in the loop for.  I also have auto-takeoff and a lot of direction/angle related conditions in my LOGO flight plans that I'm hoping the magnetometer can add accuracy to.
 
It's good to know of its issues on  misalignment.  And also your explanation, analysis and fix that should minimize the effects, not that I understand all (wish I did ;o) particularly the cosine matrix and linear algebra.. Tried to go through the formulas but right now gives me a headache, if I try too hard. I think I better leave these matters to your (as well as others in the group) genius and scientific expertise.
 
I'll test flight a direct attached, with increased diligence in making sure of the alignments and also isolation from any source of emi. And flying with the mag moiunted outside of the fuse and will report back on the results, as soon as the weather permits.
 
All the best.
Daniel
 
On Wednesday, September 26, 2012 7:09:06 PM UTC-4, William Premerlani wrote:
Hi Daniel,

The good location for the magnetometer is away from power wires, "soft iron", or magnets (such as in the motors). I think the best location for the magnetometer is to leave it home on your desk. Personally, for fixed wing aircraft, I think navigation performance is better without a magnetometer. I do not use one, in any case. The only reason you might want to use one is for autonomous takeoff.

One issue with the magnetometers is that the newer Honeywell magnetometer, the HMC5883L, as much larger offsets than the older one, the HMC5843.

If you do use a magnetometer, I recommend you use the latest version of MatrixPilot from the repository, to take advantage of firmware changes that were made to compensate for a couple of magnetometer issues.

One issue is magnetometer offsets. Here is a discussion of the method that we are presently using to compensate for offsets in flight, that was implemented in October of 2011.

Another issue, particularly if you mount the magnetometer separately from the UDB, is alignment of the magnetometer relative to the gyros and accelerometers on the UDB. A slight misalignment can lead to large errors. Here is a discussion of the method that we are presently using to compensate for magnetometer misalignment, that was also implemented in October of 2001.

To take advantage of these improvements to the magnetometer firmware, you need to either use MatrixPilot released versin 3.2.1, or revision r1067 or newer from the repository.

In any case, you might want to read the discussions to better understand the issues.

Best regards,
Bill Premerlani


On Wed, Sep 26, 2012 at 12:54 AM, DB <dber...@gmail.com> wrote:
Greetings.
 
It has just been brought to my attention by the very patient and thoughtful accommodations  of Pete, how critical it is to isolate the magnetometer from any emi, however slight it is, vis-a-vis, the analysis of the log's kml turning on Google Earth's Earth Magnetic Vectors. 
 
My magnetometer is directly mounted on UDB4 and is miles away (so I thought) from any source of heavy emi (motor, esc, volt reg., RX, PPM encoder, open log,  video TX, and OSD). 
 
But having seen the vectors (didn't know about this until now), I think even the servo wires passing by about half an inch away is enough to throw off the magnetometer. This is pretty apparent comparing Pete's (magnetometer on the wing) to my Google Earth's flight report (Pete, hope you don't mind.., pls. see attached images).
 
So, now I'm relocating the magnetometer perhaps on one of the wings, per Pete's example and best practice. The disadvantage of this is in my case, is my Ventus has 2 pc. wing... An alternate loc. perhaps is near the t-tail on top of fuse? 
 
Any thoughts on best alternate locations?
 
All the best.
Daniel
 
 

William Premerlani

未讀,
2012年9月27日 上午9:17:462012/9/27
收件者:uavdevb...@googlegroups.com
Hi Peter,

Just to follow up on a couple of the topics you mentioned.

Regarding strong headwinds with the plane going backwards with respect to the ground, I have tested that, it works just fine, because it is the air velocity vector, not the ground velocity vector, that is used for yaw drift compensation.

Regarding zero ground speed, that is not an issue without a magnetometer. I have done both testing and analysis to show that as well. That is because when the ground speed is close to zero, there is a strong sideways acceleration of the plane that correlates with the yaw attitude of the plane. Again, the key parameter is airspeed, not ground speed. In other words, although the ground speed can be approximately zero in some cases, it will not be identically zero.

In the case when the plane is perfectly stationary, that is not a problem either (again, testing and analysis demonstrate it), provided the wind does not change direction. Again, because its airspeed, not ground speed, that is important.

The only necessary condition for everything to work ok with zero ground speed is that the plane makes a few turns after takeoff to compute the wind. But that is required in any case.

Regarding a fusion of GPS and magnetometer yaw information with a hybrid algorithm, that is a good idea.

Best regards,
Bill
訊息已遭刪除

DB

未讀,
2012年9月27日 上午10:58:502012/9/27
收件者:uavdevb...@googlegroups.com

Greetings Pete, Bill.

 

The mag fusion hybrid algorithm sounds like the great way to go, logically.

 

I'd like to add, the same with your recommendation to fuse sonar altitude to dead reckoning algorithm at the range of its accuracy (c. 4m alt).

 

Looking at my collection of flight log, Google earth analysis reports, there seem to be a consistent variance between IMU, GPS and Google earth (ground), indicated altitude relative to the sea level. At times, GPS goes underground if not above by a few meters, ....Hardly dependable and reassuring, to control a landing trajectory.

 

So, adding the sonar altitude to the dead reckoning algorithm will probably minimize the altitude variance (risk of plowing the plane on the ground) in using the ALT_~ controls in LOGO to ensure an appropriate plane pitch/speed/thrust relative to near ground altitude, while managing an auto landing trajectory. In this scenario, giving sonar altitude priority over GPS and IMU

makes logical sense as well.

 

I'd like to help, volunteer sometime do some of the code changes, and learn in the process, if possible. I've been looking at the UDB DCM libraries and found the codes details and structure mind-boggling, even with the smart models and class diagrams I've reversed engineered. Perhaps you can give me some hint on were to start (..time travel back to high school days and pay more serious attention to trigonometry, instead of looking at the pretty..., might be a good start ;o)?

 

I think I'll walk the dog and see if a pinch or spark of knowledge might rub on, before heading out to the fields.

 

Have a great weekend!

 

Kindest regards.

Daniel

DB

未讀,
2012年9月30日 晚上11:58:022012/9/30
收件者:uavdevb...@googlegroups.com
Greetings all.
 
Following recommendations (including, following Bill's example of walking the dog, I happen to have one too ~;o) and also complementary to the inputs, happy to report that today's test flights resulted to day and night difference of new mag location per attached images.
 
Thanks for all the thoughtful recommendations, and continued sharing of your amazing geniuses.
 
All the best.
Daniel
Lady.jpg
1F_MagChk_VarModes.JPG

William Premerlani

未讀,
2012年10月1日 上午9:11:102012/10/1
收件者:uavdevb...@googlegroups.com
Hi Daniel,
Thanks for the feedback. The evidence is growing that the "direct connection" of a magnetometer to the UDB4 is not such a great idea, because of magnetic interference, possibly from either the UDB, or from the servo wires.
Best regards,
Bill

DB

未讀,
2012年10月1日 晚上9:44:302012/10/1
收件者:uavdevb...@googlegroups.com
Hi Bill.
 
Thanks, its good to know others share the same experience. 
 
With a reliable magnetometer data, would it be best now to switch on the NEW_ACCELERATION_COMPENSATION to lend a more accurate navigation?
 
Cheers.
Daniel

William Premerlani

未讀,
2012年10月1日 晚上10:37:202012/10/1
收件者:uavdevb...@googlegroups.com
Hi Daniel,

No, do not use NEW_ACCELERATION_COMPENSATION in MatrixPilot, for the following reasons:

1. The version that is in the repository right now does not work very well. I am presently working with the ArduCopter team to develop a better version. The ArduCopter team is testing it on quads.
2. Even when its finished, the NEW_ACCELERATION_COMPENSATION is of little value for fixed wing aircraft, it really is only of any use for quads and such. The only reason it was in MatrixPilot was for testing purposes. It is easier and safer to test it on fixed wing.

In fact, I am probably going to eventually remove NEW_ACCELERATION_COMPENSATION from MatrixPilot entirely. Once I have a version that works well, I will merge it with Mark Whitehorn's quadcopter code.

Best regards,
Bill

DB

未讀,
2012年10月2日 凌晨3:02:052012/10/2
收件者:uavdevb...@googlegroups.com
Hi Bill.  Thanks for the advice. Much appreciated. Daniel

DB

未讀,
2012年10月3日 晚上7:22:382012/10/3
收件者:uavdevb...@googlegroups.com
Greetings all.
 
I just want to keep everyone concerned posted on the results of my 3 flight yesterday (in addition to my other 3 flights the day before).  All 6 flights indicated perhaps conclusively,  of the magenetometer's  (HMC5883L from sparkfun) accuracy when:
   1) it is mounted carefuly  aligned to UDB4's IMU and
   2) on a location ISOLATED from any magnetic intereference. 
 
In my case the magnetormeter worked perfectly well when located under the wing as per attached image, thanks to Pete's recommedation.
 
Hope this helps.
 
Cheers.
Daniel

On Thursday, September 27, 2012 2:31:46 AM UTC-4, Pete wrote:
BrzUnder00.jpg

Peter Hollands

未讀,
2012年10月4日 凌晨1:27:582012/10/4
收件者:uavdevb...@googlegroups.com
Hi Danial,

Thanks very much for documenting the improvements for your plane in re-siting the magnetometer in the wing.

Best wishes, Pete

DB

未讀,
2012年10月4日 晚上9:06:592012/10/4
收件者:uavdevb...@googlegroups.com
Always a pleasure, Pete.  Cheers. Daniel

Mark Whitehorn

未讀,
2012年10月11日 上午10:29:492012/10/11
收件者:uavdevb...@googlegroups.com
Here's a discussion of the effects of ferrous materials and current-carrying conductors near magnetometers:
http://blogs.freescale.com/2012/10/03/magnetometer-placement-where-and-why/

He suggests that 5mA is the max allowable current in a conductor 1cm from the magnetometer.
(this is assuming a limit of .1 microTesla for the field strength at the sensor)

73,
--Mark

crashmatt

未讀,
2012年10月11日 下午1:30:202012/10/11
收件者:uavdevb...@googlegroups.com
Mark,

That's interesting.  That puts minimum distance for my 2.4kW, 100A motor at 400meters.  This doesn't seem realistic.

One significant but neglected point is that the wire has its partner ground return which has the same magnetic field in the opposite direction.

It also assumes that the length of conductor carrying the current is long compared to the distance of separation.

Regards Matt
回覆所有人
回覆作者
轉寄
0 則新訊息