Update AP_State.pde

Added an extra function at the bottom that returns 1 if the sonar is within "distance" of the ground. Not tested on copter.