NETGeographicLib  1.43
GravityCircle.h
Go to the documentation of this file.
1 #pragma once
2 /**
3  * \file NETGeographicLib/GravityCircle.h
4  * \brief Header for NETGeographicLib::GravityCircle class
5  *
6  * NETGeographicLib is copyright (c) Scott Heiman (2013)
7  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
8  * <charles@karney.com> and licensed under the MIT/X11 License.
9  * For more information, see
10  * http://geographiclib.sourceforge.net/
11  **********************************************************************/
12 
13 namespace NETGeographicLib
14 {
15  /**
16  * \brief .NET wrapper for GeographicLib::GravityCircle.
17  *
18  * This class allows .NET applications to access GeographicLib::GravityCircle.
19  *
20  * Evaluate the earth's gravity field on a circle of constant height and
21  * latitude. This uses a CircularEngine to pre-evaluate the inner sum of the
22  * spherical harmonic sum, allowing the values of the field at several
23  * different longitudes to be evaluated rapidly.
24  *
25  * Use GravityModel::Circle to create a GravityCircle object. (The
26  * constructor for this class is private.)
27  *
28  * See \ref gravityparallel for an example of using GravityCircle (together
29  * with OpenMP) to speed up the computation of geoid heights.
30  *
31  * C# Example:
32  * \include example-GravityCircle.cs
33  * Managed C++ Example:
34  * \include example-GravityCircle.cpp
35  * Visual Basic Example:
36  * \include example-GravityCircle.vb
37  *
38  * <B>INTERFACE DIFFERENCES:</B><BR>
39  * The following functions are implemented as properties:
40  * Init, MajorRadius, Flattening, Latitude, and Height.
41  *
42  * The Capabilities functions accept and return the "capabilities mask"
43  * as a NETGeographicLib::GravityModel::Mask rather than an unsigned.
44  **********************************************************************/
45  public ref class GravityCircle
46  {
47  private:
48  // the pointer to the unmanaged GeographicLib::GravityCircle.
49  const GeographicLib::GravityCircle* m_pGravityCircle;
50 
51  // the finalizer frees the unmanaged memory when the object is destroyed.
52  !GravityCircle(void);
53  public:
54  /**
55  * A constructor that is initialized from an unmanaged
56  * GeographicLib::GravityCircle. For internal use only. Developers
57  * should use GravityModel::Circle to create a GavityCircle object.
58  **********************************************************************/
60 
61  /**
62  * The destructor calls the finalizer.
63  **********************************************************************/
65  { this->!GravityCircle(); }
66 
67  /** \name Compute the gravitational field
68  **********************************************************************/
69  ///@{
70  /**
71  * Evaluate the gravity.
72  *
73  * @param[in] lon the geographic longitude (degrees).
74  * @param[out] gx the easterly component of the acceleration
75  * (m s<sup>&minus;2</sup>).
76  * @param[out] gy the northerly component of the acceleration
77  * (m s<sup>&minus;2</sup>).
78  * @param[out] gz the upward component of the acceleration
79  * (m s<sup>&minus;2</sup>); this is usually negative.
80  * @return \e W the sum of the gravitational and centrifugal potentials.
81  *
82  * The function includes the effects of the earth's rotation.
83  **********************************************************************/
84  double Gravity(double lon,
85  [System::Runtime::InteropServices::Out] double% gx,
86  [System::Runtime::InteropServices::Out] double% gy,
87  [System::Runtime::InteropServices::Out] double% gz);
88 
89  /**
90  * Evaluate the gravity disturbance vector.
91  *
92  * @param[in] lon the geographic longitude (degrees).
93  * @param[out] deltax the easterly component of the disturbance vector
94  * (m s<sup>&minus;2</sup>).
95  * @param[out] deltay the northerly component of the disturbance vector
96  * (m s<sup>&minus;2</sup>).
97  * @param[out] deltaz the upward component of the disturbance vector
98  * (m s<sup>&minus;2</sup>).
99  * @return \e T the corresponding disturbing potential.
100  **********************************************************************/
101  double Disturbance(double lon,
102  [System::Runtime::InteropServices::Out] double% deltax,
103  [System::Runtime::InteropServices::Out] double% deltay,
104  [System::Runtime::InteropServices::Out] double% deltaz);
105 
106  /**
107  * Evaluate the geoid height.
108  *
109  * @param[in] lon the geographic longitude (degrees).
110  * @return \e N the height of the geoid above the reference ellipsoid
111  * (meters).
112  *
113  * Some approximations are made in computing the geoid height so that the
114  * results of the NGA codes are reproduced accurately. Details are given
115  * in \ref gravitygeoid.
116  **********************************************************************/
117  double GeoidHeight(double lon);
118 
119  /**
120  * Evaluate the components of the gravity anomaly vector using the
121  * spherical approximation.
122  *
123  * @param[in] lon the geographic longitude (degrees).
124  * @param[out] Dg01 the gravity anomaly (m s<sup>&minus;2</sup>).
125  * @param[out] xi the northerly component of the deflection of the vertical
126  * (degrees).
127  * @param[out] eta the easterly component of the deflection of the vertical
128  * (degrees).
129  *
130  * The spherical approximation (see Heiskanen and Moritz, Sec 2-14) is used
131  * so that the results of the NGA codes are reproduced accurately.
132  * approximations used here. Details are given in \ref gravitygeoid.
133  **********************************************************************/
134  void SphericalAnomaly(double lon,
135  [System::Runtime::InteropServices::Out] double% Dg01,
136  [System::Runtime::InteropServices::Out] double% xi,
137  [System::Runtime::InteropServices::Out] double% eta);
138 
139  /**
140  * Evaluate the components of the acceleration due to gravity and the
141  * centrifugal acceleration in geocentric coordinates.
142  *
143  * @param[in] lon the geographic longitude (degrees).
144  * @param[out] gX the \e X component of the acceleration
145  * (m s<sup>&minus;2</sup>).
146  * @param[out] gY the \e Y component of the acceleration
147  * (m s<sup>&minus;2</sup>).
148  * @param[out] gZ the \e Z component of the acceleration
149  * (m s<sup>&minus;2</sup>).
150  * @return \e W = \e V + &Phi; the sum of the gravitational and
151  * centrifugal potentials (m<sup>2</sup> s<sup>&minus;2</sup>).
152  **********************************************************************/
153  double W(double lon,
154  [System::Runtime::InteropServices::Out] double% gX,
155  [System::Runtime::InteropServices::Out] double% gY,
156  [System::Runtime::InteropServices::Out] double% gZ);
157 
158  /**
159  * Evaluate the components of the acceleration due to gravity in geocentric
160  * coordinates.
161  *
162  * @param[in] lon the geographic longitude (degrees).
163  * @param[out] GX the \e X component of the acceleration
164  * (m s<sup>&minus;2</sup>).
165  * @param[out] GY the \e Y component of the acceleration
166  * (m s<sup>&minus;2</sup>).
167  * @param[out] GZ the \e Z component of the acceleration
168  * (m s<sup>&minus;2</sup>).
169  * @return \e V = \e W - &Phi; the gravitational potential
170  * (m<sup>2</sup> s<sup>&minus;2</sup>).
171  **********************************************************************/
172  double V(double lon,
173  [System::Runtime::InteropServices::Out] double% GX,
174  [System::Runtime::InteropServices::Out] double% GY,
175  [System::Runtime::InteropServices::Out] double% GZ);
176 
177  /**
178  * Evaluate the components of the gravity disturbance in geocentric
179  * coordinates.
180  *
181  * @param[in] lon the geographic longitude (degrees).
182  * @param[out] deltaX the \e X component of the gravity disturbance
183  * (m s<sup>&minus;2</sup>).
184  * @param[out] deltaY the \e Y component of the gravity disturbance
185  * (m s<sup>&minus;2</sup>).
186  * @param[out] deltaZ the \e Z component of the gravity disturbance
187  * (m s<sup>&minus;2</sup>).
188  * @return \e T = \e W - \e U the disturbing potential (also called the
189  * anomalous potential) (m<sup>2</sup> s<sup>&minus;2</sup>).
190  **********************************************************************/
191  double T(double lon,
192  [System::Runtime::InteropServices::Out] double% deltaX,
193  [System::Runtime::InteropServices::Out] double% deltaY,
194  [System::Runtime::InteropServices::Out] double% deltaZ);
195 
196  /**
197  * Evaluate disturbing potential in geocentric coordinates.
198  *
199  * @param[in] lon the geographic longitude (degrees).
200  * @return \e T = \e W - \e U the disturbing potential (also called the
201  * anomalous potential) (m<sup>2</sup> s<sup>&minus;2</sup>).
202  **********************************************************************/
203  double T(double lon);
204 
205  ///@}
206 
207  /** \name Inspector functions
208  **********************************************************************/
209  ///@{
210  /**
211  * @return true if the object has been initialized.
212  **********************************************************************/
213  property bool Init { bool get(); }
214 
215  /**
216  * @return \e a the equatorial radius of the ellipsoid (meters). This is
217  * the value inherited from the GravityModel object used in the
218  * constructor.
219  * This property throws an exception if the GravityCircles has not
220  * been initialized.
221  **********************************************************************/
222  property double MajorRadius { double get(); }
223 
224  /**
225  * @return \e f the flattening of the ellipsoid. This is the value
226  * inherited from the GravityModel object used in the constructor.
227  * This property throws an exception if the GravityCircles has not
228  * been initialized.
229  **********************************************************************/
230  property double Flattening { double get(); }
231 
232  /**
233  * @return the latitude of the circle (degrees).
234  * This property throws an exception if the GravityCircles has not
235  * been initialized.
236  **********************************************************************/
237  property double Latitude { double get(); }
238 
239  /**
240  * @return the height of the circle (meters).
241  * This property throws an exception if the GravityCircles has not
242  * been initialized.
243  **********************************************************************/
244  property double Height { double get(); }
245 
246  /**
247  * @return \e caps the computational capabilities that this object was
248  * constructed with.
249  **********************************************************************/
251 
252  /**
253  * @param[in] testcaps a set of bitor'ed GeodesicLine::mask values.
254  * @return true if the GeodesicLine object has all these capabilities.
255  **********************************************************************/
256  bool Capabilities(GravityModel::Mask testcaps);
257  ///@}
258  };
259 } // namespace NETGeographicLib
.NET wrapper for GeographicLib::GravityCircle.
Definition: GravityCircle.h:45
GravityCircle(const GeographicLib::GravityCircle &gc)
double Disturbance(double lon, [System::Runtime::InteropServices::Out] double% deltax, [System::Runtime::InteropServices::Out] double% deltay, [System::Runtime::InteropServices::Out] double% deltaz)
double T(double lon, [System::Runtime::InteropServices::Out] double% deltaX, [System::Runtime::InteropServices::Out] double% deltaY, [System::Runtime::InteropServices::Out] double% deltaZ)
double Gravity(double lon, [System::Runtime::InteropServices::Out] double% gx, [System::Runtime::InteropServices::Out] double% gy, [System::Runtime::InteropServices::Out] double% gz)
GravityModel::Mask Capabilities()
double V(double lon, [System::Runtime::InteropServices::Out] double% GX, [System::Runtime::InteropServices::Out] double% GY, [System::Runtime::InteropServices::Out] double% GZ)
void SphericalAnomaly(double lon, [System::Runtime::InteropServices::Out] double% Dg01, [System::Runtime::InteropServices::Out] double% xi, [System::Runtime::InteropServices::Out] double% eta)
double W(double lon, [System::Runtime::InteropServices::Out] double% gX, [System::Runtime::InteropServices::Out] double% gY, [System::Runtime::InteropServices::Out] double% gZ)
double GeoidHeight(double lon)