This commit is contained in:
Morten Nielsen 2020-01-28 23:19:26 -08:00
commit 77a92b3938
2 changed files with 8 additions and 4 deletions

View file

@ -12,4 +12,5 @@
- Emulation from NMEA log file (all platforms)
- Serial Device: .NET Framework, .NET Core (Windows, Linux, Mac) and Windows Universal.
- Bluetooth: Windows Universal and Android. .NET Core/.NET Framework is supported using the Bluetooth device via the SerialPortDevice.
- Devices support two-way communication, allowing you to enhance accuracy with [NTRIP](concepts/ntrip.md) or send other messages to your device.

View file

@ -1,4 +1,4 @@
#Using NTRIP for DGPS
# Using NTRIP for DGPS
You can use data from a nearby NTRIP server to improve the accuracy if your GPS position, if your device supports it.
The Serial and Bluetooth devices supports writing to them, so you merely need to stream the data from the NTRIP server directly to your device.
@ -60,11 +60,14 @@ namespace Ntrip
private readonly int _port;
private string _auth;
private Socket sckt;
public Client(string host, int port, string authKey = null)
public Client(string host, int port)
{
_host = host;
_port = port;
_auth = authKey;
}
public Client(string host, int port, string username, string password) : this(host, port)
{
_auth = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(username + ":" + password));
}
public IEnumerable<NtripSource> GetSourceTable()
{
@ -208,4 +211,4 @@ client.DataReceived += (sender, ntripData) => {
};
// Connect to the stream
client.Connect(str.Mountpoint);
```
```