Pull state out of the zeroing estimators more nicely

I'm eventually going to remove the position() member, but for now Austin
wants this too.

Change-Id: I12b0c01eb5174751bd04fee8fdb770378a87f541
diff --git a/frc971/zeroing/zeroing.h b/frc971/zeroing/zeroing.h
index 217a820..53b8e31 100644
--- a/frc971/zeroing/zeroing.h
+++ b/frc971/zeroing/zeroing.h
@@ -66,10 +66,6 @@
 
   double offset() const override { return offset_; }
 
-  // Return the estimated position of the corresponding mechanism not using the
-  // index pulse, even if one is available.
-  double filtered_position() const { return filtered_position_; }
-
   // Returns a number between 0 and 1 that represents the percentage of the
   // samples being used in the moving average filter. A value of 0.0 means that
   // no samples are being used. A value of 1.0 means that the filter is using
@@ -86,6 +82,9 @@
     return start_pos_samples_.size() == constants_.average_filter_size;
   }
 
+  // Returns information about our current state.
+  State GetEstimatorState() const;
+
  private:
   // This function calculates the start position given the internal state and
   // the provided `latched_encoder' value.
@@ -159,9 +158,8 @@
            offset_samples_.size() == constants_.average_filter_size;
   }
 
-  // Return the estimated position of the corresponding mechanism not using the
-  // index pulse, even if one is available.
-  double filtered_position() const { return filtered_position_; }
+  // Returns information about our current state.
+  State GetEstimatorState() const;
 
  private:
   // The zeroing constants used to describe the configuration of the system.
@@ -262,14 +260,6 @@
   double position_;
 };
 
-// Populates an EstimatorState struct with information from the zeroing
-// estimator.
-void PopulateEstimatorState(const PotAndIndexPulseZeroingEstimator &estimator,
-                            EstimatorState *state);
-
-void PopulateEstimatorState(const PotAndAbsEncoderZeroingEstimator &estimator,
-                            AbsoluteEstimatorState *state);
-
 }  // namespace zeroing
 }  // namespace frc971