I found a convenient 3v3 rated compass/gps device, which i integrated onto the raspberrypi. The GPS connects through a serial interface, the compass has an i2c interface for which i used wiringPi and a C library.