In case you're looking for an optical flow sensor, there is now one available in the DIYDrones store for a penny under $40.
This sensor is based on the ADNS3080 mouse sensor which is a good choice for optical flow because:
high resolution: 30 x 30 pixel frames meaning it can see features that lesser mice cannot
high speed: 2000 to 6400 frames per second update rate which contributes to better low light performance than other mouse sensors
SPI interface meaning it can be interfaced to many micro controllers and co-exist with other sensors
- Intended to interface with a 5v microcontroller.
- 8mm lens with 11 deg FOV
- Standard M12x0.5 lens mount meaning you can replace the lense easily if required
Instructions for connecting the sensor to your APM/Oilpan are here.
Things to be careful of:
- Performs best outdoors in well lit environments
- Does not play well with Fluorescent lights (the blinking throws off the sensor)
- Needs a somewhat varied surface to see movement (plain carpets are not it's friend)
Uses including odometry and obstacle avoidance but I've used it mostly for horizontal position hold.
Note: integration with ACM and the existing GPS pos hold is a work-in-progress but should hopefully be completed in a few weeks. Here is a video of a slightly modified version of the ACM code using only optical flow (and sonar for altitude hold).
Hope you like it, all comments welcome!