Learn R Programming

nvctr

Overview

The nvctr package implements the n-vector approach to geographical position calculations using an ellipsoidal model of Earth as described in (Gade 2010).

Implementations in various computer languages can be found at the n-vector page (Navigation Group 2010).

Installation

You can install the development version of nvctr from GitHub with:

devtools::install_github("euctrl-pru/nvctr")

or the CRAN version (when this package will land to CRAN):

install.packages("nvctr")

Usage

nvctr can be used to solve geographical position calculation like (example numbers refer to the ones in the vignette):

  • Calculate the surface distance between two geographical positions (Example 5).
  • Find the destination point given start point, azimuth/bearing and distance (Example 8).
  • Find the mean position (center/midpoint) of several geographical positions (Example 6).
  • Find the intersection between two paths (Example 9).
  • Find the cross track distance between a path and a position (Example 10).

References

Gade, Kenneth. 2010. “A Non-Singular Horizontal Position Representation.” Journal of Navigation. https://doi.org/10.1017/S0373463309990415.

Navigation Group, FFI. 2010. “The N-Vector Page.” https://www.navlab.net/nvector/.

Copy Link

Version

Install

install.packages('nvctr')

Monthly Downloads

143

Version

0.1.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Enrico Spinielli

Last Published

October 28th, 2020

Functions in nvctr (0.1.4)

R_EL2n_E

Find n-vector from the rotation matrix (direction cosine matrix) R_EL
R_EN2n_E

Find n-vector from R_E
n_E_and_wa2R_EL

Find R_EL from n-vector and wander azimuth angle
cross_track_intersection

Calculate cross-track intersection
deg

Convert angle in radians to degrees
nvctr

nvctr: non-singular geographical position calculations
R2xyz

Find the three rotation angles about new axes in the xyz order from a rotation matrix
n_EA_E_and_p_AB_E2n_EB_E

Find position B from position A and delta
n_EB_E2p_EB_E

Convert n-vector to cartesian position vector in meters
altitude_azimuth_distance

Calculate the altitude, azimuth and distance of B from A
xyz2R

Create a rotation matrix from 3 angles about new axes in the xyz order.
p_EB_E2n_EB_E

Convert cartesian position vector in meters to n-vector
R2zyx

Find the three angles about new axes in the zyx order from a rotation matrix
lat_lon2n_E

Convert (geodetic) latitude and longitude to n-vector
cross_track_distance

Compute the cross-track distance from a great circle arc
R_Ee

Select the axes of the coordinate frame E
n_E2R_EN

Find the rotation matrix R_EN from n-vector
along_track_distance

Compute the along-track distance from a great circle arc
zyx2R

Create a rotation matrix from 3 angles about new axes in the zyx order.
%>%

Pipe operator
n_E2lat_lon

Convert n-vector to latitude and longitude
n_EA_E_and_n_EB_E2p_AB_E

Find the delta position from two positions A and B
unit

Make input vector unit length, i.e. norm == 1
rad

Convert angle in degrees to radians.