1

I have a LLH (Longitude, Latitude, Height) point with an elevation angle and azimuth (actually it is a receiver point).

I believe I can make a line with this information.

What I want is to intersect this line with any LLH plane (constant latitude or constant longitude or constant height). For example intersect it with Latitude = 3. After the intersection I want to retrieve the LLH point where it intersected.

Is this possible? Maybe using spherical coordinates equations?

6
  • What software suites do you have access to?
    – Paul
    Commented Jul 1, 2013 at 20:19
  • Hm, I'm planning to use pure C++ programming. Not a specific software.
    – RandomGuy
    Commented Jul 1, 2013 at 20:19
  • What is an "LLH plane"? Are they all determined by constant latitudes as in your example?
    – whuber
    Commented Jul 1, 2013 at 21:59
  • 1
    Yes constant latitudes or constant longitudes or constant heights.
    – RandomGuy
    Commented Jul 1, 2013 at 22:04
  • 1
    Spherical solutions kinda work however all axes must have the same dimension. I am using Lat=40 N, Long=5ºE so it corresponds to 110Km and 111Km respectively. This is more or less the same. However the Height axis as it is by default in meters, I must divide it by 1000 to convert it to Km and then again by 110 to each unit in the axis correspond to 110Km too. This seems to not be the best solution since it looses some accuracy (in some Km). If is there some more accurate ellipsoidal solutions I will be grateful.
    – RandomGuy
    Commented Jul 2, 2013 at 9:14

1 Answer 1

1

Intersection of a line with a plane is covered about half-way down the page in this article: http://paulbourke.net/geometry/pointlineplane/

This describes the math. It doesn't include actual code samples but a good C++ developer ought to be able to handle the implementation readily.

In general, Paul Bourke does a great coverage of the math needed for various geometry operations. http://paulbourke.net/geometry/

I used him as a reference while developing the hit tests in the MapDotNet geometry libraries, which are written in C#.

5
  • That's a reasonable approach for the planes of constant latitude and constant longitude (once you have found the equations of plane and the line, which is a little tricky but not too hard). But it doesn't work for the surface of constant height, which is a buffer of an ellipsoid (and is not itself an ellipsoid). For the spherical model, the surface of constant height actually is a sphere and intersecting a ray with a sphere is an easy computation.
    – whuber
    Commented Jul 2, 2013 at 13:49
  • Good point re the surface of constant height. Bourke covers line to sphere as well paulbourke.net/geometry/circlesphere/index.html#linesphere Commented Jul 2, 2013 at 14:02
  • @Russell Thanks for answer but aren't this intersection equations for regular cartesian coordinates? I was looking for geographic (LLH) coordinates.
    – RandomGuy
    Commented Jul 2, 2013 at 15:01
  • Yes, the line/plane intersect is Cartesian, but I don't think you can get around that. I think you'll need to use Cartesian math to get a line/plane intersect, then take a segment from that point to the spheroid center point and intersect it with the spheroid itself to get LLH. Commented Jul 2, 2013 at 15:11
  • You could, in principle, find the intersections in other coordinates, but it would be messier because the equations of the line (and the planes) would become nonlinear. So in practice Russell is right: the job is best done by expressing everything in Cartesian coordinates (usually geocentric), finding the intersection, and then converting back to LLH.
    – whuber
    Commented Jul 2, 2013 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.