gpx_doctor 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acb87257e118bff8499cfa14686bd88d04c6b89beb02b0f5c50bff087a73fd8e
4
- data.tar.gz: 6ecc166553da8067c1970fd22452aae97384ebdd36363f661ccbf8cf54cea5bd
3
+ metadata.gz: 62f11c008dcbf53c4585d1cc1d4935555ddecbfc98ce4db4f0141476f2847ce3
4
+ data.tar.gz: ebf37bed3a22db9e84a6a0d1b593f2e3f9e9bf0146f114a06d8b900cc2e853f8
5
5
  SHA512:
6
- metadata.gz: 61092aea3f7b2b2995289ada84eead6566b24ede417b0d916802c18ec9f463fd9b444d0515610bb73bb9c05e80f012be50111927e72b081721e927fa139993c5
7
- data.tar.gz: 00d4010f2c0f85d1fc3773d5e6da614944205f8278099370dd2f846a471bf06c9a7cafb689f75ddd12d0c74b56b0de27fc99410769de4370b35e07dc7b224fae
6
+ metadata.gz: b096d0f32832c3ecd0147bd5b6066dd18f1fd19233af68101d486b5a4895febb2228da30fd907b849436a1feaca98bc707cfd2a0963b05b0587962d11a803f85
7
+ data.tar.gz: 5cf20d498a2247483904a86ca637bff0cc527bafe74f7c312d869694ef05fa798f675940f536980240eab12a90034bed42e841bcc6056bf43fb5505484baddc8
data/README.md CHANGED
@@ -298,7 +298,7 @@ GpxDoctor::Builder.build_file(result, 'output.gpx')
298
298
  | `distance_to_next` | Float | Distance to next point (metres or feet based on `unit_system`) — set by `segment_statistics: true` |
299
299
  | `elevation_change` | Float | Elevation change to next point (metres or feet based on `unit_system`) — set by `segment_statistics: true` |
300
300
  | `direction` | Float | Bearing to next point (0–360°) — set by `segment_statistics: true` |
301
- | `cumulative_distance` | Float | Cumulative distance from segment/route start (kilometres or miles based on `unit_system`) — set by `cumulative_distance: true` |
301
+ | `cumulative_distance` | Float | Cumulative distance from segment/route start (kilometres or miles based on `unit_system`) — set by `cumulative_distance: true`; also set (to the same value as `label`) for points inserted by `label_interval` |
302
302
  | `label` | Float | Cumulative distance mark for a point inserted by `label_interval` (kilometres or miles based on `unit_system`); `nil` for points not created for labelling — set by `label_interval` |
303
303
 
304
304
  `Waypoint#to_h` returns a hash of all non-nil fields.
@@ -34,6 +34,7 @@ module GpxDoctor
34
34
  cumulative = cumulative_distances(points)
35
35
 
36
36
  result = [points.first]
37
+ label_interval = label_interval.to_f
37
38
  target = label_interval
38
39
 
39
40
  points.each_cons(2).with_index do |(a, b), i|
@@ -87,7 +88,8 @@ module GpxDoctor
87
88
  lon: a.lon + fraction * (b.lon - a.lon),
88
89
  ele: ele,
89
90
  time: time,
90
- label: target
91
+ label: target,
92
+ cumulative_distance: target
91
93
  )
92
94
  end
93
95
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GpxDoctor
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpx_doctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Poltrax