
/*! 
in function bool TNavParticleFilter::measUpdate(const measT& currMeas) {
*/
	
				/*! Context*/
				//Compute variance of expected measurements and variance used in modified measurement update
				for(i = 0; i < beamsVF.Ncols(); i++) {
				
					beamVar[i] = currMeas.covariance[beamIndices[i]];
					mapVariance[i] = mapSquared[i] - pow(mapMean[i], 2);
					if(mapVariance[i] > modMapVar) {
						mapInfoCov[i] = mapVariance[i] - modMapVar;
					} else {
						mapInfoCov[i] = 0.0000001;
					}
					
					totalVar[i] = ((beamVar[i] + baseSensorVar + modMapVar) * mapVariance[i] + (baseSensorVar + beamVar[i]) * modMapVar) /
								  mapInfoCov[i];
					output("TNavParticleFilter::Modified Variance for beam %i is %.2f \n", i, totalVar[i]);
					
					
					
					/*! End context, new code follows*/	
					
					
					//Add the following to compute alpha
					//ALPHA
					if(totalVar[i] > 0.0){
						double alpha_i = (baseSensorVar + beamVar[i] + modMapVar) / totalVar[i];
						
						printf("Alpha[%u]\t%f\n", i, alpha_i);
						//please log alpha_i, there will be one value for each beam in each measurement (DVL => 4 alphas per ping)
						
						
					}else{
						
						printf("NAN\n");//Please log NAN for alpha_i
						
					}
					//END ALPHA
					
					
					/*! end new code*/
					
					
					
				}