I have a hexacopter with pixhawk 2.4.8 flight controller. I made some flights without problems on guided mode using raspberry pi 4 via Mavlink. The problems started when I installed TF mini s lidar like rangefinder to avoid obstacules using Bendy Ruler.
In the logs, I saw that magnetic field is out of normal range. I verified that when I disconnected the TFmini S lidar sensor, the mission planner GPS error disappeared, then I reconnected the TFmini S sensor and the GPS error “GPS Glitch” appeared again.
For these reason I put aluminum tape on the GPS and Tfmini S sensor cables to avoid magnetic interference. Nevertheless, now the GPS Glitch message in Mission Planner appears less frequently and does so as soon as I turn on the drone, the drone performs the flight that I program but it continues to have abnormal behavior and the logs gives the same magnetic field error and GPS glitch error:
I do not know if there is an additional problem in the log that I am not seeing.
Attached photos of the drone:
Hello! Thanks for answering, I had already installed the camera on the drone before and I had no problems.
Which log analyzer do you recommend?
I think the power is fine because I use a 3S 5400 mAH 50C lipo battery
You cannot shield magnetic fields, but only redirect them. Objects made of materials that are easy to magnetize (have a high magnetic permeability) , such as iron or especially mumetal, are best suited for this purpose. Soft iron in particular deflects magnetic fields very well.
But if you use such high permeability material, it will also affect your compass, what you don’t want to have.
Copper PCB usually has a low magnetic permeability and therefore does not affect magnetic fields.
Copper PCB may be useful to shield electromagnetic fields.
I also had problems with a stable GPS performance and GPS glitches in a small quad, where MatekH743, M9N, compass, SIK-Radio and FrSky R-XSR with active Yaapu telemetry and TFmini are very close together. I tried a lot but did not think that the TFmini could be the reason. I just took a piece of aluminium foil, isolated it both sides with clear tape, and put it blow the GPS and separated the TFmini with it.
I think in my case this helped a lot. But sometimes I still have issues with GPS glitch, where the number of sats of the M9N suddenly goes down from stable 25-30 to almost 0 and goes up to stable 25-30 again some seconds afterwards.
But it can also be just coincidence. Electromagnetic interferences are quite difficult to detect and eliminate for a hobbyist. For me it is just try and error.