# Convert London to ECEF
geocentric_fwd(c(-0.1, 51.5))
# With height
geocentric_fwd(c(-0.1, 51.5), h = 100)
# Multiple points
pts <- cbind(lon = c(0, 90, -90), lat = c(0, 0, 0))
geocentric_fwd(pts)
# Round-trip
fwd <- geocentric_fwd(c(-0.1, 51.5, 100))
geocentric_rev(fwd$X, fwd$Y, fwd$Z)
Run the code above in your browser using DataLab