# Receiver & GPS at Topside and Transmitter Deepside

This is the canonical, or "normal" configuration.

![](https://2180742755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTLwTkS60mCJ7pYKVd2G5%2Fuploads%2FK2pHBMekikd30ixOnBlT%2Fimage.png?alt=media\&token=5915d1be-cc00-4a18-94f1-f7d70698eb66)

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