I need to implement a target detection algorithm in C language for 8-bit microcontroller.
Controller will be delivering signal value in continuous manner along with noise value. Noise value will be constant for one full operation whereas signal value will keep changing. The algorithm has to assume next signal as valid only when its greater than previous signal + noise value.
This way keep updating next signal and reach to a position where next values start coming lesser considering noise as well and tell that value as target value.
I need help to write the algorithm in C. Please help. Any refinement in algorithm is most welcome.