/usr/share/magics/efi/Europe_All32parameters_1.js is in libmagics++-data 3.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | /*
* (C) Copyright 1996-2016 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergovernmental organisation nor
* does it submit to any jurisdiction.
*/
magics_height = 358.;
magics_left = 60;
magics_outside = function (x, y) {
if (smaller(x, 60) )
return true;
if (greater(x, 740) )
return true;
if (smaller(y, 89.3861) )
return true;
if (greater(y, 446.931) )
return true;
return false;
}
;
magics_reprojection = function (xd, yd)
{
yd = 446.931 - yd;
xpc = (xd - 60 ) * ( 9.14838e+06 / 680) + -4.91719e+06;
ypc = yd * ( 4.81581e+06 / 357.545) + -6.52533e+06;
px = xpc - 0;
py = ypc - 0;
ro = Math.sqrt(px*px + py*py);
t = (ro* 1)/(1.18883e+07) ;
xx = 1.5708 - 2.*Math.atan(t);
yll = xx + 0*Math.sin(2*xx) + 0*Math.sin(4*xx) + 0*Math.sin(6*xx);
if (py != 0.)
xll = 0+ Math.atan(px/(-py));
if (and(greater(px, 0.), greater(py,0.)))
xll = xll + 3.14159;
else if (and(smaller(px,0.), greater(py,0.)))
xll = xll - 3.14159;
else if (and(greater(px, 0.), equal(py,0.)))
xll = 0+ 3.14159/ 2.;
else if (and(smaller(px, 0.), equal(py,0.)))
xll = 0 - 3.14159/ 2.;
else if (and(equal(px,0.), equal(py, 0.)))
xll = 0;
if (smaller(xll, (-3.14159) )) xll += 2.* 3.14159;
else if (greater(xll, 3.14159) ) xll -= 2.*3.14159;
xll = xll * 57.2958;
yll = yll * 57.2958;
return { lon : xll, lat : yll } ;
}
;
magics_top = 122.;
magics_version = "2.6.0";
magics_width = 680;
|