13 int N = 3, N1 = 2, N2 = 1;
14 double ca[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
15 vector<double>
C(ca, ca + (N + 1) * (N + 2) / 2);
16 double sa[] = {6, 5, 4, 3, 2, 1};
17 vector<double>
S(sa, sa + N * (N + 1) / 2);
18 double cb[] = {1, 2, 3, 4, 5, 6};
19 vector<double>
C1(cb, cb + (N1 + 1) * (N1 + 2) / 2);
20 double sb[] = {3, 2, 1};
21 vector<double> S1(sb, sb + N1 * (N1 + 1) / 2);
23 vector<double>
C2(cc, cc + (N2 + 1));
26 SphericalHarmonic2 h(C, S, N, N, N, C1, S1, N1, N1, N1,
27 C2, S2, N2, N2, 0, a);
28 double tau1 = 0.1, tau2 = 0.05,
x = 2,
y = 3,
z = 1;
30 v =
h(tau1, tau2,
x,
y,
z, vx, vy, vz);
31 cout << v <<
" " << vx <<
" " << vy <<
" " << vz <<
"\n";
33 catch (
const exception&
e) {
34 cerr <<
"Caught exception: " << e.what() <<
"\n";
StridedVectorType vy(make_vector(y,*n, std::abs(*incy)))
Namespace for GeographicLib.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Spherical harmonic series with two corrections to the coefficients.
Matrix< Scalar, Dynamic, Dynamic > C
StridedVectorType vx(make_vector(x,*n, std::abs(*incx)))
Header for GeographicLib::SphericalHarmonic2 class.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x