Add pose error ratio to target poses

This lets us filter out estimates that had a secondary pose
estimate which was almost as good as the best one. We should
throw out such estimates, they have been causing one tag-based
implied robot position that is completely different from the others.

Adding this filter to target_mapping prevents jumping implied robot
positions, at least at distances from the charge station and closer.
Also makes it so that all our HP-based estimates are accurate.

Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I11e42a4886b8401eeb6f57cf8e547ce3a8ff90b7
diff --git a/frc971/vision/target_map.fbs b/frc971/vision/target_map.fbs
index de79744..10f48cd 100644
--- a/frc971/vision/target_map.fbs
+++ b/frc971/vision/target_map.fbs
@@ -48,6 +48,15 @@
   // NOTE: not filtered by aprilrobotics.cc so that we can log
   // more detections.
   distortion_factor:double (id: 5);
+
+  // Ratio of pose_error from the best estimation to
+  // pose error of the second best estimation.
+  // Only filled out if this pose represents a live detection.
+  // This should be significantly less than 1,
+  // otherwise this pose may be a wrong solution.
+  // NOTE: not filtered by aprilrobotics.cc so that we can log
+  // more detections.
+  pose_error_ratio:double (id: 6);
 }
 
 // Map of all target poses on a field.