dotnet/examples/ManagedCPP/example-SphericalHarmonic1.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try {
7  int N = 3, N1 = 2; // The maximum degrees
8  array<double>^ ca = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; // cosine coefficients
9  array<double>^ sa = {6, 5, 4, 3, 2, 1}; // sine coefficients
10  array<double>^ cb = {1, 2, 3, 4, 5, 6};
11  array<double>^ sb = {3, 2, 1};
12  double a = 1;
13  SphericalHarmonic1^ h = gcnew SphericalHarmonic1(ca, sa, N, cb, sb, N1, a, SphericalHarmonic1::Normalization::SCHMIDT);
14  double tau = 0.1, x = 2, y = 3, z = 1;
15  double v, vx, vy, vz;
16  v = h->HarmonicSum(tau, x, y, z, vx, vy, vz);
17  Console::WriteLine(String::Format("{0} {1} {2} {3}", v, vx, vy, vz));
18  }
19  catch (GeographicErr^ e) {
20  Console::WriteLine(String::Format("Caught exception: {0}", e->Message));
21  return -1;
22  }
23  return 0;
24 }
Scalar * y
Exception class for NETGeographicLib.
int main(array< System::String^>^)
double HarmonicSum(double tau, double x, double y, double z)
ArrayXcf v
Definition: Cwise_arg.cpp:1
Definition: numpy.h:543
.NET wrapper for GeographicLib::SphericalHarmonic1.
#define N
Definition: gksort.c:12
Array33i a
StridedVectorType vy(make_vector(y,*n, std::abs(*incy)))
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const double h
StridedVectorType vx(make_vector(x,*n, std::abs(*incx)))
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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:02