# cross_track_distance: Compute the cross-track distance from a great circle arc In nvctr: The n-vector Approach to Geographical Position Calculations using an Ellipsoidal Model of Earth

## Description

Compute the cross-track distance of a body, 'b' (for example a ground level projection position of an aircraft), from a great circle arc determined by two geographical coordinates, ‘a1' and 'a2' (for example an airport’s runway thresholds).

## Usage

 `1` ```cross_track_distance(b, a1, a2) ```

## Arguments

 `b` the geographical coordinates (WGS84) of a body: a vector of longitude, latitude (in decimal degrees) and eventually altitude (in meters) `a1` the geographical coordinates (WGS84) of one end of a great circle arc: a vector of longitude, latitude (in decimal degrees) and eventually altitude (in meters) `a2` the geographical coordinates (WGS84) of the other end of a great circle arc: a vector of longitude, latitude (in decimal degrees) and eventually altitude (in meters)

## Value

the surface cross-track distance from 'b' to the arc 'a1' - 'a2'

Other utilities: `along_track_distance()`, `altitude_azimuth_distance()`, `cross_track_intersection()`

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```## Not run: b <- c(8.086135, 49.973942, 6401) # EDDF: 07R (longitude, latitude, altitude) a1 <- c(8.53417, 50.0275, 328) # EDDF: 25L a2 <- c(8.58653, 50.0401, 362) cross_track_distance(b, a1, a2) ## End(Not run) ```

### Example output

``` 5768.513
```

nvctr documentation built on Oct. 28, 2020, 5:07 p.m.