1

Trying this again with no luck from the first post. Working on a GPS application and a user will hit a button which with give a GPS point. That GPS point will be converted into Cartesian Coordinates. I will also have the heading in degrees.

An example, I will get the following.

35.107339, -81.597964

That converts to XEastLon - 445505.80924453895 YNorthLat - 3885110.2004663

The heading in this case would be 139 degrees. Subtract 90 degrees I assume because the line needs to be perpendicular to the line being traveled at the time.

So I need to extend the X & Y say 25 ft to their left and right or perpendicular to a heading of 139 degrees.

Thanks

Update: Here is an image that shows what I have to accomplish.

A driver will hit a button in a car and I will get back a GPS coordinate, I convert that to X, Y and also I get back the heading. As shown in the diagram, I need to take the single point and the heading and calculate two point, Point A & Point B. As I stated in the original question, for now we'll just say it will be 25 ft to the left of the point we get in and 25 ft to the right of that point. Again, since i'm converting the degrees of the original point into Decimal for X, Y, also, in this equation, do we take the 139 degrees of heading and do a conversion on it or is it as simple as just subtracting 90 degrees or adding 90 degrees to get angle/slope to use in the calculation for the line?

Coordinates

kfrosty
  • 805
  • 1
  • 8
  • 14
  • "Subtract 90 degrees I assume" So you need to guess yourself at what you actually want? "to their left and right or perpendicular" any of that or all of that? What kind of a result do you desire? New GPS coordinates for those unlcearly defined, one or more locations? – Yunnosch Oct 11 '17 at 21:01
  • I've updated the original post with a diagram and more comments which should make it more clear. – kfrosty Oct 12 '17 at 13:48

1 Answers1

0

This seems like what I'm looking for. Posting as answer for now as I've not had much luck getting answers with these types of GPS questions on here.

Link

Var x2 = x1 + length * Math.cos(angle)

Var y2 = y1 + length * Math.Sin(angle)

I've tried those and then manually went into google earth and measured are really close. Point a I add the values like the formulas above. For Point B I subtract.

kfrosty
  • 805
  • 1
  • 8
  • 14