> 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/api-reference/java-reference/networktables/limelight-utils.md).

# LimelightUtils

**Package:** `limelight.networktables`

Static conversion helpers between WPILib geometry/units types and the flat `double[]` arrays the Limelight NetworkTables API uses. Used internally throughout YALL; useful directly if you're reading raw NT entries yourself.

***

## Methods

| Method                                                           | Returns         | Description                                                                                                                        |
| ---------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `static toPose3D(double[] inData)`                               | `Pose3d`        | Converts a 6-element `[x, y, z, roll, pitch, yaw]` array (meters, degrees) into a `Pose3d`. Empty `Pose3d` if `inData.length < 6`. |
| `static toPose2D(double[] inData)`                               | `Pose2d`        | Same input format; keeps only `x`, `y`, and `yaw`.                                                                                 |
| `static toTranslation3d(double[] translation)`                   | `Translation3d` | Converts a 3-element `[x, y, z]` array (meters) into a `Translation3d`.                                                            |
| `static toOrientation(double[] orientation)`                     | `Orientation3d` | Converts a 6-element `[yaw, yawrate, pitch, pitchrate, roll, rollrate]` array (degrees) into an `Orientation3d`.                   |
| `static orientation3dToArray(Orientation3d orientation)`         | `double[]`      | Inverse of `toOrientation`.                                                                                                        |
| `static pose3dToArray(Pose3d pose)`                              | `double[]`      | Converts a `Pose3d` into `[x, y, z, roll, pitch, yaw]` (meters, degrees).                                                          |
| `static pose2dToArray(Pose2d pose)`                              | `double[]`      | Converts a `Pose2d` into `[x, y, 0, 0, 0, yaw]` (meters, degrees).                                                                 |
| `static translation3dToArray(Translation3d translation)`         | `double[]`      | Converts a `Translation3d` into `[x, y, z]` (meters).                                                                              |
| `static extractArrayEntry(double[] inData, int position)`        | `double`        | Returns `inData[position]`, or `0` if `position` is out of bounds. Used to safely decode variable-length NT arrays.                |
| `static sanitizeName(String name)`                               | `String`        | Returns `name`, or `"limelight"` if `name` is `null`/empty.                                                                        |
| `static getLimelightURLString(String tableName, String request)` | `URL`           | Builds `http://<tableName>.local:5807/<request>` for HTTP calls like snapshot capture.                                             |

## See Also

* [PoseEstimate](/api-reference/java-reference/networktables/pose-estimate.md)
* [Orientation3d](/api-reference/java-reference/networktables/orientation3d.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/api-reference/java-reference/networktables/limelight-utils.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.
