Hi,

Ok OIly and Wookey, you are right, my formula has not been very lucky. It was an attempt to understand what error he was experiencing when compiling data with fore/back bearings. I found a large difference in loop closure error between Auriga (2.85 m in 1967m loop), Compass (2.9m) and Therion (14m).


Debugging the compilation I have found that the data transferred to Survex (data.svx), don't have sense to me. I have searched in the code source and found the complicated formula. I made my own formula in a Excell, and calculate the average. With this I have detected a strong magnetic anomaly in one leg (Auriga has this bearing manually discarded, and the translation to Compass was OK, but to Therion the fore-bearing was translated with a 0, a 56 degrees difference with the inverse back-bearing). After to correct the magnetic anomaly and to calculate the fore-bearing with the inverse back-bearing, the loop error it's OK too in Therion (2.9m).

Only that it was necessary to understand what numbers Therion was going through to Survex, and that some degrees were deviating from those calculated manually. With the two files attached in the previous message:
    -a file with magnetic declination to 0 and fore/back bearings
     -a file with DM=0 and my average bearings.

I have compared the results, that are the same. After looking carefully at the files and the compilation log, I found the difference. The data transferred to Survex are:  bearing - magnetic declination - meridian convergence.   These two components are what made me see different data between those calculated by Therion and those calculated manually.

After some more checks, I have verified that Therion is correctly calculating the average between fore/back bearings. MY MISTAKE. The issue is closed.

Best regards and thanksfor the patience.

Evaristo.


El 17/05/2018 a las 15:02, Wookey via Therion escribió:
On 2018-05-17 09:25 +0200, Evaristo Quiroga via Therion wrote:
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.
Yes a warning should probably be issued about poor data, but it _is_ a
problem with your formula. It's just an example showing that all cases
have to be dealt with correctly, including the wrap-around at 0/360
(or 0/400 for grads) and your simplified formula doesn't.

An example with a much smaller difference between back and foresight
could still be constructed to show the issue:

Fore: 175, Back: 0 AverageBearing= (175+0-180)/2 = -2.5. That's
wrong. It should be 177.5 in this case.

Wookey


_______________________________________________
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


_______________________________________________
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

Reply via email to