using MKCoolsoft.GPXLib;
...
// create new instance of GPXLib
GPXLib gpx = new GPXLib();
// create and init a new instance of Wpt for the track point.
Wpt wpt = new Wpt
{
Lat = (decimal)52.8379667,
Lon = (decimal)8.3059667,
Ele = (decimal)123.45,
Time = DateTime.Now,
EleSpecified = true,
TimeSpecified = true
};
// Add the created track point to the "Example track" in track segment "0".
// If track or track segment doesn't exists, they will create.
gpx.AddTrackPoint("Example track", 0, wpt);
// Save the track to a file.
gpx.SaveToFile(@"C:\Example.gpx");