Package frc.lib5k.components.limelight
Class LimelightTarget
- java.lang.Object
-
- frc.lib5k.components.limelight.LimelightTarget
-
public class LimelightTarget extends java.lang.Object
A class for storing data about a Limelight vision target
-
-
Constructor Summary
Constructors Constructor Description LimelightTarget(double tx, double ty, double ta, double ts, double tshort, double tlong, java.lang.String camtran)
Create a LimelightTarget
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getArea()
Target Areadouble
getLongestSide()
Sidelength of longest side of the fitted bounding boxdouble
getShortestSide()
Sidelength of shortest side of the fitted bounding boxdouble
getSkew()
Skew or rotationjava.lang.String
getTranslationOrNull()
Results of a 3D position solutiondouble
getX()
Horizontal Offset From Crosshair To Targetdouble
getY()
Vertical Offset From Crosshair To Target
-
-
-
Constructor Detail
-
LimelightTarget
public LimelightTarget(double tx, double ty, double ta, double ts, double tshort, double tlong, java.lang.String camtran)
Create a LimelightTarget- Parameters:
tx
- Target Xty
- Target Yta
- Target Areats
- Target skewtshort
- Shortest sidetlong
- Longest sidecamtran
- 3D Positioning data
-
-
Method Detail
-
getX
public double getX()
Horizontal Offset From Crosshair To Target- Returns:
- -27 degrees to 27 degrees
-
getY
public double getY()
Vertical Offset From Crosshair To Target- Returns:
- -20.5 degrees to 20.5 degrees
-
getArea
public double getArea()
Target Area- Returns:
- 0% of image to 100% of image
-
getSkew
public double getSkew()
Skew or rotation- Returns:
- -90 degrees to 0 degrees
-
getShortestSide
public double getShortestSide()
Sidelength of shortest side of the fitted bounding box- Returns:
- pixels
-
getLongestSide
public double getLongestSide()
Sidelength of longest side of the fitted bounding box- Returns:
- pixels
-
getTranslationOrNull
public java.lang.String getTranslationOrNull()
Results of a 3D position solution- Returns:
- 6 numbers: Translation (x,y,y) Rotation(pitch,yaw,roll)
-
-