GPX files that you have which are recordings of GPS tracks are basically *.xml files that you can open on Notepad app or any text editor on your computer. Some apps do a better job than Gaia in structuring the file. Gaia GPS is just a bunch of code dumped into a *.gpx file. Here I have tried to separate them for easy reference.
There are 3 parts to the GPX file
1. Start: The initial header data such as how it was created, the name of the track, description if any, color of the track etc.
<?xml version="1.0" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="GaiaGPS" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<name>
IM0148A, Al Quaa, Abu Dhabi - Gaurav Soni
</name>
<desc>
this file is combined from Gaurav Soni recordings
</desc>
<extensions>
<line xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>
00B2FF
</color>
</line>
</extensions>
<trkseg>
<trkpt lat="23.477482" lon="55.217087"><ele>115.0</ele><time>2022-11-12T05:08:11Z</time></trkpt>
<trkpt lat="23.477484" lon="55.217087"><ele>115.0</ele><time>2022-11-12T05:08:20Z</time></trkpt>
2. Track Point Data: for every second or so the Gaia or any other recording app will make an entry in to the record.
The track point data is contained between <trkseg> and </trkseg>. Each track point is consist of Latitude (lat), Longitude (lon), Elevation (ele) and date and time of recording. Time is mentioned in the file is GPS time which is almost same as UTC. The latitude and longitude is described in Decimal Degrees.
<trkpt lat="23.477482" lon="55.217087"><ele>115.0</ele><time>2022-11-12T05:08:11Z</time></trkpt>
<trkpt lat="23.477484" lon="55.217087"><ele>115.0</ele><time>2022-11-12T05:08:20Z</time></trkpt>
<trkpt lat="23.477482" lon="55.217091"><ele>115.0</ele><time>2022-11-12T05:08:21Z</time></trkpt>
3. End: Towards the end the file is closed
<trkpt lat="23.40979" lon="55.358162"><ele>123.0</ele><time>2022-11-12T12:01:20Z</time></trkpt>
<trkpt lat="23.409809" lon="55.358177"><ele>125.0</ele><time>2022-11-12T12:01:26Z</time></trkpt>
</trkseg>
</trk>
</gpx>
Note: I have kept 2 rows of Track Point data in both Start and End for referance only
How to Combine:
Say you have 3 tracks then export them to desktop in *.gpx files format.
- You have to keep the start point and track point data and delete the ending of the file that starts at </trkseg> copy the text into a new text file and save it with extension *.gpx
- For the middle track copy the Track Point Data. and paste it in the new file you do not need the start or end portions of this file.
- For the last track, copy the Track Point Data and End data, and now you can save the new file and import that to Gaia GPS to see a new combined file. It will be imported into a new folder in Gaia.
