Announcement

Collapse
No announcement yet.

Question: Get a point x meters away from a point

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question: Get a point x meters away from a point

    Hello again, again

    Another little question:
    How could I find a point x meters away from a point, given a direction?

    I can do the measurement between two points (location greatCircle), and get All the points at X distance from a point (AKA circumference).
    I did an approach with some trigonometry basics and had a result which quite looked like what i wanted to achieve, but the result is stretched vertically (the closer to a pole, the stronger), because a "square degree sector" is not a square (northern or southern end is smaller, thus, the degrees progression is much faster)

    Also thought to find the intersection of a line (direction) and a circle (distance) to find that point, but didn't see any method for that.

    Thanks again in advance!

  • #2
    Hello. Are you looking for an actual distance on the ground, i.e. taking into account the elevation model?

    Comment


    • #3
      Hello AkeluX

      Not really, but that'd be interesting too. I was looking for a point X meters away (i.e. west) in flat earth. Once we get the ground distance from A to B, and with the height at A and B, oh well this is the straight distance, not following terrain.

      Comment


      • #4
        The Location class has static methods that should help you if you haven't solved it yet.

        Location.linearLocation(location, azimuthDegrees, pathLengthRadians, result)
        Location.greatCircleLocation(location, greatCircleAzimuthDegrees, pathLengthRadians, result)
        Location.rhumbLocation(location, azimuthDegrees, pathLengthRadians, result)

        For the elevation at a certain location, you can ask the globe: globe.elevationAtLocation(latitude, longitude)

        Comment


        • #5
          Oh nice, somehow i skipped these methods when i first read the doc.
          i think linearLocation is the one i need: location, rotation, distance -> location



          Thank you Akelux

          Comment

          Working...
          X