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;
     else
         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: 510

Reply to This

Replies to This Discussion

I didn't mention this at the time, but I would focus even more on the 20-30cm range to get a more accurate reading there, then test that out to 700cm or so. I'm not sure if you will find 1.4 as ideal. There are a range of other formulas which might be more accurate, but I suppose you only need it just so accurate...

 

As I said in the other thread on this, I wanted to do more testing, especially in the 20-30 cm range, but haven't found the time. So many wonderful things to work on. But I hope this discussion was helpful...

All,

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

read more here

-Andrew

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service