function
Geodesy.localEnuToGeodetic
Inverse of geodeticToLocalEnu
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 | east_m | Real | | Local east displacement [m] |
| input | north_m | Real | | Local north displacement [m] |
| input | up_m | Real | | Local up displacement [m] |
| input | earth_radius_m | Real | = 6378137.0 | Spherical Earth radius [m] |
| output | geodetic | Real | [3] | Latitude [deg], longitude [deg], altitude [m] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function localEnuToGeodetic
"Inverse of geodeticToLocalEnu"
input GeodeticOrigin origin "Local frame reference point";
input Real east_m "Local east displacement [m]";
input Real north_m "Local north displacement [m]";
input Real up_m "Local up displacement [m]";
input Real earth_radius_m = 6378137.0 "Spherical Earth radius [m]";
output Real geodetic[3] "Latitude [deg], longitude [deg], altitude [m]";
protected
Real lat_lon_deg[2];
algorithm
lat_lon_deg := localNorthEastToLatLon(
origin.latitude_deg, origin.longitude_deg, north_m, east_m,
earth_radius_m);
geodetic := {lat_lon_deg[1], lat_lon_deg[2], origin.altitude_m + up_m};
end localEnuToGeodetic;