7#ifndef MARBLE_MARBLEMATH_H
8#define MARBLE_MARBLEMATH_H
16const qreal a1 = 1.0 / 6.0;
17const qreal a2 = 1.0 / 24.0;
18const qreal a3 = 61.0 / 5040;
19const qreal a4 = 277.0 / 72576.0;
20const qreal a5 = 50521.0 / 39916800.0;
21const qreal a6 = 41581.0 / 95800320.0;
22const qreal a7 = 199360981.0 / 1307674368000.0;
23const qreal a8 = 228135437.0 / 4184557977600.0;
24const qreal a9 = 2404879675441.0 / 121645100408832000.0;
25const qreal a10 = 14814847529501.0 / 2043637686868377600.0;
26const qreal a11 = 69348874393137901.0 / 25852016738884976640000.0;
27const qreal a12 = 238685140977801337.0 / 238634000666630553600000.0;
28const qreal a13 = 4087072509293123892361.0 / 10888869450418352160768000000.0;
29const qreal a14 = 454540704683713199807.0 / 3209350995912777478963200000.0;
30const qreal a15 = 441543893249023104553682821.0 / 8222838654177922817725562880000000.0;
31const qreal a16 = 2088463430347521052196056349.0 / 102156677868375135241390522368000000.0;
47 qreal h1 = sin(0.5 * (lat2 - lat1));
48 qreal h2 = sin(0.5 * (lon2 - lon1));
49 qreal d = h1 * h1 + cos(lat1) * cos(lat2) * h2 * h2;
51 return 2.0 * atan2(sqrt(d), sqrt(1.0 - d));
62 return acos(sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(lon1 - lon2));
73 const qreal x2 = x * x;
97 + x2 * (a12 + x2 * (a13 + x2 * (a14 + x2 * (a15 + x2 * (a16))))))))))))))));
108inline qreal gd(qreal x)
120 return atan(sinh(x));
Binds a QML item to a specific geodetic location in screen coordinates.
qreal distanceSphereApprox(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method roughly calculates the shortest distance between two points on a sphere.
qreal gdInv(qreal x)
This method is a fast Mac Laurin power series approximation of the.
qreal distanceSphere(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method calculates the shortest distance between two points on a sphere.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:45 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.