Correct hood zeroing calculations

Used trig to find screw length based on hood angle, preventing incorrect
estops. Calculations based on
https://slack-files.com/T2752T5SA-F02JJ39RY03-f83f22b78d

Change-Id: I8a143d6dfe6476a4a57b702f9bd93cad5c6b9262
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
diff --git a/frc971/zeroing/absolute_and_absolute_encoder.h b/frc971/zeroing/absolute_and_absolute_encoder.h
index dd2190d..499f7d1 100644
--- a/frc971/zeroing/absolute_and_absolute_encoder.h
+++ b/frc971/zeroing/absolute_and_absolute_encoder.h
@@ -48,7 +48,7 @@
   virtual flatbuffers::Offset<State> GetEstimatorState(
       flatbuffers::FlatBufferBuilder *fbb) const override;
 
- private:
+ protected:
   struct PositionStruct {
     PositionStruct(const AbsoluteAndAbsolutePosition &position_buffer)
         : single_turn_absolute_encoder(
@@ -60,6 +60,12 @@
     double encoder;
   };
 
+  // Returns an adjusted single turn absolute encoder reading.
+  // Filled in by default but can be overriden.
+  virtual double AdjustedSingleTurnAbsoluteEncoder(
+      const PositionStruct &sample) const;
+
+ private:
   // The zeroing constants used to describe the configuration of the system.
   const constants::AbsoluteAndAbsoluteEncoderZeroingConstants constants_;