1 line
43 KiB
Plaintext
1 line
43 KiB
Plaintext
|
{"version":3,"file":"EllipsoidRhumbLine-d09d563f.js","sources":["../../../../Source/Core/EllipsoidRhumbLine.js"],"sourcesContent":["import Cartesian3 from \"./Cartesian3.js\";\nimport Cartographic from \"./Cartographic.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport CesiumMath from \"./Math.js\";\n\nfunction calculateM(ellipticity, major, latitude) {\n if (ellipticity === 0.0) {\n // sphere\n return major * latitude;\n }\n\n const e2 = ellipticity * ellipticity;\n const e4 = e2 * e2;\n const e6 = e4 * e2;\n const e8 = e6 * e2;\n const e10 = e8 * e2;\n const e12 = e10 * e2;\n const phi = latitude;\n const sin2Phi = Math.sin(2 * phi);\n const sin4Phi = Math.sin(4 * phi);\n const sin6Phi = Math.sin(6 * phi);\n const sin8Phi = Math.sin(8 * phi);\n const sin10Phi = Math.sin(10 * phi);\n const sin12Phi = Math.sin(12 * phi);\n\n return (\n major *\n ((1 -\n e2 / 4 -\n (3 * e4) / 64 -\n (5 * e6) / 256 -\n (175 * e8) / 16384 -\n (441 * e10) / 65536 -\n (4851 * e12) / 1048576) *\n phi -\n ((3 * e2) / 8 +\n (3 * e4) / 32 +\n (45 * e6) / 1024 +\n (105 * e8) / 4096 +\n (2205 * e10) / 131072 +\n (6237 * e12) / 524288) *\n sin2Phi +\n ((15 * e4) / 256 +\n (45 * e6) / 1024 +\n (525 * e8) / 16384 +\n (1575 * e10) / 65536 +\n (155925 * e12) / 8388608) *\n sin4Phi -\n ((35 * e6) / 3072 +\n (175 * e8) / 12288 +\n (3675 * e10) / 262144 +\n (13475 * e12) / 1048576) *\n sin6Phi +\n ((315 * e8) / 131072 + (2205 * e10) / 524288 + (43659 * e12) / 8388608) *\n sin8Phi -\n ((693 * e10) / 1310720 + (6237 * e12) / 5242880) * sin10Phi +\n ((1001 * e12) / 8388608) * sin12Phi)\n );\n}\n\nfunction calculateInverseM(M, ellipticity, major) {\n const d = M / major;\n\n if (ellipticity === 0.0) {\n // sphere\n return d;\n }\n\n const d2 = d * d;\n const d3 = d2 * d;\n const d4 = d3 * d;\n const e = ellipticity;\n const e2 = e * e;\n const e4 = e2 * e2;\n const e6 = e4 * e2;\n const e8 = e6 * e2;\n const e10 = e8 * e2;\n const e12 = e10 * e2;\n const sin2D = Math.sin(2 * d);\n const cos2D = Math.cos(2 * d);\n const sin4D = Math.sin(4 * d);\n const cos4D = Math.cos(4 * d);\n const sin6D = Math.sin(6 * d);\n const cos6D = Math.cos(6 * d);\n const sin8D = Math.sin(8 * d);\n const cos8D = Math.cos(8 * d);\n const sin10D = Math.sin(10 * d);\n const cos10D = Math.cos(10 * d);\n const sin12D = Math.sin(12 * d);\n\n return (\n d +\n (d * e2) / 4 +\n (7 * d * e4) / 64 +\n (15 * d * e6) / 256 +\n (579 * d * e8) / 16384 +\n (1515 * d * e10) / 65536 +\n (16837 * d * e12) / 1048576 +\n ((3 * d * e4) / 16 +\n (45 * d * e6) / 256 -\n (d * (32 * d2 - 561) * e8) / 4096 -\n (d * (232 * d2 - 1677) * e10) / 16384 +\n (d * (399985 - 90560 * d2 + 512 * d4) * e12) / 5242880) *\n cos2D +\n ((21 * d * e6) / 256 +\n (483 * d * e8) / 4096 -\n (d * (224 * d2 - 1969) * e10) / 16384 -\n (d * (33152 * d2 - 112599) * e12) / 1048576) *\n cos4D +\n ((151 * d * e8) / 4096 +\n (4681 * d * e10) / 65536 +\n (1479 * d * e12) / 16384 -\n (453 * d3 * e12) / 32768) *\n cos6D +\n ((1097 * d * e10) / 65536 + (42783 * d * e12) / 1048576) * cos8D +\n ((8011 * d * e12) / 1048576) * cos10D +\n ((3 * e2) / 8 +\n (3 * e4) / 16 +\n (213 * e6) / 2048 -\n (3 * d2 * e6) / 64 +\n (255 * e8) / 4096 -\n (33 * d2 * e8) / 512 +\n (20861 * e10) / 524288 -\n (33 * d2 * e10) / 512 +\n (d4 * e10) / 1024 +\n (28273 * e12) / 1048576 -\n (471 * d2 * e12) / 8192 +\n (9 * d4 * e12) / 4096) *\n sin2D +\n ((21 * e4) / 256 +\n (21 * e6) / 256 +\n (533 * e8) / 8192 -\n (21 * d2 * e8) / 512 +\n (197 * e10) / 4096 -\n (315 * d2
|