Opened 6 months ago

Last modified 6 months ago

#122 new defect

BNC only retrieves correction information in Auto NMEA if port is opened by another application

Reported by: mikko.seppala@… Owned by: stuerze
Priority: normal Component: BNC
Version: Keywords: vrs


HW/SW: u-blox F9P (usb virtual comport) and commercial VRS correction service requiring NMEA input.

Using VRS service with NMEA set to Auto in Serial output does not seem to send data to serviceprovider unless the serial port is opened by another application.
See video:

Datarate from provider is under 0.1kB/s when serial port is not opened and RTCM decoder shows no data, GGA sentence confirms no RTK or DGPS is achieved. Once port is opened, datarate increases to over 0.6kB/s and RTCM decoder shows data flowing and GGA sentence shows instant RTK Fix. Once the program reading the port is closed, datarate decreases and age of differential in GGA sentence keeps increasing as no correction input is received.

If the serial port is opened by an application before BNC is started, data from the VRS provider does not flow at all as NMEA strings are not passed to BNC and the service provider.

When Manual GNGGA is selected instead of Auto, the logged GGA sentences show that RTK Float is achieved just by starting BNC, but due to most likely wrong NMEA string sent to VRS service, the Float rarely goes to Fix and is not as accurate as it could be.

Tested on BNC 2.12.12-ubuntu-shared from downloads page and SVN r8910 (with one line commented out so it compiles).

Attachments (1)

svndiff.txt (1.6 KB) - added by mikko.seppala@… 6 months ago.
Quick hack for reducing GGA rate with rudamentary check for valid lon/lat in the said GGA sentence

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 months ago by mikko.seppala@…

In bncgetthread.cpp line 988 "_query->sendNMEA(gga);"
Commenting this out causes the client to start without the need to open the port for the receiver to get RTK Fix.

comment:2 Changed 6 months ago by stuerze

BNC opens the port independent if manual or auto mode is chosen:

247	    // Open Serial Port
248	    // ----------------
249	    _serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
250	    if (!_serialPort->isOpen()) {
251	      delete _serialPort;
252	      _serialPort = 0;
253	      emit(newMessage((_staID + ": Cannot open serial port\n"), true));
254	    }
255	    connect(_serialPort, SIGNAL(readyRead()), this,
256	        SLOT(slotSerialReadyRead()));
258	    // Automatic NMEA
259	    // --------------
260	    QString nmeaMode = settings.value("serialAutoNMEA").toString();
261	    if (nmeaMode == "Auto") {
262	      _serialNMEA = AUTO_NMEA;
263	      QString fName = settings.value("serialFileNMEA").toString();
264	      if (!fName.isEmpty()) {
265	        _serialOutFile = new QFile(fName);
266	        if (Qt::CheckState(settings.value("rnxAppend").toInt())
267	            == Qt::Checked) {
268	          _serialOutFile->open(QIODevice::WriteOnly | QIODevice::Append);
269	        } else {
270	          _serialOutFile->open(QIODevice::WriteOnly);
271	        }
272	      }
273	    }
274	    // Manual NMEA
275	    // -----------
276	    if ((nmeaMode == "Manual GPGGA") || (nmeaMode == "Manual GNGGA")) {
277	      _serialNMEA = MANUAL_NMEA;
278	      bncSettings settings;
279	      _manualNMEASampl = settings.value("serialManualNMEASampling").toInt();
280	      QString hlp = settings.value("serialHeightNMEA").toString();
281	      if (hlp.isEmpty()) {
282	        hlp = "0.0";
283	      }
284	      QByteArray _serialHeightNMEA = hlp.toAscii();
285	      _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA,
286	          nmeaMode);
287	    }
288	  }

If it is not possible you will get an information:

Cannot open serial port\n"

If you comment out line

988 "_query->sendNMEA(gga);"

no message from your receiver will be send to the VRS provider.
Maybe you receiver generates erroneous messages?
Without sending NMEA messages, the service could be switched of after a short period of time.

comment:3 Changed 6 months ago by mikko.seppala@…

Hi stuerze,

Added quick rate reducer to the gga send of slotSerialReadyRead and found following:

The caster takes about 3s after receiving GGA to output proper corrections.
So it was essentially flooded with GGA and never started.

Changed 6 months ago by mikko.seppala@…

Attachment: svndiff.txt added

Quick hack for reducing GGA rate with rudamentary check for valid lon/lat in the said GGA sentence

Modify Ticket

Change Properties
as new The owner will remain stuerze.
as The resolution will be set.
to The owner will be changed from stuerze to the selected user.
The owner will be changed from stuerze to mikko.seppala@….
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket.
The owner will be changed from stuerze to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.