Here is a good article for everybody working on dock logichttp://www.schursastrophotography.com/robotics/dockinglogic.html