> 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 — e.g. after 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 — 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
