Trying to correct the measurement what I am getting from 1260MB. When i measured I found out that the sonar was giving 36cm against a distance from ground of one meter. Guide me if this function is responsible for range calculation in AP_RangeFinder_SharpGP2Y.h


int convert_raw_to_distance(int _raw_value)
     if( _raw_value == 0 )
         return max_distance;
         return 14500/_raw_value;


If it is so then what is 14500 thing how did it come. If I can find out this then I can apply the correction to get the real value.


While measuring this I am just using CLI and APM is not connected to any motor.

Views: 744

Reply to This

Replies to This Discussion

Just for clarity, the Sharp GP2Y is an IR rangefinder. It's analog output, so its slightly more useful than some of Sharp's other IR rangers.


I've done some analysis of why this compensation is required

read more here


Reply to Discussion


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service