loran2deg: Loran Coordinate Conversion

View source: R/loran2deg.R

loran2degR Documentation

Loran Coordinate Conversion

Description

Function to convert Loran coordinates format to decimal latitude-longitude degree format.

Usage

loran2deg(x, y, z)

loranxy2deg(x, y)

loranxz2deg(x, z)

as.loran(x)

is.loran(x)

Arguments

x

Numeric vector of Loran X coordinates.

y

Numeric vector of Loran Y coordinates.

Value

Data frame with fields long and lat in decimal degree format with the same dimensions as x and y.

Functions

  • loranxy2deg(): Convert Loran XY coordinates.

  • loranxz2deg(): Convert Loran XZ coordinates.

  • as.loran(): Clean up character strings containing Loran coordinates.

  • is.loran(): Determine if character string is a Loran-type coordinate.

Examples

# Check whether character string is a candidate loran coordinate:
is.loran(c("", "25.000", "0025500", "14456.123", "014512345", "14'456", "0000"))

# Loran coordinate clean-up function:
as.loran(c("", "25.000", "0025500", "14456.123", "014512345", "14'456", "0000"))

# Convert a Loran XY coordinate to decimal degree format:
loran2deg(14500, 29500)

# Convert a vector of Loran XY coordinates to decimal degree format:
loran2deg(seq(14000, 14500, len = 21), seq(29000, 29500, len = 21))

# Loran XZ conversion:
loranxz2deg(14508.27, z = 43316.88) # Return latitude

TobieSurette/gulf.spatial documentation built on Sept. 26, 2024, 7:41 p.m.