Adjustment Computations Adjustment Computations: Spatial Data Analysis

CHAPTER 21

File Format

This worksheet reads data from a file using either comma separated values (.csv) or space separated text files. The file can be created by a text editor such as Notepad, or generated by most spreadsheets. Only numbers can be entered into the file. This means that station identifiers must be integer values. Angular values are entered in the DDD MM SS format. Thus an angle of 23°14'56" is entered as 23 14 56. The format for the file is


Num of dist (ndist), num of ang (nang), num of az (naz), num of control stations (nsta), number of stations (nsta)

Unknown station data: id (integer), x, y //Note this is the opposite order for stations from ADJUST

Control station data: id (integer), x, y

Distance observations: from station id, to station id, horizontal distance, standard deviation

Angle observations: backsight station id, instrument station id, foresight station id, angle, standard deviation (")

Azimuth observations: from station id, to station id, azimuth, standard deviation (")


The example file Example 21.1 is entered as

19 17 0 2 13 //ndist, nang, naz, nctl, nsta

1 2477233.72 420353.59 //unknown stations

2 2477497.89 419951.98 //id x y
3 2477832.55 420210.21
4 2477991.64 420400.58
5 2477630.43 420567.45
6 2477665.22 420323.32
102 2476455.89 419741.38
103 2476735.05 419912.42
201 2476576.23 419589.23
202 2476948.74 419331.29
203 2477463.84 419819.58
2000 2476334.60 419710.09 //control stations
2001 2476297.98 419266.82 //id x y
2001 201 425.90 0.022 //distance observations
201 202 453.10 0.022 //from to distance s
202 203 709.78 0.022
203 3 537.18 0.022
5 3 410.46 0.022
5 4 397.89 0.022
5 6 246.61 0.022
5 1 450.67 0.022
5 2 629.58 0.022
3 2 422.70 0.022
3 1 615.74 0.022
3 5 410.44 0.022
3 6 201.98 0.022
3 4 298.10 0.022
1 2 480.71 0.022
1 3 615.74 0.022

2000 102 125.24 0.022
102 103 327.37 0.022
103 1 665.79 0.022
102 2000 2001 109.10540 25.5 //angle observations
2000 102 103 162.58160 28.9 // backsight occupied foresight ° ' " s"
102 103 1 172.01430 11.8
2000 2001 201 36.04262 7.4
2001 201 202 263.54187 9.7
201 202 203 101.49550 8.1
202 203 3 176.49100 8.4
203 3 2 8.59560 6.5
2 1 3 316.48005 6.3
3 5 4 324.17440 8.1
6 5 3 338.36385 10.7
1 5 3 268.49325 9.8
2 5 3 318.20545 7.0
2 3 1 51.07110 7.2
2 3 5 98.09365 10.3
2 3 6 71.42515 15.1
2 3 4 167.32280 14.5

Blunder Detection in Horizontal Networks


Introduction

The least squares method can be used in any situation where mathematical relationships between observations and unknown parameter are known. The least squares adjustment for horizontal surveys discussed in Chapters 14 thru 16 is an example of this. This worksheet demonstrates how to develop observation equations for the adjustment, and then solve the problem using the least squares method.

The stations and observations are listed in input tables. The unknown stations should be listed first in the table sta. Station identifiers must be integer values. Observational tables use findsta to indentify the row in table sta for the station identifer. For example station R is in row 1. To create the data file, follow the instructions to the right.

Library

Parsing the Horizontal Data File for a Least Squares Adjustment

Read file hlsq.csv

findsta is used to match the station identifier to its storage location in the sta input table.

Search through station table until "s" is found

Functions

The following functions are used to develop the linearized equations for a horizontal adjustment.

distance function

Distance observations (IJ): Coefficients for Equation (14.9)

Angle observations (bif): Coefficients for Equation (15.13)

Azimuth and angle computations

Azimuth Observations (IJ): Coefficients for Equation (15.9)

Coefficients

Form matrices

BldMat and BldWt create the J, K, and W matrices. Angular values which are computed using radian units for the angles are converted to seconds for readability. BldMat uses the above functions to compute the J and K coefficients.

Zero matrices J and K

Add distances to J and K

Add instrument station

Add sighted station

Add value to K matrix

Add angle observations

Offset by distances

Add backsight station

Add instrument station

Add foresight station

Convert K matrix value to "

Add azimuths observations

Offset by angles and dist

Add instrument station

Add sighted station

Convert K matrix value to "

Return J and K matrices

Build Weight Matrix

First iteration

Least Squares Solution

Follow the least squares solution procedure outlined in Section 11.10.

Transfer results to s matrix for output

Compute residuals for the observations using equations outlined in Section 12.4b.

Compute uncertainties in station coordinates using Equation (13.24).

Coordinate uncertainties

Determine uncertainties in adjusted observations using Equation (13.25).

Compute error ellipse data as described in Section 19.18 to 19.20.

determine the proper quadrant

t-angle in decimal degrees

Semi-major axis, Su

Semi-minor axis, Sv

Spacing line

Compute Qvv for blunder detection

Compute standardized residuals and redundancy numbers

Standardized residuals

Redundancy numbers

Compute tau

Change a to the desired probability

In data snooping 3.29 is used as the rejection criteria. The following routines will mark possible blunders with three asterisks. Only remove the observation with the highest standardized residual (Sv).

Set reject = t if you wish to use the tau statistic.

Adjusted Distance Observations

This additional columun is required for stacking of output matrices.

//spacing line for later stacking of output matrices

The following line is used to set dout to "" if the number of distances is 0 so that it won't appear in the output file.

Adjusted Angle Observations

Spacer row

The following line is used to set aout to "" if the number of angles is 0 so that it won't appear in the output file.

Adjusted Azimuth Observations

No azimuths in file, so an error occurs here

Spacer row

The following line is used to set zout to "" if the number of azimuths is 0 so that it won't appear in the output file.

Create output file by stacking matrices. This routine only stacks arrays.

Output file is written to an EXCEL spreadsheet file called "Blunder output.xls"

<-- You can change the name of the output file here.

 

Look for updates at http://surveying.wb.psu.edu/psu-surv/free.htm