(defun convert-str-gms-to-dec (string / grad minu pos-d pos-m pos-s sek)
  ; переводит текстовую строку градусы минуты секунды 180d30'15" в десятичные градусы
  (setq pos-d (vl-string-position (ascii "d") string))
  (setq pos-m (vl-string-position (ascii "'") string))
  (setq pos-s (vl-string-position (ascii "\"") string))
  (princ (setq grad (if pos-d (atof(substr string 1 pos-d))(atof string))))(terpri)
  (princ (setq minu (if (and pos-d pos-m)(atof(substr string (+ 2 pos-d) (- pos-m pos-d 1)))0.0)))(terpri)
  (princ (setq sek (if (and pos-m pos-s)(atof(substr string (+ 2 pos-m) (- pos-s pos-m 1)))0.0)))(terpri)
  (+(float grad)(/ (+ (float minu)(/ (float sek)60.0))60.0))
  )