Remove position() member from zeroing estimators

It didn't return anything particularly useful, so it should not have
been used anywhere. Turns out it was only used in the test, so it was
pretty easy.

Change-Id: I3f81bd16a1a8e429c9748abd4e9dc9c7e0259dc5
diff --git a/frc971/zeroing/zeroing.cc b/frc971/zeroing/zeroing.cc
index 70fbb56..d22e48a 100644
--- a/frc971/zeroing/zeroing.cc
+++ b/frc971/zeroing/zeroing.cc
@@ -336,7 +336,7 @@
   }
 }
 
-int PulseIndexZeroingEstimator::IndexPulseCount() {
+int PulseIndexZeroingEstimator::IndexPulseCount() const {
   if (min_index_position_ > max_index_position_) {
     // This condition means we haven't seen a pulse yet.
     return 0;
@@ -364,9 +364,20 @@
               min_index_position_;
     zeroed_ = true;
   }
-  if (zeroed_) {
-    position_ = info.encoder + offset_;
-  }
+
+  position_ = info.encoder + offset_;
+}
+
+PulseIndexZeroingEstimator::State
+PulseIndexZeroingEstimator::GetEstimatorState() const {
+  State r;
+  r.error = error_;
+  r.zeroed = zeroed_;
+  r.position = position_;
+  r.min_index_position = min_index_position_;
+  r.max_index_position = max_index_position_;
+  r.index_pulses_seen = IndexPulseCount();
+  return r;
 }
 
 }  // namespace zeroing