# Documentation

Estimate radius of ellipsoid planet at geocentric latitude

## Syntax

`r = geocradius(lambda)r = geocradius(lambda, model)r = geocradius(lambda, f, Re)`

## Description

`r = geocradius(lambda)` estimates the radius, `r`, of an ellipsoid planet at a particular geocentric latitude, `lambda`. `lambda` is in degrees. `r` is in meters. The default ellipsoid planet is WGS84.

`r = geocradius(lambda, model)` is an alternate method for estimating the radius for a specific ellipsoid planet. Currently only `'WGS84'` is supported for `model`.

`r = geocradius(lambda, f, Re)` is another alternate method for estimating the radius for a custom ellipsoid planet defined by flattening, `f`, and the equatorial radius, `Re`, in meters.

## Examples

Determine radius at 45 degrees latitude:

```r = geocradius(45) r = 6.3674e+006```

Determine radius at multiple latitudes:

```r = geocradius([0 45 90]) r = 1.0e+006 * 6.3781 6.3674 6.3568```

Determine radius at multiple latitudes, specifying WGS84 ellipsoid model:

```r = geocradius([0 45 90], 'WGS84') r = 1.0e+006 * 6.3781 6.3674 6.3568```

Determine radius at multiple latitudes, specifying custom ellipsoid model:

```f = 1/196.877360; Re = 3397000; r = geocradius([0 45 90], f, Re) r = 1.0e+006 * 3.3970 3.3883 3.3797```

## References

Stevens, B. L., and F. L. Lewis, Aircraft Control and Simulation, John Wiley & Sons, New York, NY, 1992

Zipfel, P. H., and D. E. Penny, Modeling and Simulation of Aerospace Vehicle Dynamics, AIAA Education Series, Reston, VA, 2000