I'm looking for a formula that takes a long/lat coordinate and a degree heading, (e.g. "I'm standing in San Francisco and I'm facing 45º from north"), and which can draw a line across a map projecting your path along a globe from that point, along that heading, and back around to you.
So, for example...
- If you were standing at the equator facing due west, it would just be a horizontal line along the equator.
- If you were facing due north, it would be a vertical line from your position, and another vertical line at the longitude exactly halfway around the world.
- If you are standing at a random point and facing a random heading, it would create one of those "sin-wave" paths along the map, like we often see on maps of space stations or shuttles, starting and ending at your current location.
Does a formula like that exist? It seems like it would have to, since it would be one of the most basic formulas for calculating orbital paths and such. But I haven't been able to find anything like it...