# Using GPS visualizer calculations

Hi
Does anyone know if code has been written to use the GPS visualizer calculations in your Arduino sketch?

The link to the page is here GPS Visualizer: Calculators: Great Circle Distance Maps, Airport Routes, & Degrees/Minutes/Seconds

I need to make a calculation based on the "Find the coordinates at a given distance and bearing" calculator
There is another page where I believe they got these from that shows the equation also.
I a really hoping I dont have to enter that as Arduino code.

Thanks

I a really hoping I dont have to enter that as Arduino code.

How else would the Arduino be able to execute the code? You could, I suppose, create a web service that the Arduino with Ethernet shield could query, but that would be a non-trivial (though fun) exercise. It would also tend to limit the range of the Arduino.

How else would the Arduino be able to execute the code?

Lol. I meant, I really hope I don't have to recreate the wheel here. If I don't understand the equation, I have little hope of coding it.
I have found reference to it in processing, just need to find or create similar in Arduino.

`````` float CurLon = 0.000;
float CurLat = 52.000;
float Bearing = 45; // Bearing of travel
float Distance = 10; // km per update

void setup()
{
DestLon = (DestLon+3*PI)%(2*PI) - PI;  // normalise to -180..+180º
System.out.printf("starting at a Longitude of %f and a Latitude of %f ",CurLon,CurLat);
System.out.printf("if we travel %f km on a bearing of %f degrees ",Distance,Bearing);
System.out.printf("we end up at Longitude of %f and a Latitude of %f ",degrees(DestLon),degrees(DestLat));
}
``````

The equations you can probably use unchanged.
Anything strictly Java-like is going to have to be translated.

Thats what I thought. I posted hoping someone had a link to a project which already made use of it, but it should be easy enough to translate anyway.
I am completely oblivious of processing beyond knowing that it is java and needs to be translated to c++
Thanks
Steve