Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
2.0 KiB

  1. <sect1 id="net_dgpsip.c"><title><filename>dgpsip.c</filename></title>
  2. <informaltable frame='all' pgwide='1'>
  3. <tgroup cols='2'>
  4. <colspec colname='c1'></colspec>
  5. <colspec colname='c2'></colspec>
  6. <spanspec spanname='s1' namest='c1' nameend='c2'></spanspec>
  7. <thead>
  8. <row>
  9. <entry>Functions:-</entry><entry>This file provides the actual services for dgpsip corrections to <function>dgnss.c</function>.</entry>
  10. </row>
  11. </thead>
  12. <tfoot>
  13. <row>
  14. <entry spanname='s1' align='left'>Notes based on code as of Mon Apr 5 21:38:06 2010 -0400.</entry>
  15. </row>
  16. </tfoot>
  17. <tbody>
  18. <row>
  19. <entry><function>int dgpsip_open(struct gps_context_t *context, const char *dgpsserver)</function></entry>
  20. <entry><para>Tries to open a connection to a dgpsip server. Returns
  21. either -1 on failure or the socket number on success. On success, it
  22. initializes the connection, sends a <quote>HELO</quote> to the
  23. server and stores the type of dgnss service in the context
  24. data.</para></entry>
  25. </row>
  26. <row>
  27. <entry><function>void dgpsip_report(struct gps_device_t *session)</function></entry>
  28. <entry><para>If we have not contacted the server and we have at
  29. received least 10 fixes, send a report to the server and set the
  30. flag, so we don't do it again.</para></entry>
  31. </row>
  32. <row>
  33. <entry><function>static int srvcmp(const void *s, const void *t)</function></entry>
  34. <entry><para>Compare the distance of two servers from our
  35. location. Return -ve, 0 or +ve depending if server
  36. <function>s</function> is nearer, the same distance away or further
  37. away than server <function>t</function>.</para></entry>
  38. </row>
  39. <row>
  40. <entry><function>void dgpsip_autoconnect(struct gps_context_t *context, double lat, double lon, const char *serverlist)</function></entry>
  41. <entry><para>This function takes a list of servers and tries to get
  42. a connection to the closest one relative to our location. If no
  43. servers are within 1600 km or none are in the list, the dsock value
  44. is set to -2 to lock out the function.</para></entry>
  45. </row>
  46. </tbody>
  47. </tgroup>
  48. </informaltable>
  49. </sect1>