# After take off PX4 loses global and local positioning?

**URL:** <https://discuss.px4.io/t/after-take-off-px4-loses-global-and-local-positioning/21699>\
**Category:** PX4 Autopilot\
**Created:** [March 29, 2021, 9:30am UTC](https://discuss.px4.io/t/after-take-off-px4-loses-global-and-local-positioning/21699 "2021-03-29T09:30:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kory.smith](https://discuss.px4.io/user_avatar/discuss.px4.io/kory.smith/32/8215_2.png) [@kory.smith](https://discuss.px4.io/u/kory.smith)\
**Post date:** [March 29, 2021, 9:30am UTC](https://discuss.px4.io/t/after-take-off-px4-loses-global-and-local-positioning/21699/1 "2021-03-29T09:30:13Z")

</div>

Hey all,

I have a problem where after take-off my quad loses global and local positioning and descends back to the ground. I consistently got this problem until one time before the battery died the drone cooperated for ~50sec and then it landed with a low battery fail safe.

This made me think that the power board/current is somehow affecting the flight controller or gps?

I moved the GPS ~2in higher and placed a copper tape barrier between the power board and the flight controller. The GPS jamming dropped significantly but I still have the same problem.

Here is the log of a typical failed flight, with the copper barrier.  
[https://logs.px4.io/plot\_app?log=dae498e7-4254-4b03-9c99-94ecd897e0a7](https://logs.px4.io/plot_app?log=dae498e7-4254-4b03-9c99-94ecd897e0a7)

And this is the log of the one and only successful flight until the battery died.  
[https://logs.px4.io/plot\_app?log=2b0bb5b5-5daf-44cf-929f-72266cbd5908](https://logs.px4.io/plot_app?log=2b0bb5b5-5daf-44cf-929f-72266cbd5908)

**Hardware** :

- Flight _Controller: Pixracer R15 over wifi ESP8266_
- GPS: _taoglas mRo_

I’m really out of my depth being a software developer and would really appreciate someone with experience to have a look at my logs 😃

Thank you.

---

<div class="post-metadata">

**Author:** ![Joseph\_Lim](https://discuss.px4.io/user_avatar/discuss.px4.io/joseph_lim/32/7919_2.png) [@Joseph\_Lim](https://discuss.px4.io/u/Joseph_Lim)\
**Post date:** [March 29, 2021, 9:54pm UTC](https://discuss.px4.io/t/after-take-off-px4-loses-global-and-local-positioning/21699/2 "2021-03-29T21:54:37Z")

</div>

There could be 101 reasons why that could happened. You can buy one of those GPS stick that raises the antenna about 4 inches above.  
Have you checked what is the frequency you are using is it jamming your signal?  
Are you doing this indoor?  
Is there anything magnetic around your antenna that might causes interference?  
How about power? When it flew, are you supplying sufficient power to power your motors and your gps and flight controller? Is your flight controller kept resetting or in sufficient to supply power to the GPS?  
How about wiring? Is it loose when it flies and vibration causing disruption to power to the gps or connection to gps?

---

<div class="post-metadata">

**Author:** ![kory.smith](https://discuss.px4.io/user_avatar/discuss.px4.io/kory.smith/32/8215_2.png) [@kory.smith](https://discuss.px4.io/u/kory.smith)\
**Post date:** [March 30, 2021, 9:34am UTC](https://discuss.px4.io/t/after-take-off-px4-loses-global-and-local-positioning/21699/3 "2021-03-30T09:34:32Z")

</div>

Hi @Joseph_Lim

I appreciate your help, most of your questions are answered in the description and possibly in the log files attached.  
I am having trouble reading the logs as I’m a novice to all this ☹

If you have experience in log reading and have the time it would be great if you could quickly check over them. Something might pop out as an obvious problem to you?

---

<div class="post-metadata">

**Author:** ![kory.smith](https://discuss.px4.io/user_avatar/discuss.px4.io/kory.smith/32/8215_2.png) [@kory.smith](https://discuss.px4.io/u/kory.smith)\
**Post date:** [April 13, 2021, 10:13am UTC](https://discuss.px4.io/t/after-take-off-px4-loses-global-and-local-positioning/21699/4 "2021-04-13T10:13:00Z")

</div>

I **solved** my problem and hope this solution can help others in the same situation.

The PixRacer R15 has 2 Magnetometers, and the GPS has 1.

I was disabling Mag0 and leaving the 2 on the board enabled. When the board would pull current the mags would bugger up giving errors on local and global positioning from the power boards EMI and result in several fail safes being triggered.

**SOLUTION** :  
Disable the two onboard Mags (mag1 && mag2) and enable only the GPS mag(mag0) in the parameters.  
I got this idea when finding the below post solutions.

> [@GPS Orientation - Pixracer - mag sensors inconsistent](https://discuss.px4.io/t/gps-orientation-pixracer-mag-sensors-inconsistent/6058/10):
>
> I have had the same problems with a mRo Pixracer and the mRo dual compass. Was possible to fix by rotating the compass from the original setting indicted by the arrow printed at the USB contact. I rotated the unit so the printed x-coordinate (for the LIS3MDL compass) now is pointing forward. I have the Taoglas antenna pointing to the sky and y direction is to the right hand side seen from behind. A calibration with setting “Rotation None” for the external compass gave a perfect result and elim…
