Skip to main content

Meadow.Foundation.FeatherWings.GPSWing

GPSWing
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet 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

Class GPSWing

Represents a featherwing GPSWing

Assembly: GPSWing.dll
View Source
Declaration
public class GPSWing : Mt3339, IGnssSensor

Inheritance: System.Object -> Meadow.Foundation.Sensors.Gnss.Mt3339

Implements:
Meadow.Peripherals.Sensors.Location.Gnss.IGnssSensor

Implements

  • Meadow.Peripherals.Sensors.Location.Gnss.IGnssSensor