This is the code that's on the ardupilot board.