Added magnetometer calibration to pilot plugin.
Also pass some events through the websocket.