added filter in magnetometer code