gpsUtmToSemicircle (Function) |
Top Previous Next |
This function is used for converting a position from Universal Transverse Mercator (UTM) format to semi-circle format - this can be used with e.g. the navigation API.
For the calculation, the WGS-84 ellipsoid is used to model the Earth in the UTM coordinate system.
Input: zone : INT [-60 .. 60] UTM zone number. <0 The position is on the southern hemisphere.
east : DINT UTM easting coordinate in meters east of the central meridian of the zone.
north : DINT UTM northing coordinate in meters north of the Equator on the northern hemisphere. On the southern hemisphere, it is 10,000 km minus the distance to the Equator.
Output: lat : DINT The latitude of the position in semi-circle format.
lon : DINT The longitude of the position in semi-circle format.
Return: 0 Success.
Declaration: FUNCTION gpsUtmToSemicircle : INT;
Example: INCLUDE rtcu.inc |