Package ftclib.sensor

Class FtcSparkFunOtos.Config

java.lang.Object
ftclib.sensor.FtcSparkFunOtos.Config
Enclosing class:
FtcSparkFunOtos

public static class FtcSparkFunOtos.Config extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
     
    private double
     
    private org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
     
    private double
     
    private org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
     
    private double
     
    private double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    setOffset(double xOffset, double yOffset, double angleOffset)
    This method sets the offset of the OTOS form the robot center.
    setScale(double linearScale, double angularScale)
    This methods sets the linear and angular scales used by the OTOS for compensating scaling issues with sensor measurements.
    setUnits(org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit linearUnit, org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angularUnit)
    This method sets distance and angular units being reported.
    This method returns the string format of the Params info.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • linearUnit

      private org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit linearUnit
    • angularUnit

      private org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angularUnit
    • xOffset

      private double xOffset
    • yOffset

      private double yOffset
    • angleOffset

      private double angleOffset
    • linearScale

      private double linearScale
    • angularScale

      private double angularScale
  • Constructor Details

    • Config

      public Config()
  • Method Details

    • toString

      @NonNull public String toString()
      This method returns the string format of the Params info.
      Overrides:
      toString in class Object
      Returns:
      string format of the params info.
    • setUnits

      public FtcSparkFunOtos.Config setUnits(org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit linearUnit, org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angularUnit)
      This method sets distance and angular units being reported.
      Parameters:
      linearUnit - specifies the distance unit.
      angularUnit - specifies the angular unit.
      Returns:
      this object for chaining.
    • setOffset

      public FtcSparkFunOtos.Config setOffset(double xOffset, double yOffset, double angleOffset)
      This method sets the offset of the OTOS form the robot center.
      Parameters:
      xOffset - specifies the xOffset from robot center, right positive.
      yOffset - specifies the yOffset from robot center, forward positive.
      angleOffset - specifes the angular offset from robot forward, clockwise positive.
      Returns:
      this object for chaining.
    • setScale

      public FtcSparkFunOtos.Config setScale(double linearScale, double angularScale)
      This methods sets the linear and angular scales used by the OTOS for compensating scaling issues with sensor measurements.
      Parameters:
      linearScale - specifies linear scale, must be between 0.872 and 1.127.
      angularScale - specifies angular scale.
      Returns:
      this object for chaining.