Take distortion into account for mapping noise

Again, following the localizers logic here, but with thresholds we can
tune separately.

Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I2b9f6f7cace2bf1de3468e3a627383452db863f2
diff --git a/frc971/vision/target_mapper.h b/frc971/vision/target_mapper.h
index 9d943c9..3724832 100644
--- a/frc971/vision/target_mapper.h
+++ b/frc971/vision/target_mapper.h
@@ -111,6 +111,8 @@
     // Horizontal distance from camera to target, used for confidence
     // calculation
     double distance_from_camera;
+    // A measure of how much distortion affected this detection from 0-1.
+    double distortion_factor;
     TargetMapper::TargetId id;
   };
 
@@ -128,9 +130,8 @@
   // detection between robot movement over the given time period. Ceres calls
   // this matrix the "information"
   static TargetMapper::ConfidenceMatrix ComputeConfidence(
-      aos::distributed_clock::time_point start,
-      aos::distributed_clock::time_point end, double distance_from_camera_start,
-      double distance_from_camera_end);
+      const TimestampedDetection &detection_start,
+      const TimestampedDetection &detection_end);
 
  private:
   // Computes the constraint between the start and end pose of the targets: the