geodesic_wgs84 1.32.5 → 1.32.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0c0527641252be6e5d0f0efd4ed5961167fa994
4
- data.tar.gz: 94e6d7b7fd480b70b05186bd947e1951a1166393
3
+ metadata.gz: ae5e103f4963574c9c9d14020f30da27f8223b11
4
+ data.tar.gz: 8de4ef5f7f44b1ecec778aec3bbaf72470c1a3dd
5
5
  SHA512:
6
- metadata.gz: 86a6e2f95d9b7fd7658b8e3fff634994a21a56d1e6f67885be601db052a9bd87a37191791b0bf361487065429662d1a81ad285f6b5e54419f28fbfb86513df13
7
- data.tar.gz: 278598c94334bacf5d48045e8a1d7b8ab336a2bc6b4f360e9330fcfd28426e71f1845dc24c81f3f35166900bbb27fdc55e0ef576ff0cfd223175116b09fce515
6
+ metadata.gz: 8333f8fad8608d24a7dfe53c96d5d95755ca56b5478c2602dd28f25f43000f0b02dc6f9a09cd2ac2a4c6402209cfd47fd9e32694c2daf32fbd406ce0919f52cf
7
+ data.tar.gz: 5f0c0a3bf995c8b2112291813abd59e5304bfc680583631b568651434dc6f8047bcb22e07be5dd0e6e750234c27d2fe35e8c9d617fb749c04a0e0aa24b819669
data/README.md CHANGED
@@ -36,6 +36,9 @@ Or install it yourself as:
36
36
  The representation of a DMS (degree minute second) format is 'dd.mm.ss,f'
37
37
  where f means tenth of seconds (fraction).
38
38
 
39
+ Also, we are working with 6 decimal places, which will render an accuracy
40
+ of roughly 10cm. See ( http://en.wikipedia.org/wiki/Decimal_degrees#Accuracy )
41
+
39
42
  require 'geodesic_wgs84'
40
43
 
41
44
  wgs84 = Wgs84.new
@@ -48,22 +48,19 @@ wgs84_get_value(VALUE arg)
48
48
  dbl += (double) mm / 60.0;
49
49
  dbl += (double) ss / 3600.0;
50
50
  dbl += (double) ff / 36000.0;
51
- return dbl;
51
+ sprintf(buf, "%.6f", dbl);
52
+ } else if (sscanf(buf, "%d,%d", &dd, &ff) == 2) {
53
+ *strchr(buf, ',') = '.';
52
54
  }
53
55
 
54
56
  if (sscanf(buf, "%d.%d", &dd, &ff) == 2) {
55
57
  sscanf(buf, "%lf", &dbl);
56
58
  return dbl;
57
59
  }
58
-
59
- if (sscanf(buf, "%d,%d", &dd, &ff) == 2) {
60
- *strchr(buf, ',') = '.';
61
- sscanf(buf, "%lf", &dbl);
62
- return dbl;
63
- }
64
60
  }
65
61
 
66
62
  rb_raise(rb_eArgError, "invalid (lat/lon) argument");
63
+ return 0.0;
67
64
  }
68
65
 
69
66
 
@@ -1,3 +1,3 @@
1
1
  module GeodesicWgs84
2
- VERSION = "1.32.5"
2
+ VERSION = "1.32.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geodesic_wgs84
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.32.5
4
+ version: 1.32.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand