-- Datum parameters
local data = mw.loadData('Module:Ordnance Survey coordinates/data')
local OSGBglobe = {
semimajor = 6377563.396,
semiminor = 6356256.910,
ecc = 0.006670539761597529073698869358812557054558,
n1 = 0.00167322025032508731869331280635710896296,
scale = 0.9996012717,
e0 = 400000.0,
n0 = -100000.0,
lat0 = 49.0,
lon0 = -2.0
}
local IEglobeOSGBglobe = {data.OSGBglobe
local IEglobe = data.IEglobe
semimajor = 6377340.189,
local WGSglobe = {data.WGSglobe▼
semiminor = 6356034.447,
local WGS2OSGBparam = {data.WGS2OSGBparam▼
ecc = 0.006670540293336110419293763349975612794125,
local OSGB2WGSparam = {data.OSGB2WGSparam▼
n1 = 0.001673220384152058651484728058385228837777,
local IE2WGSparam = {data.IE2WGSparam▼
scale = 1.000035,
e0 = 200000.0,
n0 = 250000.0,
lat0 = 53.5,
lon0 = -8.0
}
semimajor = 6378137.0,
semiminor = 6356752.3141,
ecc = 0.00669438003551279089034150031998869922791
}
-- Table 4, Section 6.6, Ordnance Survey document
semimajor_src = WGSglobe.semimajor,
semiminor_src = WGSglobe.semiminor,
ecc_src = WGSglobe.ecc,
semimajor_dst = OSGBglobe.semimajor,
semiminor_dst = OSGBglobe.semiminor,
ecc_dst = OSGBglobe.ecc,
tx = -446.448,
ty = 125.157,
tz = -542.060,
s0 = 0.0000204894,
rx = deg2rad ( -.1502/3600. ),
ry = deg2rad ( -.2470/3600. ),
rz = deg2rad ( -.8421/3600. )
}
semimajor_src = OSGBglobe.semimajor,
semiminor_src = OSGBglobe.semiminor,
ecc_src = OSGBglobe.ecc,
semimajor_dst = WGSglobe.semimajor,
semiminor_dst = WGSglobe.semiminor,
ecc_dst = WGSglobe.ecc,
tx = -WGS2OSGBparam.tx,
ty = -WGS2OSGBparam.ty,
tz = -WGS2OSGBparam.tz,
s0 = -WGS2OSGBparam.s0,
rx = -WGS2OSGBparam.rx,
ry = -WGS2OSGBparam.ry,
rz = -WGS2OSGBparam.rz,
}
semimajor_src = IEglobe.semimajor,
semiminor_src = IEglobe.semiminor,
ecc_src = IEglobe.ecc,
semimajor_dst = WGSglobe.semimajor,
semiminor_dst = WGSglobe.semiminor,
ecc_dst = WGSglobe.ecc,
tx = 482.53,
ty = -130.596,
tz = 564.557,
s0 = 8.15/1000000.0,
rx = deg2rad( -1.042/3600.0 ),
ry = deg2rad( -0.214/3600.0 ),
rz = deg2rad( -0.631/3600.0 )
}
local function HelmertDatumShift ( latitude , longitude, param )
args[splitOut[1]] = splitOut[2]
end
args.dimif =not args.dimscale orand (LLnot args.prectype and tostring(floor(50*LL.prec+0not args.5))..'m')dim then
args.dim = LL.prec and tostring(floor(50*LL.prec+0.5))..'m'
end
args.viewport_cm = 10
local zoom = require('Module:Infobox dim')._zoom
local lvl = zoom(args) or 12
local url = mw.ustring.format('https://www.bing.com/maps/?mkt=en-gb&v=2&cp=%.6f%%7E~%.6f&lvl=%d&sp=Point.%.6f_%.6f',LL.lat,LL.long,lvl,LL.lat,LL.long)
if not empty(namearg) then
url = url..'_'..namearg
|