|
Revision 3656, 0.8 kB
(checked in by ksprotte, 4 months ago)
|
whitespace cleanup
|
| Line | |
|---|
| 1 |
(in-package :bos.test) |
|---|
| 2 |
(in-suite :bos.test.geo-utm) |
|---|
| 3 |
|
|---|
| 4 |
(test utm-conversion.back-and-forth |
|---|
| 5 |
(labels ((almost-equal (a b) |
|---|
| 6 |
(< (abs (- a b)) 0.00001d0))) |
|---|
| 7 |
(for-all ((lon (gen-integer :min -180 :max 180)) |
|---|
| 8 |
(lat (gen-integer :min -80 :max 80))) |
|---|
| 9 |
(destructuring-bind (lon2 lat2) |
|---|
| 10 |
(apply #'geo-utm:utm-x-y-to-lon-lat (geo-utm:lon-lat-to-utm-x-y lon lat)) |
|---|
| 11 |
(is (almost-equal lon lon2)) |
|---|
| 12 |
(is (almost-equal lat lat2)))))) |
|---|
| 13 |
|
|---|
| 14 |
(test utm-conversion.some-specifics |
|---|
| 15 |
(is (equal '(388736.18772114645d0 9889452.894308068d0 50 T) |
|---|
| 16 |
(geo-utm:lon-lat-to-utm-x-y 116 -1))) |
|---|
| 17 |
(is (equal '(444380.7467801254d0 9834198.197672028d0 50 T) |
|---|
| 18 |
(geo-utm:lon-lat-to-utm-x-y 116.5 -1.5)))) |
|---|