Stanford Autonomous Helicopter Flight Data ------------------------------------------ Collected August 6, 2008. Helicopter information ---------------------- Airframe: Synergy N9 Engine: OS .91 (nitro-methanol, single-cylinder, two-stroke) Avionics: Futaba GY611 gyro, GV1 governor Nominal rotor speed: 1800rpm Sensors: Microstrain 3DMGX1, ground-based vision system. Microstrain outputs all measurements at 333Hz. Some Microstrain data may be lost by radio links. Flight information ------------------ Each flight begins with the helicopter sitting on the ground at idle, motionless, for at least 10 seconds. This allows baseline values of the sensors (e.g., gyro biases) to be collected, and navigation filters to be initialized. During this period, the data is not useful for modeling and the pilot's stick positions will not have an effect on the helicopter. While the helicopter is on the ground, it is out of view of our vision system. Thus, the system reports 1000 for the variance of the position solution (see the Vision format section below.) Some time after the helicopter has taken off, it will enter the view of the vision system, which will begin generating valid position data. The data from each flight is stored in a separate directory. The types of maneuvers being performed during that flight are described in a README file within each directory. Log files --------- Each directory contains a set of ASCII text files. The contents of each file are: comments.txt: comments from the software operator during the flight. controls.txt: pilot controls. filter.txt: state estimate from the flight software's Kalman filter. imuaccel.txt: acceleration from Microstrain unit. imugyro.txt: angular rate from Microstrain unit. imumag.txt: magnetic field measurements from Microstrain unit. smoother.txt: state estimate from Kalman smoother (post-processed). vision.txt: measurements from ground-based vision. logfile.txt: interleaved (by time) data from all files. Formats ------- Each file is a sequence of tuples separated by newlines. The first entry of each line is a digit identifying the type of data to follow. logfile.txt contains all of the data, and thus each line may have a different format. The data has been separated out (based on the leading type digit) into the other files for simplicity. The type of data associated with each digit is: 0 Comment 1 IMU accelerometers 2 IMU gyros 3 IMU magnetometers 4 Vision 5 Controls 6 Filter 7 Smoother Each tuple has one of the following formats, depending on the leading digit: Comments -------- 0 time comment_text time: time in seconds. This is the time at which the comment was entered into the software by the operator and may only roughly correspond to the event referred to in the text. comment_text: all remaining text on the line (including spaces) is the comment text entered by the operator. IMU accelerometers ------------------ 1 time accel_x accel_y accel_z time: time in seconds. This is the time at which the measurement was processed by the software (not necessarily when it was sensed). accel_x: acceleration in meters/sec/sec along the helicopter's local X-axis (forward). accel_y: acceleration in meters/sec/sec along the helicopter's local Y-axis (right). accel_z: acceleration in meters/sec/sec along the helicopter's local Z-axis (down). IMU gyros --------- 2 time rate_x rate_y rate_z time: time in seconds. This is the time at which the measurement was processed by the software (not necessarily when it was sensed). rate_x: angular rate in radians/sec around the helicopter's local X-axis (forward). rate_y: angular rate in radians/sec around the helicopter's local Y-axis (right). rate_z: angular rate in radians/sec around the helicopter's local Z-axis (down). IMU magnetometers ----------------- 3 time field_x field_y field_z time: time in seconds. This is the time at which the measurement was processed by the software (not necessarily when it was sensed). field_x: magnetic field strength in Gauss along the helicopter's local X-axis (forward). field_y: magnetic field strength in Gauss along the helicopter's local Y-axis (right). field_z: magnetic field strength in Gauss along the helicopter's local Z-axis (down). Units may not be exactly Gauss. The local magnetic variation at the flying field is approximately 15.5 degrees (0.27 radians) East. The local magnetic dip at the flying field is approximately 62 degrees. Vision ------ 4 time pos_n pos_e pos_d var_n var_e var_d cam0_u cam0_v cam0_n cam0_e cam0_d cam1_u cam1_v cam1_n cam1_e cam1_d time: time in seconds. Time at which the measurement was processed by software. pos_n/e/d: 3D position in the navigation frame (North-East-Down), measured in meters. North refers to true north; not magnetic. var_n/e/d: Variance of the position solution. Generally the fitting error is very small and, unfortunately, does not reflect actual accuracy. If the helicopter is currently not being tracked (out of the camera view, or lost track), these values are set to 1000. The Kalman filter/smoother data may be unreliable during this time (and shortly/before after depending on the nature of the outage.) cam0_u/v: u,v coordinates of helicopter in camera 0's image. cam0_n/e/d: A vector pointing from camera 0's focal point to the helicopter, expressed in the North-East-Down frame. cam1_u/v: u,v coordinates of helicopter in camera 1's image. cam1_n/e/d: A vector pointing from camera 1's focal point to the helicopter, expressed in the North-East-Down frame. The vision system consists of two cameras mounted at fixed locations on the field. Intrinsic parameters (principal point and focal lengths) were determined by standard methods. Their extrinsic parameters were determined by calibration with a high-accuracy GPS unit. Each camera outputs a 640x480 image. The U,V coordinates are image coordinates of the helicopter. U specifies the column and V specifies the row within the image (starting from the top-left corner of the image.) These U,V coordinates are converted (using intrinsic parameters) to a local 3D ray, then rotated to the nav frame, yielding the cam*_n/e/d vectors. Along with the positions of the cameras in the North-East-Down frame, these navigation frame rays are intersected (least-squares) to find the 3D position of the helicopter. The intrinsic parameters for the cameras are: Camera 0: | U | V | ----------------+-------------+-------------+ Focal length | 1142.4746 | 1140.87253 | Principal point | 328.14 | 231.89 | Camera 1: | U | V | ----------------+-------------+-------------+ Focal length | 1043.96162 | 1043.39719 | Principal point | 319.5 | 239.5 | The extrinsic parameters for the cameras are: Camera 0: ------------------------------------------------------ Rotation vector: -1.3898633 -1.6186237 -1.0987801 Translation vector: 8.7648435 4.7797100 14.752933 Camera 1: ------------------------------------------------------- Rotation vector: -1.6861621 -1.2023404 -0.86853279 Translation vector: -9.1579315 5.8206285 12.334456 The rotation vectors are axis-angle rotations of the navigation frame relative to the camera (see cvRodrigues2 in the OpenCV Library documentation). The translation vectors are the position of the origin expressed in the camera frame. Controls -------- 5 time aileron elevator rudder collective time: time in seconds. Time at which the measurement was processed by software. aileron: aileron (lateral cyclic) stick position. The lateral cyclic controls the helicopter's left-right tilt (roll). This is the horizontal axis of the pilot's right stick. elevator: elevator (longitudinal cyclic) stick position. The longitudinal cyclic controls the helicopter's forward-backward tilt (pitch). This is the vertical axis of the pilot's right stick. rudder: rudder stick position. The rudder controls the helicopter's rotational rate about its vertical axis (yaw). This is the horizontal axis of the pilot's left stick. collective: collective stick position. The collective controls the main rotor collective pitch, increasing and decreasing vertical thrust. This is the vertical axis of the pilot's left stick. Each control is normalized approximately to the range [-1,+1] (it should be considered unsafe to exceed this range under computer control.) Positive aileron corresponds to a positive rotational rate about the helicopter's X (forward) axis, and a right stick deflection. Positive elevator corresponds to a negative rotational rate about the helicopter's Y (right) axis, and an upward stick deflection. Positive rudder corresponds to a positive rotation rate about the helicopter's Z (down) axis (hence, clockwise viewed from above). This corresponds to a right stick deflection. Positive collective corresponds to an upward blade pitch (zero pitch corresponds to the 0 position), which generates upward thrust (along the negative Z axis). This corresponds to upward stick deflection. Copies of the servo commands sent to the helicopter are received by a second radio receiver attached to the flight computer. These servo positions are mixed together by our Futaba transmitter and, thus, not direct measurements of the pilot's controls. The controls in the log file are "unmixed" by inverting the mixing process applied by the transmitter. Filter ------ 6 time pos_n pos_e pos_d q_x q_y q_z q_w vel_n vel_e vel_d w_n w_e w_d vdot_n vdot_e vdot_d wdot_n wdot_e wdot_d euler_roll euler_pitch euler_yaw time: Time in seconds at which the filter estimate was computed. pos_n/e/d: Estimated position of the helicopter in the North-East-Down frame, measured in meters. q_x/y/z/w: Quaternion representation of the helicopter's orientation relative to the North-East-Down frame. The quaternion 0,0,0,1 corresponds to the helicopter having its X-axis aligned with North, Y-axis aligned with East, and Z-axis aligned with Down. vel_n/e/d: The helicopter's linear velocity in meters/sec in the North-East-Down frame. w_n/e/d: The helicopter's angular velocity in radians/sec in the North-East-Down frame. vdot_n/e/d: The helicopter's linear acceleration in meters/sec/sec in the North-East-Down frame. wdot_n/e/d: The helicopter's angular acceleration in radians/sec/sec in the North-East-Down frame. euler_roll: Roll angle of the helicopter in radians. euler_pitch: Pitch angle of the helicopter in radians. euler_yaw: Yaw angle (heading) of the helicopter in radians. The euler angles are included for human readability and sanity-checking. Rotations are done in Roll-Pitch-Yaw order (standard aviation convention). Note that small rotations in Roll, Pitch, or Yaw from the starting orientation (level, facing North) correspond to positive rotations about the North, East, Down axes. Note that many references differ in their quaternion conventions. The following matrix transformation is equivalent to the rotation represented by a quaternion (x,y,z,w): R(x,y,z,w) = [ 1-2yy-2zz, 2xy - 2zw, 2xz + 2yw ] [ 2xy + 2zw, 1-2xx-2zz, 2yz - 2xw ] [ 2xz - 2yw, 2yz + 2xw, 1-2xx-2yy ] This rotation matrix, when applied to a vector 'v' expressed in the helicopter frame results in a vector expressed in the navigation frame. Alternatively, the transformation is the operator which rotates the helicopter from the default orientation (level, facing north) to the orientation represented by the quaternion (x,y,z,w). Comparing this with other conventions will often avoid confusion and/or mixing of incompatible code. Smoother -------- 7 time pos_n pos_e pos_d q_x q_y q_z q_w vel_n vel_e vel_d w_n w_e w_d vdot_n vdot_e vdot_d wdot_n wdot_e wdot_d euler_roll euler_pitch euler_yaw Same format as Filter data.