Skip to content

Instantly share code, notes, and snippets.

@legumbre
Created May 26, 2014 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save legumbre/9a09b86d56a541ca57d7 to your computer and use it in GitHub Desktop.
Save legumbre/9a09b86d56a541ca57d7 to your computer and use it in GitHub Desktop.
calc and HMS values
;; 1. use a keyboard macro or regexp to turn your lines into:
0@ 58' 40.575"
0@ 30' 20.0"
2@ 58' 40.575"
;; 2. with region including all the previous lines, use calc-grab to grab all those values into calc:
M-x calc-grab-region or C-x * g
;; 3. Your calc buffer will look like:
--- Emacs Calculator Mode ---
1: [0@ 58' 40.575", 0@ 30' 20.", 2@ 58' 40.575"]
;; 4. Now use u M or M-x calc-vector-mean to get the mean of the previous vector:
--- Emacs Calculator Mode ---
1: 1@ 29' 13.716667"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment