Created
July 29, 2016 13:59
-
-
Save dakotabenjamin/f25420c0b4cc03643f5746290a9d75ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################## | |
# Positional Accuracy Assessment # | |
# Script by Dakota Benjamin # | |
# Based off ASPRS NSSDA Standard # | |
# Drafted 07-13-2016 # | |
################################## | |
#### Setup #### | |
rm(list=ls()) | |
setwd("D://Akron_subset/agisoft/") | |
#### Load Data #### | |
gcp.err = read.csv("edited_GCP_errs.txt") | |
gcp.err.tot = gcp.err[21,6:9] | |
gcp.err = gcp.err[-21,] | |
print(cbind(gcp.err$X.Label ,gcp.err[,6:9])) | |
#### Horizontal accuracy #### | |
sq.diff.x = ( gcp.err$X.East - gcp.err$X_est )^2 | |
sq.diff.y = ( gcp.err$Y.North - gcp.err$Y_est )^2 | |
colK = sq.diff.x + sq.diff.y | |
hoz.sum = sum(colK) | |
hoz.avg = mean(colK) | |
hoz.rmse = tot.avg^0.5 | |
hoz.nssda = tot.rmse * 1.7808 | |
cat("Tested", hoz.nssda, "meters horizontal accuracy at 95% confidence level.") | |
#### Vertical Accuracy #### | |
sq.diff.z = ( gcp.err$Z.Altitude - gcp.err$Z_est )^2 | |
vert.sum = sum(sq.diff.z) | |
vert.avg = mean(sq.diff.z) | |
vert.rmse = vert.avg^0.5 | |
vert.nssda = vert.rmse * 1.9600 | |
cat("Tested", vert.nssda, "meters vertical accuracy at 95% confidence level.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment