# Point plus distance along great circle using RGeo or WKT

I'm racking my brains (and google) trying to figure out how to get RGeo to do the following geospatial calculation:

Imagine I start off at some arbitrary geographic point (let's say (45, 45) which happens to be in Russia), then I point 30 degrees east of true north, and fly for 5000km, and then want to know my position.

How can I do this with RGeo? Also, is there a way of neatly expressing this in WKT assuming a geographic coordinate system? For instance `"POINT(45, 45) + POLAR_VECTOR_THIS_CONSTRUCTOR_IS_MADE_UP(30, 5000000)"`

Also, any good references, tutorials, and docs for this sort of thing would be much appreciated.

• RGeo's geographic point factory uses spherical geometry, whereas GPS coordinates are expressed in WGS84. I know there's only supposed to be 0.3% error, but if I can do the calculation perfectly, I don't need to worry about any error. – user1158559 Feb 26 '13 at 22:37
• I'd be very grateful if someone could verify that my proj4 definitions are good enough (please forgive the ruby string interpolation): WGS84: `"+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +no_defs"` And azimuthal equidistant: `"+proj=aeqd +lat_0=#{start_point.x} +lon0=#{start_point.y} +units=meters +no_defs"` – user1158559 Feb 26 '13 at 22:38