Skip to main content

Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS10

CGNSS10
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS10

Code Example

CGNSS10 gps;

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

gps = new CGNSS10(Device.CreateSpiBus(), Device.CreateDigitalOutputPort(Device.Pins.D14));

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

Class CGNSS10

Represents a mikroBUS GNSS 10 board (Neo M8)

Assembly: CGNSS10.dll
View Source
Declaration
public class CGNSS10 : NeoM8, IGnssSensor, IDisposable, II2cPeripheral, ISpiPeripheral

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

Implements:
Meadow.Peripherals.Sensors.Location.Gnss.IGnssSensor, System.IDisposable, Meadow.Hardware.II2cPeripheral, Meadow.Hardware.ISpiPeripheral

Implements

  • Meadow.Peripherals.Sensors.Location.Gnss.IGnssSensor
  • System.IDisposable
  • Meadow.Hardware.II2cPeripheral
  • Meadow.Hardware.ISpiPeripheral