zs6buj / AntTracker

Antenna Tracker for tracking a moving model aircraft or drone with a small high-gain UHF or SHF antenna
GNU General Public License v3.0
141 stars 41 forks source link

Feature Request - Accelerometer input for mag tilt compensation #68

Closed oldrootbeer closed 3 months ago

oldrootbeer commented 3 months ago

As a magnetometer works in 3d, it really needs to ignore the z axis for this project? I guess this can be done by using an accelerometer and maths. I really can't see how a compass on the tracker is useful unless it's calibrated manually in the field using a compass every time.

I'll look into it, but I'm an (very) amateur programmer.

zs6buj commented 3 months ago

This is an interesting idea, and I understand your hypothesis. Let's try to imagine the use-case. If we are talking about the orientation of the tracker box, how likely is it to tilt significantly, and if the z axis delta is significant enough to change the pointing angle of the antenna, how much will that angle deviation affect antenna gain? Imagine the antenna gain plot, likely a lobe in the xy domain. The 3dB loss points are typically about 30 degrees apart, depending on antenna gain of course. 1 dB points might be around 10deg apart. Also, if the tilt is static, the angle error is constant and the box can (possibility) be finely adjusted by hand.

If the tracker box is in fact mounted on an aircraft pointing back to base, where the z component of the magnetometer plane is dynamic, then we might have valid use case.

Another thought: The compass library might already be compensating for tilt. It is a "compass" library after all.

zs6buj commented 3 months ago

One other thing. Remember the box compass simply determines the orientation of the box (and antenna at rest) relative to the world. The GPS co-ordinates are used to calculate where to point in the world.

oldrootbeer commented 3 months ago

I understand your arguments against, as does my friend. I have adjusted the display to show the box heading, which can be mechanically tweeked in the field using a phone compass. But i'll look into it anyway - for fun.

Thank you for your reply

zs6buj commented 3 months ago

All good. Enjoy yourself, but beware, coding is addictive lol