I'm not aware of any commands or programs that do completely what you want.
But wicd does show you in percentages how strong your connection is and should give you a list of connections ranging from strongest to weakest signal. So I know it doesn't drop weak connections, but you'll only have to check the top of the list. Check the screenshot of the menu.
http://wicd.sourceforge.net/screenshot.php
When installing wicd it will replace networkmanager. It's in the ubuntu repositories so you can install it immediately with
sudo apt-get install wicd
sudo iwlist wlan0 scanap who has poor quality? – us3r May 15 '12 at 16:30