Thanks. I took a closer look at your calculations, I spotted a couple potential gotches...

First, when you programmatically construct a geopoint from your 'pulled' latitude and longitude you omit the altitude and elevation, which are strictly required by the specification for a geopoint.

`nurserygeopoint = concat(${nurserylatitude},' ',${nurserylongitude})`

whereas a geopoint actually consist of **4** fields; from https://docs.getodk.org/form-question-types/#location-widgets

For example, if a Collect user captured a point while at the coordinates 12°22'17.0"N 1°31'10.9"W, with a reported accuracy radius of 17.4 meters, and at 305 meters above sea level, the geopoint representation would be:

12.371400 -1.519700 305 17.4

but your calculation is missing altitude and accuracy values.

Although the distance() function doesn't need either the altitude or accuracy for its calculations - and appears to ignore the fact they are missing, fortunately! - you should be very careful when manually constructing value types that have a prescribed format. Other geo functions and calculations may well rely upon these fields and would therefore probably barf if fed your particular geopoint.

I might therefore suggest the following change:

`nurserygeopoint = concat(${nurserylatitude},' ',${nurserylongitude},' 0 0')`

Similarly, when you combine the two geopoints into a geotrace with

`distancegeopoint = concat(${nurserygeopoint},' ; ',${gps})`

I notice that your delimiter has leading and trailing spaces (!). Again, you should tread somewhat carefully with these formats, and although the distance() function is ignoring this whitespace, I'd probably recommend sticking with a single `';'`

delimiter just to be safe.

`distancegeopoint = concat(${nurserygeopoint},';',${gps})`