diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2022-06-27 17:19:28 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2022-06-27 17:19:28 +0200 |
| commit | 5ab8a5088b729a9953b8dff1b2a985dc8fb2098b (patch) | |
| tree | ed40d6936c0e9eee40ba62751cbf99ecddbaddc2 /math/spheres.cpp | |
| parent | adabbad9c51cf7cd3874bfde8eac1fbcf84fec10 (diff) | |
updated tcr
Diffstat (limited to 'math/spheres.cpp')
| -rw-r--r-- | math/spheres.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/math/spheres.cpp b/math/spheres.cpp deleted file mode 100644 index 324eb00..0000000 --- a/math/spheres.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// Great Cirlce Distance mit Längen- und Breitengrad. -double gcDist( - double pLat, double pLon, double qLat, double qLon, double radius) { - pLat *= PI / 180; pLon *= PI / 180; qLat *= PI / 180; qLon *= PI / 180; - return radius * acos(cos(pLat) * cos(pLon) * cos(qLat) * cos(qLon) + - cos(pLat) * sin(pLon) * cos(qLat) * sin(qLon) + - sin(pLat) * sin(qLat)); -} - -// Great Cirlce Distance mit kartesischen Koordinaten. -double gcDist(point p, point q) { - return acos(p.x * q.x + p.y * q.y + p.z * q.z); -} - -// 3D Punkt in kartesischen Koordinaten. -struct point{ - double x, y, z; - point() {} - point(double x, double y, double z) : x(x), y(y), z(z) {} - point(double lat, double lon) { - lat *= PI / 180.0; lon *= PI / 180.0; - x = cos(lat) * sin(lon); y = cos(lat) * cos(lon); z = sin(lat); - } -}; |
