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.
 
 
 
 
 
 

75 lines
3.1 KiB

  1. <sect1 id="net_ntrip.c"><title><filename>ntrip.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>Gather and dispatch DGNSS data from Ntrip broadcasters.</entry>
  10. </row>
  11. </thead>
  12. <tfoot>
  13. <row>
  14. <entry spanname='s1' align='left'>Notes based on codec as of Tue Apr 6 10:17:55 2010 -0400.</entry>
  15. </row>
  16. </tfoot>
  17. <tbody>
  18. <row>
  19. <entry><function>static char *ntrip_field_iterate(char *start, char *prev, const char *eol)</function></entry>
  20. <entry><para>Extract individual fields from the STR data block using
  21. ';' as the separator but handling string-embedded ';' characters
  22. correctly.</para></entry>
  23. </row>
  24. <row>
  25. <entry><function>static void ntrip_str_parse(char *str, size_t len, struct ntrip_stream_t *hold)</function></entry>
  26. <entry><para>Break an STR data block down using
  27. <function>ntrip_field_iterate()</function> and store the relevant
  28. details in an accumulation buffer.</para></entry>
  29. </row>
  30. <row>
  31. <entry><function>static int ntrip_sourcetable_parse(int fd, char *buf, ssize_t blen, const char *stream, struct ntrip_stream_t *keep)</function></entry>
  32. <entry><para>Parse a block of ntrip data by passing the STR data to
  33. <function>ntrip_str_parse()</function>.</para><para>Return a 0 on
  34. success or -1 on any of the many possible failures.</para></entry>
  35. </row>
  36. <row>
  37. <entry><function>static int ntrip_stream_probe(const char *caster, const char *port, const char *stream, struct ntrip_stream_t *keep)</function></entry>
  38. <entry><para>Send a request to the broadcaster for a block of
  39. correction data.</para><para>If successful, return the result of
  40. parsing the table. On error return -1.</para></entry>
  41. </row>
  42. <row>
  43. <entry><function>static int ntrip_auth_encode(const struct ntrip_stream_t *stream, const char *auth, char buf[], size_t size)</function></entry>
  44. <entry><para>Check the authorisation of the stream and return 0 if
  45. there is none or it is basic. Return -1 in all other
  46. cases.</para></entry>
  47. </row>
  48. <row>
  49. <entry><function>static int ntrip_stream_open(const char *caster, const char *port, const char *auth, struct gps_context_t *context, struct ntrip_stream_t *stream)</function></entry>
  50. <entry><para>Check the authorisation of the stream and if
  51. successful, try to connect.</para><para>On connection, try to read
  52. data and test for various errors.</para><para>On success, return the
  53. socket number, on error return -1.</para></entry>
  54. </row>
  55. <row>
  56. <entry><function>int ntrip_open(struct gps_context_t *context, char *caster)</function></entry>
  57. <entry><para>Try to establish a connection to the ntrip server. On
  58. success, return the socket number. Signal error with a return of
  59. -1.</para></entry>
  60. </row>
  61. <row>
  62. <entry><function>void ntrip_report(struct gps_device_t *session)</function></entry>
  63. <entry><para>If we have not contacted the server already and we have
  64. at least 10 fixes, send a report to the server and set the flag, so
  65. we don't do it again.</para></entry>
  66. </row>
  67. </tbody>
  68. </tgroup>
  69. </informaltable>
  70. </sect1>