Currently developing an algorithm to recognize that a signal was lost.
Current algorithm is as follows.
denotes the value N-1 samples ago.
Using a value of N=20 the following graph was generated
The top graph is the calculated signal strength while the bottom graph is the raw data stream.
A zoomed in photo is below.
The tracking loop (bottom graph) started to loose the lock between 29 and 30 seconds. The signal strength (top graph) started to oscillate because of this.
I then changed my N to 1000
Again the tracking loop started losing the signal around 60 seconds. At approximently 64 seconds I covered up the antenna.
This algorithm is implimented at an order of 1.