Hi Olly,

El 17/05/2018 a las 0:36, Olly Betts escribió:

I think the formula is too complicated. I purpose a simpler formula, like:
            If bearing <=180
                      AverageBearing =  (bearing + (backbearing -180))/2
                else
                      AverageBearing = (bearing + (backbearing +180))/2
Your proposed formula gives wrong answers in some cases - consider:

bearing = 80, backbearing = 0

These give AverageBearing = (80 + 0 - 180) / 2 = -50 (equivalent to
310), but this should be 130 (average of 80 and 180).

In this case is not a problem with my formula, is a serious magnetic anomaly (100 degrees difference)  and the program should to stop and to send a warning.


The therion formula is attempting to average the angles by trigonometry,
which seems a reasonable approach (though probably slower than trying to
average more directly like you're suggesting).  It looks essentially
correct to me, though it's a bit oddly written since cos(90 - x) is
sin(x), sin(90 - x) is -cos(x), 90 - atan2(y,x) is atan2(x,y) (possibly
+/- a multiple of 360).  But if I work it out with a calculator for
236.8 and 56.8 then I do get 236.8.

In the afternoon I have detected a strong anomaly problem in one station and corrected manually the data. Now the loop error is similar to Auriga and Compass (2.9m for a 1967m loop). But I have to check if Therion do the correct average calculation.


If it's still not working with the declination set to zero, perhaps
you should show us a complete small example we can process to see
what is going on?


I attach the original file with the fore/back sight (SCAGUA.th) and a manually averaged  (SCAGUA_avg.th) to compare if Survex and Therion work well. The error loop is similar between the two files (2,9m) but I have to check if the station are positioned at the same coordinates.

Regards,

Evaristo.