Subversion Repositories HomeAutomation

Rev

Rev 1000 | Rev 1456 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. #ifndef SNS_NMEA
  2. #define SNS_NMEA
  3.  
  4. /*-----------------------------------------------------------------------------
  5.  * Includes
  6.  *---------------------------------------------------------------------------*/
  7. /* system files */
  8. #include <avr/io.h>
  9. #include <avr/interrupt.h>
  10. #include <stdio.h>
  11. /* lib files */
  12. #include <config.h>
  13. #include <bios.h>
  14. #include <drivers/can/stdcan.h>
  15. #include <drivers/timer/timer.h>
  16.  
  17. #ifdef TRIMBLE_LASSEN_LP
  18. #define LAT_LENGTH 9
  19. #define LON_LENGTH 10
  20. #define TSIP_AT_STARTUP
  21. #else // Default
  22. #define LAT_LENGTH 10
  23. #define LON_LENGTH 11
  24. #endif
  25.  
  26. void sns_nmea_Init(void);
  27. void sns_nmea_Process(void);
  28. void sns_nmea_HandleMessage(StdCan_Msg_t *rxMsg);
  29. void sns_nmea_List(uint8_t ModuleSequenceNumber);
  30.  
  31. struct {
  32.     uint8_t time_h, time_m, time_s;
  33.     uint8_t lat_deg, lon_deg; //Följer inte auml:s enhetsstandard
  34.     uint8_t lat_min, lon_min;
  35.     uint8_t lat_sec_h, lat_sec_l, lon_sec_h, lon_sec_l; //Last bit contains cardinal direction
  36.    
  37.     uint8_t fixtype; //0=invalid, 1=GPS, 2=DGPS
  38.     uint8_t fixvalid; //From GGA, 0 or 1
  39.     uint8_t usedsat;
  40. } NMEA_data;
  41.  
  42. #endif // SNS_NMEA
  43.