Remarks

Mt3339
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Gnss.Mt3339

Code Example

Mt3339 gps;

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

    gps = new Mt3339(Device, Device.SerialPortNames.Com4);

    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 System.Object > Mt3339
Namespace Meadow.Foundation.Sensors.Gnss
Assembly Mt3339.dll

Syntax

public class Mt3339 : object

Constructors

Mt3339(ISerialMessageController, SerialPortName)

Create a new Mt3339 object

Declaration
public Mt3339(ISerialMessageController device, SerialPortName serialPortName)

Parameters

Type Name Description
ISerialMessageController device

IMeadowDevice instance

SerialPortName serialPortName

The serial port name to create

Mt3339(ISerialMessagePort)

Create a new Mt3339 object

Declaration
protected Mt3339(ISerialMessagePort serialPort)

Parameters

Type Name Description
ISerialMessagePort serialPort

The serial port

Methods

InitDecoders()

Initialize decoders

Declaration
protected void InitDecoders()

Initialize()

Initialize the GPS

Declaration
protected void Initialize()

StartUpdating()

Start updates

Declaration
public void StartUpdating()

Events

GgaReceived

Raised when GAG data is recieved

Declaration
public event EventHandler<GnssPositionInfo> GgaReceived

Event Type

Type Description
EventHandler<GnssPositionInfo>

GllReceived

Raised when GAG data is recieved

Declaration
public event EventHandler<GnssPositionInfo> GllReceived

Event Type

Type Description
EventHandler<GnssPositionInfo>

GsaReceived

Raised when GSA data is recieved

Declaration
public event EventHandler<ActiveSatellites> GsaReceived

Event Type

Type Description
EventHandler<ActiveSatellites>

GsvReceived

Raised when GSV data is recieved

Declaration
public event EventHandler<SatellitesInView> GsvReceived

Event Type

Type Description
EventHandler<SatellitesInView>

RmcReceived

Raised when RMC data is recieved

Declaration
public event EventHandler<GnssPositionInfo> RmcReceived

Event Type

Type Description
EventHandler<GnssPositionInfo>

VtgReceived

Raised when VTG data is recieved

Declaration
public event EventHandler<CourseOverGround> VtgReceived

Event Type

Type Description
EventHandler<CourseOverGround>