Opened 6 years ago

Closed 2 weeks ago

#913 closed defect/bug (fixed)

Vehicle using NMEA, update position upon GPGGA sentence

Reported by: gregoire verlut Owned by: wiki.navit-project.org/index.php/user:naggety
Priority: major Milestone: version 0.5.1
Component: core Version: git master
Severity: normal Keywords: gps, performance, nmea
Cc: cp15

Description (last modified by usul)

The current coding of vehicle_xxx_parse() in vehicle_wince and vehicle_file only set the ret to 1 when a GPRMC sentence is found ( )

as consequence the respective io function calls

#!cpp callback_list_call_attr_0(priv->cbl, attr_position_coord_geo);

only when the GPS receiver sends a GPRMC sentence.

Some GPS don't send any GPRMC (mine for example Sony Nav-u 51 based on GPS SiRF III)

the GPRMC infos are also found when combining GPGGA, a GPZDA and a GPVTG

Looking at the callback call, it seems that only the position is called-back, so I propose to set the ret to 1 also when a valid GPGGA is received (as workaround).

I attached a change for the vehicle_wince file. added 3 lines on after line 495

The same should be performed on the vehicle_file and other vehicle based on NMEA

Attachments (3)

vehicle_wince.c (23.5 KB) - added by gregoire verlut 6 years ago.
missing ;
patch913.diff (6.8 KB) - added by wiki.navit-project.org/index.php/user:naggety 2 months ago.
Patch - only GGA or RMC required
patch913-2.diff (5.6 KB) - added by wiki.navit-project.org/index.php/user:naggety 2 months ago.
Patch for WinCE (to be tested)

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by gregoire verlut

missing ;

comment:1 Changed 6 years ago by woglinde

Hi,

thanks for your modified files. To make the work for us developer easy. Please attach only patches. You can easy do a patch, when you checked out the source code with svn and running svn diff

Bye Henning

comment:2 Changed 4 years ago by usul

Is that already fixed?

comment:3 Changed 4 years ago by usul

  • Cc cp15 added
  • Description modified (diff)
  • Keywords gps performance nmea added
  • Milestone set to version 0.5.1

Sounds like a good idea to improve the time to fix (or at least till Navit detects the GPS)

Scheduled for 0.5.1 minor as this seems to be related to performance

comment:4 Changed 3 months ago by wiki.navit-project.org/index.php/user:naggety

  • Severity set to normal

Hi,

this is not fixed yet. As Gregoire said, if RMC message is not received the position is not refreshed, despite it can be known if GGA or GLL messages are received.

In fact, I have seen that RMC and GGA are both necessary to make navit working properly:

  • When a RMC message is received the callback functions tied to attr_position_coord_geo attribute are called, so displayed position, velocity, etc are refreshed. However, if the position has become invalid, for example because GPS signal was lost, it is not taken in consideration: the attribute attr_position_valid is not changed to invalid and the data of the last position, velocity, etc. are used.
  • When a GGA message is received the attribute attr_position_valid is set to valid or invalid. However, no callback functions are called in this case, so the displayed info such as position and speed are not refreshed, despite having received new data.
  • If data stops being received, for example because communication with GPS module is lost, it is not indicated anywhere. The displayed data remains without refreshing, showing the last received data.

Summary of previous points: attr_position_valid is only changed with GGA message, the displayed data is only refreshed with RMC message and there is no timeout to detect if messages stop comming.

RMC message seems to be the most convenient message for us, since it has all the basic data we need: position, speed and orientation. However, not all GPS modules send this message, so the combined data from other messages should be used instead (GGA, GLL, VTG, ZDA...)

Some things that should be done to fix all this:

  • RMC message should set attr_position_valid to valid or invalid
  • A timeout should be added and attr_position_valid have to be set to invalid if messages stop comming from GPS module.
  • The info should be refreshed also when message RMC is not being received if other messages contain the required info. In this case, it would be appropiate to avoid refreshing twice with the same data if both RMC and GGA messages are received (maybe comparing with previous data to check if it has changed?)

I can take care of changing this in the next days.

comment:5 Changed 2 months ago by wiki.navit-project.org/index.php/user:naggety

  • Owner changed from KaZeR to wiki.navit-project.org/index.php/user:naggety
  • Status changed from new to assigned

I've prepared the attached patch.

With this patch, only GGA or RMC is required to be received. Also, I have added a timeout to prevent NMEA messages stop being received and position remaining as valid.

I have set the timeout to 10s. Is this OK?

On the other hand, despite the position being set as invalid, this is not reflected in any way in the gui. It just remains static using the last position, speed, etc. received. I can look to solve it, but maybe anyone knows why this happens...

Changed 2 months ago by wiki.navit-project.org/index.php/user:naggety

Patch - only GGA or RMC required

comment:6 Changed 2 months ago by wiki.navit-project.org/index.php/user:naggety

Regarding reflecting GPS signal lost in the gui, I see that there are some other tickets related to it (#931, #932, #1232, etc.). For me, those tickets are more related to this problem than this ticket.

In order to close this ticket: the patch I attached is only for vehicle/file, but it should be applied also to vehicle/wince and vehicle/webos (unless we don't want to maintain them). However, I can't test them. Anyone could do it?

Changed 2 months ago by wiki.navit-project.org/index.php/user:naggety

Patch for WinCE (to be tested)

comment:7 Changed 3 weeks ago by kazer

The WinCE build system is somewhat broken so we can't really test it today. Other patches have been merged in https://github.com/navit-gps/navit/pull/365

Thanks nagetty!

Any other improvements pending, or can we close this ticket?

comment:8 Changed 2 weeks ago by http://wiki.navit-project.org/index.php/user:jkoan

  • Resolution set to fixed
  • Status changed from assigned to closed

I will close this ticket now because it seems to be fixed (even if we can not test right now)

Note: See TracTickets for help on using tickets.