Changes

Module:Coordinates

32 bytes added, 17:23, 5 February 2019
m
десятичные только для минут
--[[ Helper function, handle optional args. ]]
function optionalArg(arg, suplement, bool) if arg ~= nil and arg ~= "" then arg = (tonumber( arg ) % 1 == 0or not bool) and
string.format( "%02d", arg ) or
string.format( "%02d,%.0f", arg, arg % 1 * 100)
end
coordinateSpec["dms-lat"] = lat_d.."°"..optionalArg(lat_m,"′", true) .. optionalArg(lat_s,"″") .. lat_f coordinateSpec["dms-long"] = long_d.."°"..optionalArg(long_m,"′", true) .. optionalArg(long_s,"″") .. long_f
if format ~= "" then
Anonymous user