added magnetometer string serialization