Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
sdk:gps-udp-client-gnsstogps [2019/11/28 11:21]
fachet
sdk:gps-udp-client-gnsstogps [2020/12/10 16:13]
juraschek [SDK Script gps-udp-client-GNSStoGPS.are]
Line 17: Line 17:
  GL = GLONASS  GL = GLONASS
  GP = GPS  GP = GPS
- GN = GNSS(multiple sources e.g. GPS "​GP",​ Galileo "​GA"​ and Glonass "​GL"​ + GN = GNSS position fix from more than one constellation ​(eg. GPS + GLONASS)
 "​YYY"​ = Record "​YYY"​ = Record
  RMC = Recommended Minimum Sentence C (used in most cases)  RMC = Recommended Minimum Sentence C (used in most cases)
Line 52: Line 52:
  
  nb_config_set("​gpsd.0.status=0"​);​  nb_config_set("​gpsd.0.status=0"​);​
- sleep(3);+                do { 
 +                                ​sleep(3); 
 +                } while ( nb_config_done != 0) 
 +     
  nb_config_set("​gpsd.0.status=1"​);​  nb_config_set("​gpsd.0.status=1"​);​
- sleep(5); +                do { 
 +                 ​sleep(5); 
 +                } while ( nb_config_done != 0)
  return 0;  return 0;
 } }
- 
 int gpsd_connect () int gpsd_connect ()
 { {
Line 68: Line 71:
  exit(-1);  exit(-1);
  }  }
- for (attempt = 0; attempt <= 5; attempt++) { + for (attempt = 0; attempt <= 15; attempt++) { 
- sleep(3);+ sleep(15);
  
  if (connect(gpsd,​ local_ip, local_port) < 0) {  if (connect(gpsd,​ local_ip, local_port) < 0) {
  nb_syslog("​Could not connect to daemon"​);​  nb_syslog("​Could not connect to daemon"​);​
- if (attempt == 3) {+ if (attempt == 12) {
  nb_syslog("​Unable to connect, restarting daemon"​);​  nb_syslog("​Unable to connect, restarting daemon"​);​
  gpsd_restart();​  gpsd_restart();​