# Getting compass to work from the Here 2 GPS

Source: https://forum.modalai.com/topic/3466/getting-compass-to-work-from-the-here-2-gps
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2024-05-21 23:48:52 UTC by restore
Replies: 1 · Views: 477

## restore · 2024-05-21 23:48:52 UTC

We have the VOXL2 and a Here 2 GPS plugged into J19. We are getting GPS data, but not seeing compass/mag.

The Here 2 has a ICM20948 9-Axis MEMS.

Is it possible to configure the px4 start script to use the compass from the ICM20948?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-05-22 03:14:31 UTC

@restore, it looks like PX4 does have a driver for this imu/compass.

https://github.com/modalai/px4-firmware/blob/voxl-dev/src/drivers/imu/invensense/icm20948/ICM20948.cpp

However, it is not clear whether you can read just compass data. Please take a look at this driver. 

If you want to use it, you will need to enable building of the driver in the voxl2 board config: https://github.com/modalai/px4-firmware/blob/voxl-dev/boards/modalai/voxl2-slpi/default.px4board : enable `DRIVERS_IMU_INVENSENSE_ICM20948=y` .

Then, modify /usr/bin/voxl-px4-start to include:

```
qshell icm20948 start
```

We have not tested this driver, so we cannot really provide any guidance on using it for your application. However, with the above instructions, you should be able to compile it and run it.

Please make sure that the IMU data from this module does not conflict with the main flight IMU.

Alex
