Serial port and GPS

Gpsx Class

Creates a Gpx file with a path description

For a list of all members of this type, see Gpsx Members.

System.Object
   serial.Gpsx

[Visual Basic]
Public Class Gpsx
    Implements IDisposable
[C#]
public class Gpsx : IDisposable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Used for creating a gpx file describing a path from coordinates passed to the subsequent calls to the method addLocation().

Example

[C#]

            using serial;
            public static void createGpx() {
            Gpsx gpsx;
            gpsx = new Gpsx();
            gpsx.open("file.gpx");
            gpsx.addLocation(12.1234, 49.2345, 401.5);
            gpsx.addLocation(12.1244, 49.2355, 402.5);
            gpsx.addLocation(12.1254, 49.2365, 403.5);
            gpsx.close();
            }
            
The call to this method would create the following gpx file in file.gpx:
            <?xml version="1.0" encoding="utf-8"?>
            <gpx xmlns="http://www.topografix.com/GPX/1/0">
            <time>2008-12-12T11:00:35Z</time>
            <wpt lat="12.1234" lon="49.2345">
            <ele>401.5</ele>
            <time>2008-12-12T11:00:35Z</time>
            <name>0</name>
            <desc>0</desc>
            <sym>Dot</sym>
            <type>Dot</type>
            </wpt>
            <wpt lat="12.1244" lon="49.2355">
            <ele>402.5</ele>
            <time>2008-12-12T11:00:35Z</time>
            <name>1</name>
            <desc>1</desc>
            <sym>Dot</sym>
            <type>Dot</type>
            </wpt>
            <wpt lat="12.1254" lon="49.2365">
            <ele>403.5</ele>
            <time>2008-12-12T11:00:35Z</time>
            <name>2</name>
            <desc>2</desc>
            <sym>Dot</sym>
            <type>Dot</type>
            </wpt>
            <bounds minlat="12.1234" minlon="49.2345"
            maxlat="12.1254" maxlon="49.2365" >
            </gpx>
            

Requirements

Namespace: serial

Assembly: gpsx (in gpsx.exe)

See Also

Gpsx Members | serial Namespace