Remarks

GPSWing
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.GPSWing

Code Example

GPSWing gps;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var serial = Device.CreateSerialMessagePort(
        Device.PlatformOS.GetSerialPortName("Com4"),
        suffixDelimiter: Encoding.ASCII.GetBytes("\r\n"),
        preserveDelimiter: true,
        baudRate: 9600);

    gps = new GPSWing(serial);

    gps.GgaReceived += (object sender, GnssPositionInfo location) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(location);
        Console.WriteLine("*********************************************");
    };

    // GLL
    gps.GllReceived += (object sender, GnssPositionInfo location) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(location);
        Console.WriteLine("*********************************************");
    };

    // GSA
    gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(activeSatellites);
        Console.WriteLine("*********************************************");
    };

    // RMC (recommended minimum)
    gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(positionCourseAndTime);
        Console.WriteLine("*********************************************");

    };

    // VTG (course made good)
    gps.VtgReceived += (object sender, CourseOverGround courseAndVelocity) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine($"{courseAndVelocity}");
        Console.WriteLine("*********************************************");
    };

    // GSV (satellites in view)
    gps.GsvReceived += (object sender, SatellitesInView satellites) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine($"{satellites}");
        Console.WriteLine("*********************************************");
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    gps.StartUpdating();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Characteristic Locus
Inheritance object Mt3339 > GPSWing
Implements IGnssSensor
Inherited Members Mt3339.SupportedResultTypes Mt3339.GnssDataReceived Mt3339.GgaReceived Mt3339.GllReceived Mt3339.GsaReceived Mt3339.RmcReceived Mt3339.VtgReceived Mt3339.GsvReceived Mt3339.Initialize() Mt3339.StartUpdating() Mt3339.StopUpdating() Mt3339.InitDecoders() object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.FeatherWings
Assembly GPSWing.dll

Syntax

public class GPSWing : Mt3339, IGnssSensor

Constructors

GPSWing(ISerialMessagePort)

Creates a GPSWing driver

Declaration
public GPSWing(ISerialMessagePort serialMessagePort)

Parameters

Type Name Description
ISerialMessagePort serialMessagePort

Remarks

GPSWing
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.GPSWing

Code Example

GPSWing gps;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var serial = Device.CreateSerialMessagePort(
        Device.PlatformOS.GetSerialPortName("Com4"),
        suffixDelimiter: Encoding.ASCII.GetBytes("\r\n"),
        preserveDelimiter: true,
        baudRate: 9600);

    gps = new GPSWing(serial);

    gps.GgaReceived += (object sender, GnssPositionInfo location) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(location);
        Console.WriteLine("*********************************************");
    };

    // GLL
    gps.GllReceived += (object sender, GnssPositionInfo location) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(location);
        Console.WriteLine("*********************************************");
    };

    // GSA
    gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(activeSatellites);
        Console.WriteLine("*********************************************");
    };

    // RMC (recommended minimum)
    gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine(positionCourseAndTime);
        Console.WriteLine("*********************************************");

    };

    // VTG (course made good)
    gps.VtgReceived += (object sender, CourseOverGround courseAndVelocity) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine($"{courseAndVelocity}");
        Console.WriteLine("*********************************************");
    };

    // GSV (satellites in view)
    gps.GsvReceived += (object sender, SatellitesInView satellites) =>
    {
        Console.WriteLine("*********************************************");
        Console.WriteLine($"{satellites}");
        Console.WriteLine("*********************************************");
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    gps.StartUpdating();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub