code: function Pilot(cockpit) {
                  console.log("Loading Pilot plugin.");
                  this.cockpit = cockpit;
                  this.speed = 0;
                  this.moving = false;
                  this.keys = {};
  
                  // Add the buttons to the control area
                  $('#controls').append('<input type="button" id="ftrim" value="Flat trim">');
                  $('#controls').append('<input type="button" id="calibratemagneto" value="Calibrate magneto">');
  
                  // Start with magneto calibration disabled.
                  $('#calibratemagneto').prop('disabled', true);
  
                  // Register the various event handlers
                  this.listen();
  
                  // Setup a timer to send motion command
                  var self = this;
                  setInterval(function(){self.sendCommands()},100);
          }
docs: /*
  Constructuor