Adjustment Computations Adjustment Computations: Spatial Data Analysis

CHAPTER 16

File Format

Horizontal Least Squares Adjustment

This worksheet reads data from a file using the comma separated values (.csv). This file can be created by a ansi wordprocessor such as Notepad, or generated by most spreadsheets. This format has a comma between each number. Only numbers can be entered into the file. This means that station identifiers must be integer values. Angular values are entered in the DDD.MMSS format. Thus an angle of 23°14'56" is entered as 23.1456. 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

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 EX15-9.5.txt is entered as


12,14,1,1,10 //ndist,nang,naz,nctl,nsta

2,507.934,764.652 //unknown stations id,x,y

3,618.952,815.353 //Note that control stations are at end of listing of coordinates

4,723.852,753.287

5,826.128,856.438

6,794.659,1021.655

7,578.741,1103.826

8,652.221,980.245

9,600.595,899.272

10,713.362,877.418

1,415.273,929.868 //control stations id,x,y

1,2,189.436,0.007 //from sta, to sta, distance, S

2,3,122.050,0.007

3,4,121.901,0.007

4,5,145.256,0.007

5,6,168.180,0.007

6,7,231.021,0.007

7,1,238.714,0.007

7,8,143.780,0.007

8,10,119.631,0.007

10,5,114.695,0.007

8,9,96.036,0.007

9,3,85.908,0.007

7,1,2,107.2940,8.9 //backsight sta, instr. sta, foresight sta, angle (DDD.MMSS), S(")

1,2,3,94.4424,11.7

2,3,4,235.0926,13.7

3,4,5,104.0840,12.7

4,5,6,124.2736,11.2

5,6,7,121.3708,9.5

6,7,1,112.2300,8.3

6,7,8,38.2546,9.9

7,8,9,243.1520,14.6

8,9,3,135.0830,18

9,8,7,116.4444,14.6

9,8,10,296.4438,15.0

8,10,5,131.1630,14.3

10,5,6,68.4036,12.3

1,2,150.4251,0.001


The data for this file is from the example problem in Section 15-9.5. Right-click the data reading block and select "Choose File" to browse for the name of the data file.


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 Section 15-9 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 5 is in row 3. 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

j(i) represents the offset in the data file from the first line.

j(i) represents the offset in the data file from the first line.

Angles and standard deviations are converted to radians

to make units consistent in linearized equations.

j(i) represents the offset in the data file from the first line.

Functions

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

distance function

Distance observations (IJ): Coefficients for Equation (15-20)

Angle observations (bif): Coefficients for Equation (15-27)

Azimuth and angle computations

Azimuth Observations (IJ): Coefficients for Equation (15-24)

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

Build Weight Matrix

Least Squares Solution

Follow the least squares solution procedure outlined in Equation (15-7).

___________________________________________________________________________________________

Compute residuals for the observations using equations outlined in Section 15-5.

Compute uncertainties in station coordinates using Equation (15-11).

Determine uncertainties in adjusted observations using Equation (15-3).

Compute error ellipse data as described in Section 15-10.

determine the proper quadrant

t-angle in decimal degrees

Semi-major axis, Su

Semi-minor axis, Sv

 

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