lonlat_to_cartesian: Convert lon/lat to cartesian coordinates

Description Usage Arguments Examples

View source: R/misc.R

Description

Convert lon/lat coordinates to cartesian coordinates by first calculating great circle distance and bearing and then mapping these coordinates into cartesian space. This mapping is relative to the point centre_lat, centre_lon, which should be roughly at the midpoint of the observed data.

Usage

1
lonlat_to_cartesian(centre_lon, centre_lat, data_lon, data_lat)

Arguments

centre_lon

The centre longitude

centre_lat

The centre latitude

data_lon

The data longitude

data_lat

The data latitude

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Centre at QMUL
centre_lon <- -0.040827
centre_lat <- 51.523775
# Data point at Queen Elizabeth Park
data_lon <- -0.016546
data_lat <- 51.542473
lonlat_to_cartesian(centre_lon = centre_lon,
                    centre_lat = centre_lat,
                    data_lon = data_lon,
                    data_lat = data_lat)

Michael-Stevens-27/silverblaze documentation built on May 28, 2021, 5:47 p.m.