explan_gpsutils.c.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <sect1 id="gpsuitls.c"><title><filename>gpsutils.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>Code shared between low-level and
  10. high-level interfaces. Most of them do exactly what they say on the
  11. tin.</entry>
  12. </row>
  13. </thead>
  14. <tfoot>
  15. <row>
  16. <entry spanname='s1' align='left'>Notes based on code as of Mon Apr 5 21:38:06 2010 -0400.</entry>
  17. </row>
  18. </tfoot>
  19. <tbody>
  20. <row>
  21. <entry><function>void gps_clear_fix(struct gps_fix_t *fixp)</function></entry>
  22. <entry><para>Stuff a fix structure with recognizable out-of-band values.</para></entry>
  23. </row>
  24. <row>
  25. <entry><function>unsigned int gps_valid_fields(struct gps_fix_t *fixp)</function></entry>
  26. <entry><para>Clears certain status flags, depending if the associated fields are invalid.</para></entry>
  27. </row>
  28. <row>
  29. <entry><function>time_t mkgmtime(register struct tm *t)</function></entry>
  30. <entry><para>Convert a struct <function>tm {}</function> (see <function>time.h</function>) to seconds since UNIX Epoch.</para></entry>
  31. </row>
  32. <row>
  33. <entry><function>timespec_t iso8601_to_timespec(char *isotime)</function></entry>
  34. <entry><para>Convert an ISO8601 UTC string (like 2006-01-25T13:15:22.9Z) to a
  35. timespec_t (time_t,long).</para></entry>
  36. </row>
  37. <row>
  38. <entry><function>char *timespec_to_iso8601(timespec_t ts, char isotime[], int len)</function></entry>
  39. <entry><para>Convert a struct timepsec into an ISO8601 UTC string (like 2006-01-25T13:15:22.9Z).</para></entry>
  40. </row>
  41. <row>
  42. <entry><function>static double CalcRad(double lat)</function></entry>
  43. <entry><para>Return the earth's radius of curvature in meters at specified latitude.</para></entry>
  44. </row>
  45. <row>
  46. <entry><function>double earth_distance(double lat1, double lon1, double lat2, double lon2)</function></entry>
  47. <entry><para>Return the distance in meters between two points specified in degrees.</para></entry>
  48. </row>
  49. <row>
  50. <entry><function>static int invert(double mat[4][4], double inverse[4][4])</function></entry>
  51. <entry><para>Try and invert an array. If it is possible, fill the inverted array and return a 1. Return a 0 if it is not possible.</para></entry>
  52. </row>
  53. <row>
  54. <entry><function>gps_mask_t dop(struct gps_data_t *gpsdata)</function></entry>
  55. <entry><para>Take a gps data structure and try to calculate the DOP values from the other data in it. Return 0 if it is not possible or update the appropriate DOP fields in the structure and set a mask which tells which fields were updated.</para></entry>
  56. </row>
  57. </tbody>
  58. </tgroup>
  59. </informaltable>
  60. </sect1>