Function rc_dsm_ch_normalized#

Function Documentation#

double rc_dsm_ch_normalized(int ch)#

Returns a scaled value from -1 to 1 corresponding to the min and max values recorded during calibration.

The user MUST run the rc_calibrate_dsm example to ensure the normalized values returned by this function are correct. It is possible that values outside of the range from -1 to 1 are returned if the calibration is not perfect.

Parameters:

ch[in] channel (1-9)

Returns:

normalized input from -1.0 to 1.0 if that channel has data, 0 if that channel has no data, -1 on error.