> For the complete documentation index, see [llms.txt](https://docs.ceruleansonar.com/c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ceruleansonar.com/c/rov-locator/appendix-math-for-computing-remote-latitude-longitude/receiver-and-gps-at-topside-and-transmitter-deepside.md).

# Receiver & GPS at Topside and Transmitter Deepside

This is the canonical, or "normal" configuration.

![](/files/E8XtGF5Iln8dtOXqvwYQ)

latitude\_rx :: from GPS co-located with receiver (in degrees that include minutes and seconds)

longitude\_rx :: from GPS co-located with receiver (in degrees that include minutes and seconds)

bearing :: true bearing (not compass bearing) from $USRTH message

elevation :: elevation from $USRTH message

slant\_range :: slant range from $USRTH message

depth (best, if available) :: from ROV depth sensor (minus depth of receiver unit)

depth (use if ROV depth sensor not available) = abs( sin(elevation) x slant\_range )     \[note 1]

map\_radius = cos(elevation) x slant\_range

CE = 40,074,000 m      // Circumference of earth in meters

lat\_m\_per\_deg = CE / 360      // meters per degree of latitude

long\_m\_per\_deg = lat\_m\_per\_deg x cos(latitude\_rx)      // meters per degree of longitude    \[note 1]

latitude\_tx = latitude\_rx + (sin(bearing) x map\_radius / lat\_m\_per\_deg) \[note 1, 2]

longitude\_tx = longitude\_rx + (cos(bearing) x map\_radius / long\_m\_per\_deg  \[note 1, 2]

{% hint style="info" %}
Note 1: Remember, most computer functions require you to convert degrees to radians
{% endhint %}

{% hint style="info" %}
Note 2: the signs of the degrees as noted above are needed in the computations
{% endhint %}

{% hint style="info" %}
Note 3: longitude degrees that are West are negative, East are positive. Latitude degrees that are North are positive, South are negative.
{% endhint %}


---

# 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://docs.ceruleansonar.com/c/rov-locator/appendix-math-for-computing-remote-latitude-longitude/receiver-and-gps-at-topside-and-transmitter-deepside.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.
