The constructor takes two arguments. The first one is the name of the KML file to write. Be careful as it will overwrite any previously existing file with this same name.
The second argument is the name to show inside of GoogleEarth for the path. I recommend making it descriptive.
The destructor appends the closing KML elements. No user actions needed here.
As the name implies, it adds a point to the path. Therefore it needs the longitude and latitude coordinates. For each successive point in your path you will want to call this member function.
Example of use
#include <GoogleEarthPath.hpp> //This classThis example code obtains GPS coordenates from an external function and stores them in the GoogleEarthPath instance. It samples 10 points during 100 seconds. Once the desctructor is called, the file myPath.kml is ready to be imported in GoogleEarth.
#include <unistd.h> //Sleep
#include <magic_GPS_library.hpp> //Your GPS library
// CREATE PATH
GoogleEarthPath path(myPath.kml, NameToShowInGEarth)
double longitude, latitude;
for(int i=0; i < 10; i++)
//SOMEHOW GET GPS COORDINATES
//ADD POINT TO PATH
//WAIT FOR NEW POINTS
sleep(10); //sleep 10 seconds