Improve localizer update debugging

* Only send LocalizerDebug messages when something interesting happens.
* On debug field, draw both the implied robot position of the update as
  well as the camera position.
* Indicate accepted vs. rejected images via red/green colors.
* Leave old corrections on the display for 2 seconds and gradually fade
  them out.
* Add aggregate statistics about why we are rejecting image corrections
  to the readouts table.

Change-Id: Ibc3397cb5654aacbc6cce4e5f3eb71f0371692cc
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/y2020/control_loops/drivetrain/localizer_debug.fbs b/y2020/control_loops/drivetrain/localizer_debug.fbs
index 89aea68..e94d251 100644
--- a/y2020/control_loops/drivetrain/localizer_debug.fbs
+++ b/y2020/control_loops/drivetrain/localizer_debug.fbs
@@ -17,6 +17,9 @@
   pose_index: uint8 (id: 1);
   local_image_capture_time_ns:long (id: 2);
   roborio_image_capture_time_ns:long (id: 3);
+  camera_x:float (id: 11);
+  camera_y:float (id: 12);
+  camera_theta:float (id: 13);
   implied_robot_x:float (id: 4);
   implied_robot_y:float (id: 5);
   implied_robot_theta:float (id: 6);
@@ -27,8 +30,16 @@
   image_age_sec:float (id: 10);
 }
 
+table CumulativeStatistics {
+  total_accepted:int (id: 0);
+  total_candidates:int (id: 1);
+  // Indexed by integer value of RejectionReason enum.
+  rejection_reason_count:[int] (id: 2);
+}
+
 table LocalizerDebug {
   matches:[ImageMatchDebug] (id: 0);
+  statistics:CumulativeStatistics (id: 1);
 }
 
 root_type LocalizerDebug;