Silmor . de
Home

Impressum / Publisher

Angular Coordinates Converter

Angular coordinates (eg. GPS coordinates) can be given as fractions of degrees, as degrees plus minutes or as degrees plus minutes plus seconds.

How Angular Coordinates Work

A circle has 360 degrees, which means the coordinate 0 degree and 360 degrees describe the same point on the circle and the coordinate 180 degrees describes the point directly opposite 0 degree. For most applications 360 coordinates on a given circle is quite enough to handle, but then there are the really big circles, like earth equator...

Each degree has 60' (minutes), and each minute has 60" (seconds) - which makes 3600 seconds per degree or 1,296,000 seconds for the whole circle. So around earths equator one second amounts to about 34 meters - which is already fairly accurate.

Coordinates on earth are given in Longitude and Latitude. Latitude cuts the connection from each pole to the equator into 90 degrees: 90 degrees south is the south pole, 90 degrees north is the north pole and 0 degree is the equator. Longitude cuts earth into an east and a west half with 180 degrees each. The 0 degree line goes through Greenwich, the 180 degrees coordinates meet in the Pacific ozean between Japan and Australia on one side and the Americas on the other.

If height is to be added to the system, this requires an Altitude coordinate, which works in the usual metric or avionic systems (ie. heights are given in metres or feet above mean sea level or above ground).

Difficulty

As mentioned above, coordinates can be given as degrees with fractions or they can be split into degrees and minutes or even degrees, minutes and seconds (optionally with fraction-seconds). Eg. the GPS-coordinates of my own apartment I could be displayed in three different ways:

North East
Degrees only 50.9689 deg 13.9203 deg
Degrees and minutes 50 deg 58.13' 13 deg 55.22'
Degrees and min./seconds 50 deg 58' 08" 13 deg 55' 13"

Program

[Source Code]

This program can be used to calculate all representations of a given coordinate. One simply puts in the numbers in one system and it will add them up to all others. Eg.:

bash$ ./angle 13 55 13
degrees: 13.92028 deg
minutes: 13 deg 55.217'
seconds: 13 deg 55' 13.0"

or:

bash$ ./angle 13.9203
degrees: 13.92030 deg
minutes: 13 deg 55.218'
seconds: 13 deg 55' 13.1"

You can compile the program with any ANSI-C compatible compiler (eg. GNU C):

bash$ gcc angle.c -o angle -lm


Webmaster: webmaster AT silmor DOT de