Advertisement
goatbar

sample python paste

Jun 23rd, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1.  
  2. ########################################
  3.  
  4. zda_nmea_regex_str = r'''[$!](?P<talker>[A-Z][A-Z])(?P<sentence>ZDA),
  5. (?P<time_utc>(?P<hours>\d\d)(?P<minutes>\d\d)(?P<seconds>\d\d\.\d\d*))?,
  6. (?P<day>\d\d)?,
  7. (?P<month>\d\d)?,
  8. (?P<year>\d{4})?,
  9. (?P<zone_hrs>[+-]?(\d\d))?,
  10. (?P<zone_min>(\d\d))?,?
  11. \*(?P<checksum>[0-9A-F][0-9A-F])'''
  12.  
  13. '''
  14. $--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx*hh<CR><LF>
  15. | | | | | |
  16. | | | | | +--Local zone minutes description, same sign as local hours
  17. | | | | +-----Local zone description [1], 00 to +-13 hrs
  18. | | | +---------Year
  19. | | +-------------Month, 01 to 12
  20. | +----------------Day , 01 to 31
  21. +------------------------UTC'''
  22.  
  23. regex_dict['zda'] = re.compile(zda_nmea_regex_str, re.VERBOSE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement