Skip to content

Commit

Permalink
rename mk_vrs to llh_summary
Browse files Browse the repository at this point in the history
  • Loading branch information
wpetry committed Sep 19, 2023
1 parent 102f0cf commit 601e868
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export(as_ef_geom)
export(check_ef_geom)
export(check_rtk_range)
export(mk_vrs)
export(llh_summary)
export(read_emlid)
export(update_base)
import(ggplot2)
Expand Down
6 changes: 3 additions & 3 deletions R/mk_vrs.R → R/llh_summary.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Convert LLH log file to inputs for downloading CORS/VRS corrections
#' Summarize LLH log file to aid download of CORS/VRS corrections
#'
#' @param llh File path to .LLH log file
#' @param rnd Number of minutes to round to on both ends of the logging duration (see Details)
Expand All @@ -21,10 +21,10 @@
#'
#' @examples
#'\dontrun{
#' mk_vrs(llh = "path/to/file.llh")
#' llh_summary(llh = "path/to/file.llh")
#'}
#'
mk_vrs <- function(llh, rnd = 0, ...) {
llh_summary <- function(llh, rnd = 0, ...) {
# read in log file
rawdat <- read_llh(llh, ...)
# make output
Expand Down
12 changes: 6 additions & 6 deletions R/update_base.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ update_base <- function(points, newbase, base_row = NULL,
if(is.null(base_row) & nrow(newbase) > 1L) stop("Must specify which row of 'newbase' contains the base position")
if(is.null(base_row)) base_row <- 1L
newbase <- newbase[base_row, ]
offsetN <- newbase$latitude_dd - points$Base.latitude
offsetE <- newbase$longitude_dd - points$Base.longitude
offsetU <- newbase$ellipsoidal_height_m - points$Ellipsoidal.height
offsetN <- newbase$Latitude - points$Base.latitude
offsetE <- newbase$Longitude - points$Base.longitude
offsetU <- newbase$`Ellipsoidal height` - points$Ellipsoidal.height
out <- points
out$Longitude <- out$Longitude + offsetE
out$Latitude <- out$Latitude + offsetN
out$Ellipsoidal.height <- out$Ellipsoidal.height + offsetU
out$Base.longitude <- newbase$longitude_dd
out$Base.latitude <- newbase$latitude_dd
out$Base.ellipsoidal.height <- newbase$ellipsoidal_height_m
out$Base.longitude <- newbase$Longitude
out$Base.latitude <- newbase$Latitude
out$Base.ellipsoidal.height <- newbase$`Ellipsoidal height`
if(!is.null(destfile)) utils::write.csv(out, file = destfile, na = "")
return(out)
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ensuring they can be imported into Emlid Flow
- `as_ef_geom`: attempts to automatically coerce non-point geometries into (multi)point
geometries that can be imported into Emlid Flow
- `check_rtk_range`: checks that points are within LoRa antenna range for RTK surveying
- `llh_summary`: summarizes the position and duration of .LLH log files

## Planned features
### Prepare .csv file for Emlid Flow import
Expand Down
14 changes: 7 additions & 7 deletions man/mk_vrs.Rd → man/llh_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 601e868

Please sign in to comment.