Dat2site - calculate trial coordinates

Overview

dat2site is a program to add new stations to a coordinate file. The new stations are defined by observations in data files. The program is used for calculating initial coordinates for an adjustment where they are not know in advance. For example it can be used to determine the coordinates of an eccentric station from the observations that define it. Note that the coordinates are not necessarily accurate. Once trial coordinates have been calculated by dat2site the SNAP program can be run to generate accurate coordinates.

The program takes as input an optional file of known stations coordinates and one or more data files. It then identifies all the station codes referenced in the data files which are not listed in the coordinate file. It progressively calculates coordinates for the unknown stations using observations to the known stations. It can locate stations using the following methods:

calculating an offset position using GPS baseline vector

calculating a position using a distance and azimuth from a known station (the azimuth may be defined by an angle observation relative to another known station)

traversing by a series of distances and angles between two (or more) known stations

calculating using azimuths from two or more known stations

calculating using distances from three or more known stations (distances from just two station are ambiguous)

calculating from an angle and distance to a known station and an angle to at least one other unknown station

calculating by resection using angles to three or more known stations

calculating the elevation using the height difference to a known station. The height difference may be calculated from a zenith distance if the distance (horizontal or slope) between the known and unknown station is known or can be inferred.

GPS data are used to calculate horizontal and vertical coordinates directly. When dat2site uses terrestrial data it calculates either horizontal or vertical coordinates, but not both.

Vertical coordinates are calculated using height differences to vertically fixed stations. The height difference may be measured directly using levelling or may be derived from a zenith distance for two stations between which the distance is known (either measured or inferred from already fixed horizontal coordinates).

Where distance measurements are used to calculate horizontal coordinates the program uses horizontal or ellipsoidal distances in preference to slope distances. It will reduce slope distances to horizontal if it has information to do so. However if this information is not available it will treat a slope distance as if it were horizontal. Obviously this is not correct, but it may be adequate to calculate approximate coordinates for stations.

The main weakness of the program is that it does very little checking of the data. If the data files contain gross errors or incorrectly named stations then dat2site will generate very inaccurate station coordinates. Also it ignores the errors assigned to observations and ignores instrument and target heights.

The coordinates generated by dat2site are in no way correct. The program uses very simplistic algorithms for many calculations. For example some calculations are done using a projection without correcting the data to the projection. The reason for doing this is simply that the program is intended only to calculate approximate coordinates for input to a least squares adjustment. The coordinates generated should not be considered to have any value beyond that.

Running dat2site

The program can be run in interactive mode or in batch mode. In interactive mode it can create a new coordinate file, whereas in batch mode it can only be used to add stations to an existing coordinate file.

Before running the program you must create the input files. These are the data files and the (optional) input coordinate file. If the program is running in batch mode then you can also use a SNAP command file to specify the names of the coordinate and data files. The formats of these files are described in the SNAP users manual. The only commands that dat2site reads from a command file are the #coordinate_file and #data_file commands.

To run the program in batch mode use the command

dat2site [options] command_file_name

or

dat2site [options] -f coord_file_name data_file data_file ...

The program will read the data files, form a list of stations which are missing from the coordinate file, and attempt to calculate the locations of the stations. Those stations which can be located are added to the output coordinate file.

The program can take the following options:

-l

Just list the stations referenced in the data file. Don't calculate any coordinates.

-m

Just list the stations referenced in the data file that are missing from the station file. Don't calculate any coordinates.

-u

Use rejected observations to locate stations. By default rejected observations are ignored.

-o filename

Specifies an output file for list of stations from the -l or -m options.

To run the program interactively, just enter the command

dat2site

You will then be prompted for the input coordinate file and the names of the data files. If the coordinate file does not exist you are given the option of creating a new file. The program will then read the data files and build a list of stations that are missing from the coordinate file. It will locate as many as it can, then ask for the coordinates of the remaining stations. After you have entered the coordinates of one or more of these stations it will attempt to locate further stations based upon that input.

When the program has finished it program will generate a new version of the coordinate file with the same name as the input file, but with extension .NEW.

It also creates a listing file. This has the same name as the command file, or the coordinate file if there is no command file, but with extension .lis. It contains a list showing each station that has been fixed and showing how it has been located. It also lists any outstanding stations which have not been located.

See also:

Dat2site example

Command files

Coordinate files

Data files