Remarks

CGNSS5
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS5

Code Example

CGNSS5 gps;

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

    //gps = new CGNSS5(Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11);

    gps = new CGNSS5(Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11);

    gps.GgaReceived += (object sender, GnssPositionInfo location) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{location}");
        Resolver.Log.Info("*********************************************");
    };
    // GLL
    gps.GllReceived += (object sender, GnssPositionInfo location) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{location}");
        Resolver.Log.Info("*********************************************");
    };
    // GSA
    gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{activeSatellites}");
        Resolver.Log.Info("*********************************************");
    };
    // RMC (recommended minimum)
    gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{positionCourseAndTime}");
        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

Characteristic Locus
Inheritance object NeoM8 > CGNSS5
Implements IGnssSensor IDisposable II2cPeripheral ISpiPeripheral
Inherited Members NeoM8.GnssDataReceived NeoM8.SupportedResultTypes NeoM8.GgaReceived NeoM8.GllReceived NeoM8.GsaReceived NeoM8.RmcReceived NeoM8.VtgReceived NeoM8.GsvReceived NeoM8.PulsePerSecondPort NeoM8.ResetPort NeoM8.IsDisposed NeoM8.Reset() NeoM8.StartUpdating() NeoM8.StopUpdating() NeoM8.Dispose() NeoM8.Dispose(bool) NeoM8.DefaultI2cAddress NeoM8.i2cComms NeoM8.DefaultSpiBusSpeed NeoM8.SpiBusSpeed NeoM8.DefaultSpiBusMode NeoM8.SpiBusMode NeoM8.spiComms object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.mikroBUS.Sensors.Gnss
Assembly CGNSS5.dll

Syntax

public class CGNSS5 : NeoM8, IGnssSensor, IDisposable, II2cPeripheral, ISpiPeripheral

Constructors

CGNSS5(II2cBus, IPin, IPin)

Creates a new CGNSS5 object using I2C

Declaration
public CGNSS5(II2cBus i2cBus, IPin resetPin, IPin ppsPin = null)

Parameters

Type Name Description
II2cBus i2cBus
IPin resetPin
IPin ppsPin

Remarks

CGNSS5
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS5

Code Example

CGNSS5 gps;

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

    //gps = new CGNSS5(Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11);

    gps = new CGNSS5(Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11);

    gps.GgaReceived += (object sender, GnssPositionInfo location) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{location}");
        Resolver.Log.Info("*********************************************");
    };
    // GLL
    gps.GllReceived += (object sender, GnssPositionInfo location) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{location}");
        Resolver.Log.Info("*********************************************");
    };
    // GSA
    gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{activeSatellites}");
        Resolver.Log.Info("*********************************************");
    };
    // RMC (recommended minimum)
    gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{positionCourseAndTime}");
        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

CGNSS5(IMeadowDevice, SerialPortName, IPin, IPin)

Creates a new CGNSS5 object using serial

Declaration
public CGNSS5(IMeadowDevice device, SerialPortName serialPortName, IPin resetPin, IPin ppsPin = null)

Parameters

Type Name Description
IMeadowDevice device
SerialPortName serialPortName
IPin resetPin
IPin ppsPin

Remarks

CGNSS5
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS5

Code Example

CGNSS5 gps;

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

    //gps = new CGNSS5(Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11);

    gps = new CGNSS5(Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11);

    gps.GgaReceived += (object sender, GnssPositionInfo location) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{location}");
        Resolver.Log.Info("*********************************************");
    };
    // GLL
    gps.GllReceived += (object sender, GnssPositionInfo location) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{location}");
        Resolver.Log.Info("*********************************************");
    };
    // GSA
    gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{activeSatellites}");
        Resolver.Log.Info("*********************************************");
    };
    // RMC (recommended minimum)
    gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) =>
    {
        Resolver.Log.Info("*********************************************");
        Resolver.Log.Info($"{positionCourseAndTime}");
        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