Skip to main content

Meadow.Foundation.Sensors.Gnss.Mt3339

Mt3339
StatusStatus badge: working
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Sensors.Gnss.Mt3339

Code Example

Mt3339 gps;

public override Task Initialize()
{
Resolver.Log.Info("Initializing ...");

gps = new Mt3339(Device, Device.PlatformOS.GetSerialPortName("COM4"));

gps.GgaReceived += (object sender, GnssPositionInfo location) =>
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info(location.ToString());
Resolver.Log.Info("*********************************************");
};
// GLL
gps.GllReceived += (object sender, GnssPositionInfo location) =>
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info(location.ToString());
Resolver.Log.Info("*********************************************");
};
// GSA
gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) =>
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info(activeSatellites.ToString());
Resolver.Log.Info("*********************************************");
};
// RMC (recommended minimum)
gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) =>
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info(positionCourseAndTime.ToString());
Resolver.Log.Info("*********************************************");

};
// VTG (course made good)
gps.VtgReceived += (object sender, CourseOverGround courseAndVelocity) =>
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info($"{courseAndVelocity}");
Resolver.Log.Info("*********************************************");
};
// GSV (satellites in view)
gps.GsvReceived += (object sender, SatellitesInView satellites) =>
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info($"{satellites}");
Resolver.Log.Info("*********************************************");
};

return Task.CompletedTask;
}

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

return Task.CompletedTask;
}

Sample project(s) available on GitHub