This is a very simple to use macro written in Excel VBA for calculating and redistributing the error vector to close a traverse.

## Background

I wrote this program for my geologic field methods class. A traverse is a simple way to plot points of interest on a 2D map. When in the field, you may not have, or want to carry, appropriate surveying equipment or may not need that level of accuracy, so you can pace from point to point measuring the compass bearing and counting number of paces. You must close the traverse by returning to the original (starting) station or point. You will need to have your conversion factor calculated to feet per pace. One way of doing this is measuring out a known distance, say 100 feet, and count the number of paces. Then take 100 feet divided by your count. A pace is two steps. Start with your left and count every time your right foot makes contact with the ground. Also, bearings must be in azimuth (0 to 360 degrees). Refer to any geologic field book for more information.

## Using the Code

Download the batch file (*SimpleTravCalc1.bas*). Open Excel and enable the developer tab in excel options. Click the visual basic button. Right click "This Workbook" and import file.

Once the file is loaded, return to Excel. Click macros and run SimpleTravCalc1. Make sure you start with a blank excel file.

It is easiest to use if you have your notes setup in the same order as the input boxes arise. Below is a summary:

For all traverses

- Title of your project

- Total number of traverses (each traverse creates a new sheet)
- Conversion factor
- There is no conversion calculator here. That should be done before entering field.

For each traverse (for next loop)

- Number of vectors in traverse, or number of stations would be the same.
- Station occupied (only for first station, this is the point you will close to).
- Station sighted
- Forward bearing
- Reverse bearing
- Paces

Below is a sample of a 21 station traverse I recently did and how is set up in my field book.

occupied | sighted | forward | reverse | paces |

16 | 101 | 48 | 228 | 12.5 |

101 | 14 | 196 | 8 | 8 |

14 | 8 | 355 | 178 | 10 |

8 | 13 | 20 | 197 | 2.5 |

13 | 11 | 265 | 79 | 6.5 |

11 | 17 | 297 | 112 | 10.5 |

17 | 7 | 135 | 315 | 4.5 |

7 | 6 | 71 | 250 | 5.5 |

6 | sd1 | 310 | 130 | 12.5 |

sd1 | 19 | 79 | 259 | 6 |

19 | 105 | 285 | 105 | 12 |

105 | 4 | 229 | 49 | 8.5 |

4 | 1 | 165 | 345 | 2.5 |

1 | 5 | 75 | 249 | 8.5 |

5 | lp1 | 201 | 18 | 10.5 |

lp1 | 18 | 227 | 36 | 11.5 |

18 | 3 | 90 | 270 | 13.5 |

3 | 15 | 283 | 96 | 5 |

15 | 20 | 155 | 332 | 10 |

20 | mh1 | 36 | 219 | 14.5 |

mh1 | 16 | 182 | 359 | 6 |

Here is how to use it for those less inclined to code. If you set up your notes is this manner, you just need to read across from left to right, ignoring the occupied station after the first entry. It will automatically copy down. The angle given, theta_A, is the average of the forward bearing and the reverse bearing in the quadrant of the forward bearing. The next value given is the distance, r, in feet (or whatever your conversion factor was) based on the number of paces; r = (conversion factor)*(number of paces). You will see X and Y components of the vector calculated which necessary for error vector calculation, but will be removed later. After you have typed in all values, you’re done. Let the program continue to work through and the output is a corrected bearing, theat_C, and corrected distance, r_C, after error vector distribution. Now you have a closure error of zero. The most important thing is the percent error. If your error is high, you may want to go traverse your points again and check your bearings. Also, check that your forward bearing minus your reverse bearing is approximately plus or minus 180 degrees. Below is an example of the final product from the data given above.

Occupied | Sighted | theta_A | r | theta_C | r_C |

16 | 101 | 48 | 61.275 | 48.0394 | 61.29694 |

101 | 14 | 192 | 39.216 | 191.8628 | 39.23018 |

14 | 8 | 356.5 | 49.02 | 356.6523 | 48.96217 |

8 | 13 | 18.5 | 12.255 | 19.38834 | 12.24979 |

13 | 11 | 262 | 31.863 | 261.7947 | 31.65447 |

11 | 17 | 294.5 | 51.471 | 294.5222 | 51.18664 |

17 | 7 | 135 | 22.059 | 134.6468 | 22.36208 |

7 | 6 | 70.5 | 26.961 | 71.01378 | 27.25318 |

6 | sd1 | 310 | 61.275 | 310.1342 | 60.87207 |

sd1 | 19 | 79 | 29.412 | 79.4772 | 29.81805 |

19 | 105 | 285 | 58.824 | 284.9506 | 58.30384 |

105 | 4 | 229 | 41.667 | 228.3065 | 41.39813 |

4 | 1 | 165 | 12.255 | 162.7177 | 12.6238 |

1 | 5 | 72 | 41.667 | 72.5625 | 42.18946 |

5 | lp1 | 199.5 | 51.471 | 198.7071 | 51.48856 |

lp1 | 18 | 221.5 | 56.373 | 220.7752 | 56.10527 |

18 | 3 | 90 | 66.177 | 90.24229 | 66.93403 |

3 | 15 | 279.5 | 24.51 | 279.1045 | 23.67116 |

15 | 20 | 153.5 | 49.02 | 152.7902 | 49.68415 |

20 | mh1 | 37.5 | 71.079 | 38.22963 | 71.36235 |

mh1 | 16 | 180.5 | 29.412 | 178.6954 | 29.76824 |

| | | 887.262 | | |

| | | | | |

| | | | | |

Excercise 4 | | | | |

traverse1 | | | | | |

Conversion Factor | 4.902 | | | |

Error Vector Magnitude | 10.97458 | | | |

Error Vector Direction | 110.5151 | | | |

Error Percent | 1.236904 | | | |

Important!!! This is a very simple macro and still needs much work, especially in error handling and handling user input error. If you screw up, start over. I will do my best to keep developing it until it is something more user friendly and a nicer GUI.

In the future, I will update this page to include code snippets and how they work, especially in error vector calculation and error vector distribution.

## Points of Interest

The macro is very simple and not very "pretty." Future developments include a more comprehensive dialog box to include the options for paces or distance (if using a measuring tape). Two other calculators are yet to be written: one to convert from quadrant bearings to azimuthal and one for calculating conversion factor if not yet calculated.

Future development projects hope to include creating false X and false Y coordinates, searching through all traverse worksheets and averaging X Y coordinates for repeated stations in multiple traverses. After false X and false Y coordinates are calculated relative to some (0,0) reference point, inputing GIS coordinates from a GPS receiver, recalculating new coordinates that would fit the GIS. I also hope to rebuild in Python for direct integration with GIS applications.

The overall objective is use statistics to make the best possible map, or locate points as accurately as possible.