> 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 %}
