Update CovariancePrediction.cpp

converted to basic C to aid testing outside APM environment