where _E is zero when _f is zero.
the project is really a perfect job; I try to help fix it by self, but I am not familiar with the algorithm, so ... hehe;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the result gammaz is -9.82022 at different latitudes, with the height=0; it is reasonable.
I have another question, maybe not necessary: why can't I compute NormalGravity on the nonrotating ellipsoid or rotating sphere? that is when I use in such a way:
they both throw error or exception. So I wonder if I need to use other methods of NormalGravity to do such computation or I don't need to do such computation in fact, maybe the result doesn't matter.
If I want to model the gravity on the nonrotating ellipsoid and rotating sphere each, how to use this lib in an uniform way?
Hope you can understand what I say for bearing my poor English.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The normal gravity is a vacuum gravitational potential V0 such that the
sum of V0 and the centrifugal potential Phi is a constant on an
ellipsoid of revolution. The solution to this problem, due to
Somigliana and described in Heiskanen and Moritz (1967), is such that as
Omega approaches 0, the flattening, f, must also approach 0 (as
Omega^2). It may be that there's some way of taking the limits to
remove this restriction (and also to allow for prolate ellipsoids, with
f < 0). However, the NormalGravity class does not allow this at
present.
Now to answer your specific request for the gravity of a rotating sphere
(assumed to be of constant density). This is simple, just add the 1/r^2
gravity and the centrifugal force. A similar calculation can be done
for a non-rotating ellipsoid of constant density (I believe Laplace
computed the gravity in this case). However neither of these is a
normal gravity solution, because the total potential is not constant
on the surface in question.
Incidentally, in the normal gravity problem, nothing is said about the
mass distribution within the ellipsoid. (I'm pretty sure that a
constant density doesn't yield the desired potential.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in NormalGravity.cpp, Line 46 ~ 53, an attempt to divide by zero, result is nan
Please try the following patch and let me know if this fixes the problem:
Last edit: Charles Karney 2015-05-29
that dose not fix the problem, it seems that you still need to fix the function NormalGravity::V0()
where _E is zero when _f is zero.
the project is really a perfect job; I try to help fix it by self, but I am not familiar with the algorithm, so ... hehe;
Sorry! Here's take 2. Please test this and let me know of any problems.
I think the patch should fix the problem: when I use this:
the result gammaz is -9.82022 at different latitudes, with the height=0; it is reasonable.
I have another question, maybe not necessary: why can't I compute NormalGravity on the nonrotating ellipsoid or rotating sphere? that is when I use in such a way:
and
they both throw error or exception. So I wonder if I need to use other methods of NormalGravity to do such computation or I don't need to do such computation in fact, maybe the result doesn't matter.
If I want to model the gravity on the nonrotating ellipsoid and rotating sphere each, how to use this lib in an uniform way?
Hope you can understand what I say for bearing my poor English.
Thanks
The normal gravity is a vacuum gravitational potential V0 such that the
sum of V0 and the centrifugal potential Phi is a constant on an
ellipsoid of revolution. The solution to this problem, due to
Somigliana and described in Heiskanen and Moritz (1967), is such that as
Omega approaches 0, the flattening, f, must also approach 0 (as
Omega^2). It may be that there's some way of taking the limits to
remove this restriction (and also to allow for prolate ellipsoids, with
f < 0). However, the NormalGravity class does not allow this at
present.
Now to answer your specific request for the gravity of a rotating sphere
(assumed to be of constant density). This is simple, just add the 1/r^2
gravity and the centrifugal force. A similar calculation can be done
for a non-rotating ellipsoid of constant density (I believe Laplace
computed the gravity in this case). However neither of these is a
normal gravity solution, because the total potential is not constant
on the surface in question.
Incidentally, in the normal gravity problem, nothing is said about the
mass distribution within the ellipsoid. (I'm pretty sure that a
constant density doesn't yield the desired potential.)