Snapspec uses a configuration file to defining the specifications for each order to be tested. The name of the configuration file can be specified on the snapspec command line - by default it is called snapspec.cfg. Snapspec will look for the configuration file first in the same directory as the snap binary file, and then in the directory in which the snapspec program is installed.
The configuration file includes both general settings and the specifications of orders. It can also include comments on lines beginning with "!". Each setting is defined on a line in which the first word is the command name, and the following text define the command options. The file can include the following commands.
test order accuracy_specification
Each order is defined by a test command, which specifies the accuracy requirements a station must achieve to be assigned to that order. The order test commands must be ordered from the highest (most accurate) to lowest (least accurate) order.
The accuracy specification comprises a number of components as defined by the snapspec algorithm. These are:
| h_abs_max ## mm | The maximum absolute horizontal error of coordinates |
| h_rel_to_control ## mm ## ppm | The maximum horizontal error relative to a control station (includes a distance dependent component). |
| h_rel ## mm ## ppm | The maximum permissible horizontal relative error of coordinates. |
| h_rel_min_abs ## mm | Coordinates with an absolute horizontal error less than this are assumed to pass the relative accuracy tests (allows more efficient processing or relative accuracy tests). |
| v_abs_max ## mm | The maximum absolute vertical error of coordinates |
| v_rel_to_control ## mm ## ppm | The maximum vertical error relative to a control station (includes a distance dependent component). |
| v_rel ## mm ## ppm | The maximum permissible vertical relative error of coordinates. |
| v_rel_min_abs ## mm | Coordinates with an absolute vertical error less than this are assumed to pass the relative accuracy tests (allows more efficient processing or relative accuracy tests). |
| range ##### m | The maximum length of line for which relative accuracy tests are applied |
| min_rel_acc # | The minimum number of relative accuracy tests required to pass a coordinate. |
| autorange | If present then the maximum length for relative accuracy tests will be based upon the distance to the nearest control mark. |
| no_test | Specifies that no tests will be applied for this order. It allows the order to be defined so that it can be used in station configuration files or in coordinate files but will not be assigned snapspec as a result of accuracy testing. |
confidence percentage
Defines the confidence level to be used for calculating error ellipses and vertical errors for testing accuracy.
vertical_error_factor factor
Defines the factor by which vertical errors are multiplied when comparing them with horizontal orders in order to choose which station to reject (see the description of the snapspec algorithm). (Note: this is only used in selecting stations, not in calculating the vertical error for vertical accuracy tests)
error_type apriori|aposteriori
Defines whether the accuracy tests are based on apriori or aposteriori statistics.
default_order order
Specifies the order that will be assigned to stations that fail to meet the accuracy standard for any of the orders.
limit_order order station_list
Specifies the best (most accuracte) order that specific stations will be considered for. The station list can include specific stations, or groups of stations identified by classification.
set_priority priority station_list
Sets the priority of the selected stations to priority - an integer value. The higher the value the lower the priority. Higher priority stations are preferred for each order.
ignore station_list
The specified stations will be ignored in the order calculation.
configuration configuration_file_name
Reads additional configuration information from a separate configuration file.
station_configuration_file station_config_file csv
The station configuration file assigns best potential order and/or priority to stations. The format is space delimited by default, but can this can be a CSV file if the csv option is specified. The first line defines the fields in the file, which must be "code" and then "order" and/or "priority". Additional fields in the file are ignored. Orders can be any order defined in the configuration, and priorities are positive integer numbers. Either the priority or order fields can contain "*" which will cause the station to be ignored. Empty fields and fields containing just "-" are ignored.
min_relative_accuracy_tests ntests
Specifies a default minimum number of relative accuracy tests required to pass a coordinate. If specified the minimum for each test will be set to at least this number (though a higher value may be specified for individual tests).
options option ...
Specifies options controlling the tests. The following options can be used:
| limit_orders_by_control | limits the order tests to orders worse than the lowest ordered control station. This is equivalent to the snapspec -a command line option. |
| fail_if_no_relacc_tests | Controls the behaviour when there are no relative accuracy tests available for a station (all other stations out of range or already rejected for the order). By default these stations are accespted for the order - this option makes them rejected. |
| no_rel_acc_by_abs_optimisation | This disables the optimisation to avoid calculating relative accuracies for tests where the absolute accuracy information is sufficient |
| strict_rel_acc_by_abs_optimisation | This makes the optimisation rigorous by not assuming positive correlation between mark coordinates. This makes the optimisation less efficient. |
| ignore_constrained_stations | In 3d tests this treats causes stations which are fixed in one ordinate (horizontal or vertical) but not in the other to be ignored. By default these stations are tested with the fixed ordinate treated as being perfect |
| test_3d | Apply both horizonal and vertical tests regardless of the adjustment |
| test_horizontal | Apply only horizonal accuracy tests |
| test_vertical | Apply only vertical accuracy tests |
| split_output_crd_by_order | If creating an output coordinate file then split it into multiple files for each order |
| use_covariance_cache | Create a cache of the expanded covariance matrix if it is claculated. Equivalent to the -v command line option. |
log_level level ...
Defines the amount of information recorded in the log file. This may be useful for analysing the assignment of station orders when the results are unexpected. This is can include any of the following options:
| steps | list the steps used in assigning orders |
| test_details | lists details of specific tests |
| accuracy_calcs | lists details of accuracy calculations |
| distance_calcs | lists calculated distances |
| rel_acc_calcs | lists additional information about relative accuracy calcs |
| timing | lists timings of accuracy tests |
| debug | lists all log output except timing |
output_csv filename
Create a CSV formatted output file providing information on each station used in the analysis (including the output orders). This replaces the lists of stations and orders in the listing file and is more useful for subsequent analysis and processing. If no filename is supplied the output file name will be based on the name of the snap binary file. If the name starts with "+" then the rest of the filename will be appended to the name of the snap binary file.
output_crd filename
Generate an output coordinate file of the stations and their calculated orders. This is equivalent to the -u or -f command line options. Use the split_output_crd_by_order to generate separate output files for each order. If no filename is supplied the coordinate file name will be based on the name of the snap binary file. If the name starts with "+" then the rest of the filename will be appended to the name of the snap binary file.
The following is an annotated example of a configuration file for assigning horizontal orders which illustrates the commands that can be included in the configuration file.
! Configuration file for snapspec ! Order accuracy requirements test 2 h_rel 3 mm 1 ppm test 3 h_rel 10 mm 3 ppm test 4 h_rel 10 mm 10 ppm test 5 h_rel 10 mm 30 ppm test 6 h_rel 20 mm 100 ppm default_order 8 ! Error type used for settings confidence 95% error_type apriori vertical_error_factor 1.0 ! Limit orders based on mark type limit_order 6 marktype=peg ! Output option log_level steps test_details