The TPX element (and its siblings) are in a different namespace. Therefore you need to initialize an additional XNamespace variable which you use for these elements instead of "ns1".
BTW, lines like these can be shortened using the explicit cast operations on XElement combined with the "null coalescing operator":
// This:
((string)trackPointElement.Element (ns1 + "Time").Value) : "",
(decimal)(trackPointElement.Element (ns1 + "AltitudeMeters") != null ? Convert.ToDouble ((string)trackPointElement.Element (ns1 + "AltitudeMeters").Value) : 0.0),
// is equivalent to:
(string)trackPointElement.Element (ns1 + "Time") ?? ""
(decimal?)trackPointElement.Element (ns1 + "AltitudeMeters") ?? 0.0,