| aGP2D02_RawToInches | Index |
Definition:
| double aGP2D02_RawToInches( | unsigned char raw); |
Parameters:
| raw | - | The raw reading from the GP2D02 ranger. |
Return Value:
Description:
This routine uses a simple stepwise linear interpolation to convert the non-linear and raw reading from the GP2D02 ranger to inches. The routine does a pretty good job of giving meaningful values until the range gets well below the minimum 3" reading. If the data appears out of the range of 3" to 18.5", the value returned is zero.
To obtain the raw data, you can use the aGP2D02_ReadInt routine.
Related: