Template:Coord/doc

Formats and validates a latitude (bottom to top / Y) and longitude (left to right / X), each a degree of rotation around the Earth from the equator and prime meridian respectively. The latitude ranges from -90 to 90, while longitude is from -180 to 180.
 * DMS: Degrees/minutes/seconds system - Where the decimal point is represented as minutes (') which are 1/60th of a degree, and seconds (") which are 1/60th of a minute. All values are absolute non-negative numbers, and each coordinate has a cardinal direction to indicate the direction of travel. For latitude, positive is "N" towards the north pole, and negative is "S" towards the south pole. For longitude, positive is "E" east of the prime meridian, and negative is "W" west of the prime meridian. Depending on the requirement, seconds are often left out.
 * DD/DEC: Decimal degrees system - Where the latitude and longitude are represented as decimal values and can be negative or positive.

In Deadfire, the X and Y/Z coordinates are represented in the DMS system, with seconds left out (also called a DM system). The bottom left of the map is lat -40 lng 30, and the top right is lat 10 lng 70. This range is not validated in the template

Validation
Coordinates may be passed in either form, e.g.:
 * Degrees-minutes-seconds (DMS) or degrees-minutes (DM) system
 * Decimal degrees system (DEC)
 * Decimal degrees system (DEC)
 * Decimal degrees system (DEC)

The module "guesses" the input coordinate system based on the amount of numbers and strings passed as unnamed parameters. It assumes that:
 * Decimal degree system - If 2 numbers are passed, and optionally 2 strings
 * Degrees minutes system - If 4 numbers are passed, and optionally 2 strings
 * Degrees minutes seconds system - If 6 numbers are passed, and optionally 2 strings

If any other combination is passed, or if the amount of parameters is uneven (not balanced on both sides), the input system is considered invalid.

Cardinal/hemisphere indicators are optional for all systems, and must be 'N' or 'S' for the latitude, and 'E' or 'W' for the longitude (case insensitive). If cardinal indicators are passed, the lat/lng values must not be negative.

Range for all degree values must be 0 to 90 (or -90 to 90 if a indicator is NOT passed) for the latitude, and 0 to 180 (or -180 to 180 if an indicator NOT is passed) for the longitude, all values inclusive.

The range for a minutes and seconds in degrees-minutes-seconds or degrees-minutes system must be 0 (inclusive) to 60 (exclusive). These values can never be negative.

In DMS and DM systems, only the least significant value may be a decimal value (e.g. 123.45), while all others must be integers. Although fractionals are technically correct, they can be confusing.

Parameters

 * 1-8: As above, a mix of values forming the latitude longitude coordinate.
 * format: An output format, one of:
 * - Outputs in DEC format, trimmed to the shortest representation in decimal places - e.g. 123.45° N, 12.34° W
 * - Outputs in DMS format, seconds are always present - e.g. 123° 4′ 56″ N, 78° 9′ 10″ W
 * (default) - Outputs in DM format, minutes are always present - 123° 04′ N, 78° 09′ W