> For the complete documentation index, see [llms.txt](https://yall.yassrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yall.yassrobotics.com/documentation/tuning/crosshair-calibration.md).

# Crosshair Calibration

The crosshair is the reference point `tx`/`ty` (`LimelightTargetData.getHorizontalOffset()` / `getVerticalOffset()`) are measured against. If you're driving directly off `tx`/`ty` (visual servoing, not a full 3D pose), calibrating it correctly is what makes "`tx == 0`" actually mean "aligned with where I want to score," instead of just "aligned with the sensor's optical center."

## Single crosshair mode

Use this when your scoring position and camera angle don't vary.

1. Drive the robot to its ideal scoring location and rotation.
2. Click **Calibrate** in the Limelight web UI.
3. Verify: `tx`/`ty` should now read `0`/`0` when the robot is back in that exact position and rotation.
4. Recalibrate whenever you change field setup or camera mounting. For example, if a practice match reveals a better scoring position, recalibrate during the next lull.

## Dual crosshair mode

Use this for off-axis cameras or shooters that need real-time compensation as range changes. The effective crosshair interpolates between crosshair A and B based on target area.

1. Drive to the **closest** scoring position with ideal rotation, click **Calibrate** for crosshair A.
2. Drive to the **farthest** scoring position with ideal rotation, click **Calibrate** for crosshair B.
3. As the robot moves between those distances, the Limelight uses the target's area to interpolate between A and B automatically, with no additional code required.

{% hint style="info" %}
Crosshair calibration only affects `tx`/`ty` (and the values `LimelightTargetData` reads from them). It has no effect on 3D pose data (`getXXXPose_YYYSpace()`, `PoseEstimate`); that accuracy comes from [camera calibration](/documentation/tuning/charuco-camera-calibration.md) instead.
{% endhint %}

## See Also

* [Tuning Workflow Overview](/documentation/tuning/tuning-workflow-overview.md)
* [PID Tuning for Aiming & Ranging](/documentation/tuning/pid-tuning-for-aiming-and-ranging.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://yall.yassrobotics.com/documentation/tuning/crosshair-calibration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
