diff --git a/website/content/docs/architecture/coordinates.mdx b/website/content/docs/architecture/coordinates.mdx index 60c9d3d29a..082273fef6 100644 --- a/website/content/docs/architecture/coordinates.mdx +++ b/website/content/docs/architecture/coordinates.mdx @@ -48,14 +48,20 @@ Computing the estimated network round trip time between any two nodes is simple once you have their coordinates. Here's a sample coordinate, as returned from the [Coordinate endpoint](/api/coordinate). + + +```json +... + "Coord": { + "Adjustment": 0.1, + "Error": 1.5, + "Height": 0.02, + "Vec": [0.34,0.68,0.003,0.01,0.05,0.1,0.34,0.06] + } +... ``` - "Coord": { - "Adjustment": 0.1, - "Error": 1.5, - "Height": 0.02, - "Vec": [0.34,0.68,0.003,0.01,0.05,0.1,0.34,0.06] - } -``` + + All values are floating point numbers in units of seconds, except for the error term which isn't used for distance calculations. @@ -63,7 +69,9 @@ term which isn't used for distance calculations. Here's a complete example in Go showing how to compute the distance between two coordinates: -``` + + +```go import ( "math" "time" @@ -97,3 +105,5 @@ func dist(a *coordinate.Coordinate, b *coordinate.Coordinate) time.Duration { return time.Duration(rtt * secondsToNanoseconds) } ``` + +