Finding the Nader Vector A wing-mounted camera captures video used to determine the nader vector, which corresponds to the aircraft's pitch and roll attitude. The camera mounts directly to the main spars, so in level flight the camera should point straight ahead and at an upwards angle equal to the wing's angle of incidence. The images that the camera captures therefore act like an artificial horizon indicator. Working backwards from this image of the horizon, we can calculate the approximate direction of the nader vector in each video frame. We can then compare it to the attitude indicated by the aircraft's onboard GPS. Once the images have been digitized from the video, the nader vector determination proceeds in two major steps. First the frames are processed with image manipulation program filters to reduce them from pretty pictures of blue sky, fluffy clouds, and patches of green forest to a simple black and white picture of a line that roughly corresponds to the horizon. The first filter blurs the image to remove minute details, like clouds and trees. The second filter performs an edge detection, which assigns low values to image pixels with smooth color gradients (like uniform patches of sky and earth) and high values to pixels with steep color gradients (such as where the bright blue sky meets the dark green earth at the horizon). With the world reduced to black and white, the image is passed on to stage two. The second step of processing involves performing mathematical computations on the horizon line to extract the nader vector. Each pixel on the image corresponds to a vector leaving the lens of the camera at a certain angle. The center of the image maps to a vector pointing straight along the camera axis. The distance of pixels from the center of the image is linearly proportional to the angle between the corresponding vector and the camera axis. We measured our camera's proportionality constant by taking a picture of a uniform grid and relating the image of the grid points with the calculated vector pointing to each grid point. Once we figured out how to map image pixels to the vector pointing out the front of the camera, we translated all of our horizon lines into streams of coplanar vectors pointing to the horizon. Assuming that the horizon is an infinite plane, the nader vector is simply (+/-) the cross product of any two of these vectors. We used the singular value decomposition function to essentially get the "best cross product fit" of all of these vectors. Software Used : See appendix for detailed instructions and script files TurboTV : Macintosh video capture IMS Movie Creator : Quicktime converter qtflat.exe : Quicktime flattener for DOS ( http://www.ommadawn.dk/tsode/ ) XAnim : movie player for UNIX ( http://xanim.va.pubnix.com/home.html ) xvidcap : frame grabber ( http://home.pages.de/~rasca/xvidcap/ ) GNU Image Manipulation Program : image processing filters ( http://www.gimp.org ) ImageMagick : general purpose image conversion utilities ( http://www.wizards.dupont.com/cristy/ImageMagick.html ) Practical Extraction and Reporting Language ( http://www.perl.com ) Octave : GPL'd Matlab clone ( http://bevo.che.wisc.edu/octave/ )