qa-prevention-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/EllipsoidRhumbLine-592e8885.js

2 lines
6.3 KiB
JavaScript
Raw Permalink Normal View History

2024-01-02 14:12:39 +08:00
define(["exports","./Cartesian3-e0307675","./Cartesian2-bd414876","./Check-741c5f3c","./defaultValue-81eec7ed","./Math-e73894ab"],(function(t,i,e,a,n,s){"use strict";function h(t,i,e){if(0===t)return i*e;const a=t*t,n=a*a,s=n*a,h=s*a,u=h*a,o=u*a,l=e;return i*((1-a/4-3*n/64-5*s/256-175*h/16384-441*u/65536-4851*o/1048576)*l-(3*a/8+3*n/32+45*s/1024+105*h/4096+2205*u/131072+6237*o/524288)*Math.sin(2*l)+(15*n/256+45*s/1024+525*h/16384+1575*u/65536+155925*o/8388608)*Math.sin(4*l)-(35*s/3072+175*h/12288+3675*u/262144+13475*o/1048576)*Math.sin(6*l)+(315*h/131072+2205*u/524288+43659*o/8388608)*Math.sin(8*l)-(693*u/1310720+6237*o/5242880)*Math.sin(10*l)+1001*o/8388608*Math.sin(12*l))}function u(t,i){if(0===t)return Math.log(Math.tan(.5*(s.CesiumMath.PI_OVER_TWO+i)));const e=t*Math.sin(i);return Math.log(Math.tan(.5*(s.CesiumMath.PI_OVER_TWO+i)))-t/2*Math.log((1+e)/(1-e))}const o=new i.Cartesian3,l=new i.Cartesian3;function r(t,a,n,r){i.Cartesian3.normalize(r.cartographicToCartesian(a,l),o),i.Cartesian3.normalize(r.cartographicToCartesian(n,l),l);const d=r.maximumRadius,c=r.minimumRadius,M=d*d,g=c*c;t._ellipticitySquared=(M-g)/M,t._ellipticity=Math.sqrt(t._ellipticitySquared),t._start=e.Cartographic.clone(a,t._start),t._start.height=0,t._end=e.Cartographic.clone(n,t._end),t._end.height=0,t._heading=function(t,i,e,a,n){const h=u(t._ellipticity,e),o=u(t._ellipticity,n);return Math.atan2(s.CesiumMath.negativePiToPi(a-i),o-h)}(t,a.longitude,a.latitude,n.longitude,n.latitude),t._distance=function(t,i,e,a,n,u,o){const l=t._heading,r=u-a;let d=0;if(s.CesiumMath.equalsEpsilon(Math.abs(l),s.CesiumMath.PI_OVER_TWO,s.CesiumMath.EPSILON8))if(i===e)d=i*Math.cos(n)*s.CesiumMath.negativePiToPi(r);else{const e=Math.sin(n);d=i*Math.cos(n)*s.CesiumMath.negativePiToPi(r)/Math.sqrt(1-t._ellipticitySquared*e*e)}else{const e=h(t._ellipticity,i,n);d=(h(t._ellipticity,i,o)-e)/Math.cos(l)}return Math.abs(d)}(t,r.maximumRadius,r.minimumRadius,a.longitude,a.latitude,n.longitude,n.latitude)}function d(t,i,a,o,l,r){if(0===a)return e.Cartographic.clone(t,r);const d=l*l;let c,M,g;if(Math.abs(s.CesiumMath.PI_OVER_TWO-Math.abs(i))>s.CesiumMath.EPSILON8){M=function(t,i,e){const a=t/e;if(0===i)return a;const n=a*a,s=n*a,h=s*a,u=i*i,o=u*u,l=o*u,r=l*u,d=r*u,c=d*u,M=Math.sin(2*a),g=Math.cos(2*a),m=Math.sin(4*a),_=Math.cos(4*a),p=Math.sin(6*a),C=Math.cos(6*a),f=Math.sin(8*a),P=Math.cos(8*a),O=Math.sin(10*a);return a+a*u/4+7*a*o/64+15*a*l/256+579*a*r/16384+1515*a*d/65536+16837*a*c/1048576+(3*a*o/16+45*a*l/256-a*(32*n-561)*r/4096-a*(232*n-1677)*d/16384+a*(399985-90560*n+512*h)*c/5242880)*g+(21*a*l/256+483*a*r/4096-a*(224*n-1969)*d/16384-a*(33152*n-112599)*c/1048576)*_+(151*a*r/4096+4681*a*d/65536+1479*a*c/16384-453*s*c/32768)*C+(1097*a*d/65536+42783*a*c/1048576)*P+8011*a*c/1048576*Math.cos(10*a)+(3*u/8+3*o/16+213*l/2048-3*n*l/64+255*r/4096-33*n*r/512+20861*d/524288-33*n*d/512+h*d/1024+28273*c/1048576-471*n*c/8192+9*h*c/4096)*M+(21*o/256+21*l/256+533*r/8192-21*n*r/512+197*d/4096-315*n*d/4096+584039*c/16777216-12517*n*c/131072+7*h*c/2048)*m+(151*l/6144+151*r/4096+5019*d/131072-453*n*d/16384+26965*c/786432-8607*n*c/131072)*p+(1097*r/131072+1097*d/65536+225797*c/10485760-1097*n*c/65536)*f+(8011*d/2621440+8011*c/1048576)*O+293393*c/251658240*Math.sin(12*a)}(h(l,o,t.latitude)+a*Math.cos(i),l,o);const e=u(l,t.latitude),n=u(l,M);g=Math.tan(i)*(n-e),c=s.CesiumMath.negativePiToPi(t.longitude+g)}else{let e;if(M=t.latitude,0===l)e=o*Math.cos(t.latitude);else{const i=Math.sin(t.latitude);e=o*Math.cos(t.latitude)/Math.sqrt(1-d*i*i)}g=a/e,c=i>0?s.CesiumMath.negativePiToPi(t.longitude+g):s.CesiumMath.negativePiToPi(t.longitude-g)}return n.defined(r)?(r.longitude=c,r.latitude=M,r.height=0,r):new e.Cartographic(c,M,0)}function c(t,i,a){const s=n.defaultValue(a,e.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new e.Cartographic,this._end=new e.Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,n.defined(t)&&n.defined(i)&&r(this,t,i,s)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surface