mirror of
https://github.com/asherao/dcs-scratchpad.git
synced 2025-10-29 16:56:22 +00:00
add missing leading zeros to coordinate formats
This commit is contained in:
parent
c621a6891b
commit
9cc67fbc5d
@ -234,10 +234,10 @@ local function loadScratchpad()
|
||||
|
||||
if type == "DMS" then -- Degree Minutes Seconds
|
||||
s = math.floor(s * 100) / 100
|
||||
return string.format('%s %2d°%.2d\'%2.2f"', h, g, m, s)
|
||||
return string.format('%s %2d°%.2d\'%05.2f"', h, g, m, s)
|
||||
elseif type == "DDM" then -- Degree Decimal Minutes
|
||||
s = math.floor(s / 60 * 1000)
|
||||
return string.format('%s %2d°%2d.%3.3d\'', h, g, m, s)
|
||||
return string.format('%s %2d°%02d.%3.3d\'', h, g, m, s)
|
||||
else -- Decimal Degrees
|
||||
return string.format('%f',d)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user