|Calculator of tree positions using
intertree distances and azimuths
The program is written is Visual Basic 6.0, and should work in the Win32-based operating systems. C:\DATA\ directory is required for file I/O. Windows executable / zipped executable. Zipped source code.
Input files (zipped):
Prepare the ASCII, comma-delimited observation file.
1) Copy the parameter file to c:\data\
2) Start the program
3) Input the control points, File | Open photogrammetric map
4) Input the observations, File | Open field observations
5) Triangulate and trilaterate, File | calculate positions
6) View the comma delimited ASCII-results in C:\DATA\results.txt
Check accuracy and possible errors in observations
and run steps 4)-6) again.
The file all.txt has 5294 tree observations made in the images and LiDAR, identified in the field, and used as control points for the positioning of trees.
Structure of the observation file is (ASCII, comma-delimited):
PlotNum, P0TreeID, Sp, NPA, (PATreeID, Dist, Azim) x 5
PlotNum is the plot, where positioning is tried
P0TreeID is the number of the tree to be positioned
Sp is the species of the tree to be positioned
NPA is the number of trees (control points), 1-5
(PATreeID, Dist, Azim) x 5
ID of control point, distance and azimuth towards it,
Missing values are denoted with -99
In the example file, the origins of plots 101 and 2 were positioned. Origin of plot 101 four times (IDs 201-204) and origin of plot 2 once (ID 201). The number of trees (control points) was 3, 4, 4, 4, and 3 in the tries. -99 indicates missing observations.
The output file has lots of information. The XY-solution and the standard errors of X and Y (SigmaX, SigmaY) are important. SigmaX and SigmaY delineate a rectangle in the XY-plane that contains the 67-% confidence ellipse of the position. SigmaX and SigmaY s.b. below 0.35 m. If the errors are large, check first for typos. The error can be in the distances, azimuths, or the the control points (if you have identified the wrong tree).
Case // Line # in the observation file
NumofIte // Number of iterations required for solution
Plot-id, // Plot code
Tree-id, // Tree-ID of the positioned tree
Sp, // Sp of the positioned tree
X_ini, // Initial approximation of X
Y_ini, // Initial approximation of Y
X_adj, // Solution, X
Y_adj, // Solution, Y
SigmaNull, // Mean unit weight, ~1.0
SigmaX, // Standard error of X
SigmaY, // Standard error of Y
Tau, // Statistics needed in rejecting outliers
NPA, // Number of control points/trees 1-5
NumOfObs, // # of observations = 2*NPA + N_dist + N_azim
Tree, // Tree-ID of intertree observations
Sp, // Sp of intertree observatiosn
Obs_X, // Photogrammetric X
Obs_Y, // Photogrammetric Y
X_adj, // Adjusted X (solution)
Y_adj, // Adjusted Y (solution)
Res_Azim, // Residual after adjustment, radians
Res_Dist, // Residual after adjustment, meters
IsDist, // Boolean, was distance observed or not?
BaardaDist, // Normalized residual, largest is suspicious
Obs_dist, // Observed distance
Is_Azim, // Booleqn, Was azimuth observed or not?
Baarda_Azim // Normalized residual, largest is suspicious
Obs_azim // Observed intertree azimuth (from unknown)
TypeofIni // POLAR = from azimuths and distances,
INTERSEC = from azimuths (intersection)