# Disable GPS and compass

Source: https://forum.modalai.com/topic/3232/disable-gps-and-compass
Category: Development Drones (https://forum.modalai.com/category/44/development-drones)
Tags: starling
Posted: 2024-03-18 18:21:45 UTC by Hunter Scott
Replies: 3 · Views: 4651

## Hunter Scott · 2024-03-18 18:21:45 UTC

I tried unplugging the GPS module but got an error in qgroundcontrol that the compass is missing. Looks like there's one on the GPS board. What parameters do I need to change in qgc to disable GPS and the compass so I can arm and fly with the GPS module unplugged?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-03-18 20:26:25 UTC

@Hunter-Scott , please try setting the following PX4 params to disable magnetometer : 

- SYS_HAS_MAG to 0
- EKF2_MAG_TYPE to 5

## Reply by Hunter Scott · 2024-04-02 21:26:48 UTC (in reply to Alex Kushleyev)

Thanks, this worked!

## Reply by kailyGen · 2026-05-30 07:26:04 UTC (in reply to Hunter Scott)

Good tip. For anyone testing without the GPS module attached, setting SYS_HAS_MAG=0 and EKF2_MAG_TYPE=5 seems to be the key part since the compass is on the GPS board. I was also looking at some compass-related references on [123compass.org](https://123compass.org/) while trying to understand the magnetometer side of it.
