After some more PID tuning, here is another video of my quadcopter trying to hold its position via the hacked mouse sensor (plus an ultrasound range finder for altitude control).
This was shot about 2 hours before sunset and the sensor already started having some trouble on my dark and fairly featureless driveway in the shadow - that's why I tried to make it hover over a sandy spot that stuck out...
Comments
That being said, the resolution of the mouse sensor is finite, so going higher it might not be able to detect small movements. The sensor measures roughly 1500 'clicks' per meter at a height of 1m, so at 100m altitude a lateral movement of 1m would register as only '15' raw mouse sensor clicks, which might be starting to be swamped by noise...
I don't have barometric altittude on the quadcopter at the moment, so I can't go higher than ~20 feet right now. I believe in that range there should be no noticeable effect at all.
Which hardware platform you are using ?
Two reasons for the mouse sensor: first, it is not trivial to interface a cheap camera (or any 'proprer' camera for that matter) to a microcontroller - at best, they usually speak USB for which you would have to implement a host protocoll. Second, the mouse sensor already implements the optical flow algorithm that allows you to detect motion - all I have to do is periodically read two bytes from the mouse sensor.
Is there a specific reason for using an optical mouse sensor as opposed to a cheap camera?