Differences

This shows you the differences between two versions of the page.

summit:logging [2010/08/18 11:57]
85.178.18.200
summit:logging [2011/03/15 13:50] (current)
m
Line 164: Line 164:
</file> </file>
-And Emacs Lisp to convert from scrying logfile (stripped down NMEA) to decimal:+And Emacs Lisp to convert from scrying logfile (stripped down NMEA) to decimal (fixed 15.03.2011):
<file lisp nmeatodec.el> <file lisp nmeatodec.el>
Line 188: Line 188:
    (insert (number-to-string dec))     (insert (number-to-string dec))
    (re-search-forward "," nil t)     (re-search-forward "," nil t)
-    (forward-char 4)+    (forward-char 3)
    (insert ".")     (insert ".")
    ;; remove next .     ;; remove next .
Line 197: Line 197:
    (re-search-forward "," nil t)     (re-search-forward "," nil t)
    (setq decstring (buffer-substring pnt (- (match-end 0) 1)))     (setq decstring (buffer-substring pnt (- (match-end 0) 1)))
-    (setq dec (/ (string-to-number decstring) 60)) +    (setq dec (/ (string-to-number decstring) 60.0)) ;; now get rid of . 
-    (kill-region pnt (- (match-end 0) 1))+        (kill-region pnt (- (match-end 0) 1))
    (goto-char pnt)     (goto-char pnt)
-        (insert (number-to-string dec))+    (insert (number-to-string dec)) 
 +    (re-search-backward "\\." nil t) 
 +    (delete-char 1)  
    (forward-line 1)     (forward-line 1)
    (beginning-of-line)))     (beginning-of-line)))
-    </file>+</file>
which we can use with: which we can use with:
 
summit/logging.txt · Last modified: 2011/03/15 13:50 by m
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki