Extracted methods read_sensor and read_gps