correctCoordGPS: Correct the GPS coordinates

Description Usage Arguments Details Value Author(s) Examples

Description

This function build the most probable GPS coordinates of the plot corners from multiple GPS measurements.

Usage

1
2
correctCoordGPS(longlat = NULL, projCoord = NULL, coordRel, rangeX,
  rangeY, maxDist = 10, drawPlot = FALSE, rmOutliers = FALSE)

Arguments

longlat

(optionnal) data frame with the coordinate in longitude latitude (eg. cbind(longitude, latitude)).

projCoord

(optionnal) data frame with the projected coordinate in X Y

coordRel

data frame with the relative coordinate in the same order than the longlat or projCoord

rangeX

a vector of length 2 giving the range for plot relative X coordinates

rangeY

a vector of length 2 giving the range for plot relative Y coordinates

maxDist

a numeric giving the maximum distance above which GPS measurements should be considered as outliers (by default 10 m)

drawPlot

a logical if you want to display a graphical representation

rmOutliers

a logical if you want to remove the outliers from coordinates calculation

Details

You must give one parameter between longlat and projCoord

Value

If you there are no outliers or rmOutliers = TRUE, a list with:

Author(s)

Arthur PERE, Maxime REJOU-MECHAIN

Arthur PERE, Maxime REJOU-MECHAIN

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
projCoord <- data.frame(
  X = c(
    runif(5, min = 9, max = 11), runif(5, min = 8, max = 12),
    runif(5, min = 80, max = 120), runif(5, min = 90, max = 110)
  ),
  Y = c(
    runif(5, min = 9, max = 11), runif(5, min = 80, max = 120),
    runif(5, min = 8, max = 12), runif(5, min = 90, max = 110)
  )
)
projCoord <- projCoord + 1000
coordRel <- data.frame(
  X = c(rep(0, 10), rep(100, 10)),
  Y = c(rep(c(rep(0, 5), rep(100, 5)), 2))
)

aa <- correctCoordGPS(
  projCoord = projCoord, coordRel = coordRel,
  rangeX = c(0, 100), rangeY = c(0, 100)
)
bb <- correctCoordGPS(
  projCoord = projCoord, coordRel = coordRel,
  rangeX = c(0, 100), rangeY = c(0, 100), rmOutliers = TRUE
)
## Not run: 
correctCoordGPS(
  projCoord = projCoord, coordRel = coordRel,
  rangeX = c(0, 100), rangeY = c(0, 100), drawPlot = TRUE
)

## End(Not run)

ArthurPERE/biomass documentation built on May 18, 2019, 2:33 a.m.