added immobility detector based on magnetometer