Meadow.Foundation.Sensors.Gnss.Bg95M3
Bg95M3 | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
Bg95M3 bg95M3;
void ProcessGnssPosition(object sender, IGnssResult location)
{
Resolver.Log.Info("*********************************************");
Resolver.Log.Info(location.ToString());
Resolver.Log.Info("*********************************************");
}
public override Task Initialize()
{
Resolver.Log.Info("Initializing ...");
var cellAdapter = Device.NetworkAdapters.Primary<ICellNetworkAdapter>();
IGnssResult[] resultTypes = new IGnssResult[]
{
new GnssPositionInfo(),
new ActiveSatellites(),
new CourseOverGround(),
new SatellitesInView(new Satellite[0])
};
bg95M3 = new Bg95M3(cellAdapter, TimeSpan.FromMinutes(30), resultTypes);
bg95M3.GnssDataReceived += ProcessGnssPosition;
return Task.CompletedTask;
}
public override Task Run()
{
bg95M3.StartUpdating();
return Task.CompletedTask;
}
Sample project(s) available on GitHub
Class Bg95M3
Represents a BG95-M3 Cellular/GNSS module
Assembly: Bg95M3.dll
View Source
Declaration
public class Bg95M3 : IGnssSensor
Implements:
Meadow.Peripherals.Sensors.Location.Gnss.IGnssSensor
Properties
SupportedResultTypes
Supported GNSS result types
View Source
Declaration
public IGnssResult[] SupportedResultTypes { get; }
Methods
StartUpdating()
Start updating
View Source
Declaration
public void StartUpdating()
StopUpdating()
Stop updating GNSS data
View Source
Declaration
public void StopUpdating()
Events
GnssDataReceived
Raised when new GNSS data is available
View Source
Declaration
public event EventHandler<IGnssResult> GnssDataReceived
Event Type
System.EventHandler<Meadow.Peripherals.Sensors.Location.Gnss.IGnssResult>
Implements
Meadow.Peripherals.Sensors.Location.Gnss.IGnssSensor