KLM to google earth

Hi,

Im thinking about a project, and need some input about it.
I have an arduino Mega and ethernet card with an SD card.

What i want is to make a red line on a google earth map, i having a starting point, and
a direction and i know how far the red line will go.

I do a calculation on a new position with this data. I can make all this with the arduino, but never
change the end position in the KLM file.

But my question is, how can i update a KML file with my new position?

When i search on the internet many people suggest putting the KML file as a TXT file on
the SD-card and somehow use it there...

But how to do that? how can i put the calculated position into an already existing file?
This may sound very strange, but i dont know how to describe my problem in any other way.

But how to do that? how can i put the calculated position into an already existing file?

The robust way

  1. open a new file
  2. copy the old file until position you want
  3. write the new information
  4. copy the remainder of the old file
  5. remove the old file
  6. rename the new file to the old file
  7. goto 1

goto

:astonished:

I know what you meant but the OP might not.