function
Geodesy.geodeticToLocalEnu
Project a geodetic point into the origin's East-North-Up frame
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | origin | GeodeticOrigin | | Local frame reference point |
| input | lat_deg | Real | | Target latitude [deg] |
| input | lon_deg | Real | | Target longitude [deg] |
| input | alt_m | Real | | Target altitude above the datum [m] |
| input | earth_radius_m | Real | = 6378137.0 | Spherical Earth radius [m] |
| output | enu_m | Real | [3] | East, north, and up displacement [m] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function geodeticToLocalEnu
"Project a geodetic point into the origin's East-North-Up frame"
input GeodeticOrigin origin "Local frame reference point";
input Real lat_deg "Target latitude [deg]";
input Real lon_deg "Target longitude [deg]";
input Real alt_m "Target altitude above the datum [m]";
input Real earth_radius_m = 6378137.0 "Spherical Earth radius [m]";
output Real enu_m[3] "East, north, and up displacement [m]";
protected
Real north_east_m[2];
algorithm
north_east_m := latLonToLocalNorthEast(
origin.latitude_deg, origin.longitude_deg, lat_deg, lon_deg,
earth_radius_m);
enu_m := {north_east_m[2], north_east_m[1], alt_m - origin.altitude_m};
end geodeticToLocalEnu;