Ticket 186: add two-way correction larsFeatureBranch jenkins-beamb-52
authorLars.Norin <a001741@c14560.ad.smhi.se>
Mon, 3 Dec 2012 10:21:20 +0000 (11:21 +0100)
committerLars.Norin <a001741@c14560.ad.smhi.se>
Mon, 3 Dec 2012 10:21:20 +0000 (11:21 +0100)
lib/beamblockage.c

index 919ed41..a8bcbe0 100644 (file)
@@ -652,7 +652,7 @@ int BeamBlockage_restore(PolarScan_t* scan, RaveField_t* blockage, const char* q
           goto done;
         }
         if ((bbpercent < threshold) && (rvt == RaveValueType_DATA)) {
-          bbdbz = 10 * (log10(1.0/(1.0-bbpercent)));
+          bbdbz = 10 * (log10(1.0/(pow(1.0-bbpercent,2)))); /* Two-way correction */
           dbz = iv + bbdbz;  /* This is the corrected reflectivity */
           ov = round((dbz - offset) / gain);