The n-vector Approach to Geographical Position Calculations using an Ellipsoidal Model of Earth

The n-vector framework uses the normal vector to the Earth ellipsoid (called n-vector) as a non-singular position representation that turns out to be very convenient for practical position calculations. The n-vector is simple to use and gives exact answers for all global positions, and all distances, for both ellipsoidal and spherical Earth models. This package is a translation of the 'Matlab' library from FFI, the Norwegian Defence Research Establishment, as described in Gade (2010) .

Travis buildstatus AppVeyor buildstatus CoverageStatus CRANversion


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).


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


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



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).


Gade, Kenneth. 2010. “A Non-Singular Horizontal Position Representation.” Journal of Navigation.

Navigation Group, FFI. 2010. “The N-Vector Page.”


nvctr 0.1.1

  • Submission to CRAN.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.1 by Enrico Spinielli, 2 months ago

Report a bug at

Browse source code at

Authors: Enrico Spinielli [aut, cre] , EUROCONTROL [cph, fnd]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports pracma, magrittr

Suggests testthat, knitr, rmarkdown, geosphere, png, knitcitations, covr, spelling

See at CRAN