gooby 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +133 -341
- data/config/ballantyne.yaml +11 -0
- data/config/big_sur_marathon.yaml +11 -0
- data/config/crowders_mtn_hike.yaml +11 -0
- data/config/davidson1.yaml +16 -0
- data/config/gooby_config.yaml +28 -135
- data/cucumber.yml +1 -0
- data/features/build_gem.feature +88 -0
- data/features/gooby.feature +300 -0
- data/features/install.feature +78 -0
- data/features/steps/gooby_steps.rb +245 -0
- data/features/support/env.rb +4 -0
- data/lib/gooby.rb +24 -30
- data/lib/gooby_activity.rb +63 -0
- data/lib/gooby_base_object.rb +46 -0
- data/lib/gooby_base_sax_parser.rb +95 -0
- data/lib/gooby_configuration.rb +33 -115
- data/lib/gooby_counter_hash.rb +28 -87
- data/lib/gooby_dttm.rb +88 -66
- data/lib/gooby_environment.rb +48 -0
- data/lib/gooby_garmin_tcx_parser.rb +92 -0
- data/lib/gooby_google_kml_generator.rb +168 -0
- data/lib/gooby_google_map_generator.rb +284 -349
- data/lib/gooby_gpx_parser.rb +97 -0
- data/lib/gooby_help_producer.rb +40 -0
- data/lib/gooby_introspection.rb +25 -0
- data/lib/gooby_io.rb +30 -0
- data/lib/gooby_lap.rb +27 -18
- data/lib/gooby_process.rb +281 -0
- data/lib/gooby_sax_path_parser.rb +43 -0
- data/lib/gooby_tcx_extractor.rb +71 -0
- data/lib/gooby_track_log_parser.rb +114 -0
- data/lib/gooby_trackpoint.rb +276 -0
- data/lib/gooby_xml_object.rb +40 -0
- data/{img/gicons → out/images}/blank.png +0 -0
- data/{img/gicons → out/images}/dd-end.png +0 -0
- data/{img/gicons → out/images}/dd-start.png +0 -0
- data/{img/gicons → out/images}/marker.png +0 -0
- data/{img/gicons → out/images}/marker0.png +0 -0
- data/{img/gicons → out/images}/marker00.png +0 -0
- data/{img/gicons → out/images}/marker01.png +0 -0
- data/{img/gicons → out/images}/marker02.png +0 -0
- data/{img/gicons → out/images}/marker03.png +0 -0
- data/{img/gicons → out/images}/marker04.png +0 -0
- data/{img/gicons → out/images}/marker05.png +0 -0
- data/{img/gicons → out/images}/marker06.png +0 -0
- data/{img/gicons → out/images}/marker07.png +0 -0
- data/{img/gicons → out/images}/marker08.png +0 -0
- data/{img/gicons → out/images}/marker09.png +0 -0
- data/{img/gicons → out/images}/marker1.png +0 -0
- data/{img/gicons → out/images}/marker10.png +0 -0
- data/{img/gicons → out/images}/marker11.png +0 -0
- data/{img/gicons → out/images}/marker12.png +0 -0
- data/{img/gicons → out/images}/marker13.png +0 -0
- data/{img/gicons → out/images}/marker14.png +0 -0
- data/{img/gicons → out/images}/marker15.png +0 -0
- data/{img/gicons → out/images}/marker16.png +0 -0
- data/{img/gicons → out/images}/marker17.png +0 -0
- data/{img/gicons → out/images}/marker18.png +0 -0
- data/{img/gicons → out/images}/marker19.png +0 -0
- data/{img/gicons → out/images}/marker2.png +0 -0
- data/{img/gicons → out/images}/marker20.png +0 -0
- data/{img/gicons → out/images}/marker21.png +0 -0
- data/{img/gicons → out/images}/marker22.png +0 -0
- data/{img/gicons → out/images}/marker23.png +0 -0
- data/{img/gicons → out/images}/marker24.png +0 -0
- data/{img/gicons → out/images}/marker25.png +0 -0
- data/{img/gicons → out/images}/marker26.png +0 -0
- data/{img/gicons → out/images}/marker27.png +0 -0
- data/{img/gicons → out/images}/marker28.png +0 -0
- data/{img/gicons → out/images}/marker29.png +0 -0
- data/{img/gicons → out/images}/marker3.png +0 -0
- data/{img/gicons → out/images}/marker30.png +0 -0
- data/{img/gicons → out/images}/marker31.png +0 -0
- data/{img/gicons → out/images}/marker32.png +0 -0
- data/{img/gicons → out/images}/marker33.png +0 -0
- data/{img/gicons → out/images}/marker34.png +0 -0
- data/{img/gicons → out/images}/marker35.png +0 -0
- data/{img/gicons → out/images}/marker36.png +0 -0
- data/{img/gicons → out/images}/marker37.png +0 -0
- data/{img/gicons → out/images}/marker38.png +0 -0
- data/{img/gicons → out/images}/marker39.png +0 -0
- data/{img/gicons → out/images}/marker4.png +0 -0
- data/{img/gicons → out/images}/marker40.png +0 -0
- data/{img/gicons → out/images}/marker41.png +0 -0
- data/{img/gicons → out/images}/marker42.png +0 -0
- data/{img/gicons → out/images}/marker43.png +0 -0
- data/{img/gicons → out/images}/marker44.png +0 -0
- data/{img/gicons → out/images}/marker45.png +0 -0
- data/{img/gicons → out/images}/marker46.png +0 -0
- data/{img/gicons → out/images}/marker47.png +0 -0
- data/{img/gicons → out/images}/marker48.png +0 -0
- data/{img/gicons → out/images}/marker49.png +0 -0
- data/{img/gicons → out/images}/marker5.png +0 -0
- data/{img/gicons → out/images}/marker50.png +0 -0
- data/{img/gicons → out/images}/marker51.png +0 -0
- data/{img/gicons → out/images}/marker52.png +0 -0
- data/{img/gicons → out/images}/marker53.png +0 -0
- data/{img/gicons → out/images}/marker54.png +0 -0
- data/{img/gicons → out/images}/marker55.png +0 -0
- data/{img/gicons → out/images}/marker56.png +0 -0
- data/{img/gicons → out/images}/marker57.png +0 -0
- data/{img/gicons → out/images}/marker58.png +0 -0
- data/{img/gicons → out/images}/marker59.png +0 -0
- data/{img/gicons → out/images}/marker6.png +0 -0
- data/{img/gicons → out/images}/marker60.png +0 -0
- data/{img/gicons → out/images}/marker61.png +0 -0
- data/{img/gicons → out/images}/marker62.png +0 -0
- data/{img/gicons → out/images}/marker63.png +0 -0
- data/{img/gicons → out/images}/marker64.png +0 -0
- data/{img/gicons → out/images}/marker65.png +0 -0
- data/{img/gicons → out/images}/marker66.png +0 -0
- data/{img/gicons → out/images}/marker67.png +0 -0
- data/{img/gicons → out/images}/marker68.png +0 -0
- data/{img/gicons → out/images}/marker69.png +0 -0
- data/{img/gicons → out/images}/marker7.png +0 -0
- data/{img/gicons → out/images}/marker70.png +0 -0
- data/{img/gicons → out/images}/marker71.png +0 -0
- data/{img/gicons → out/images}/marker72.png +0 -0
- data/{img/gicons → out/images}/marker73.png +0 -0
- data/{img/gicons → out/images}/marker74.png +0 -0
- data/{img/gicons → out/images}/marker75.png +0 -0
- data/{img/gicons → out/images}/marker76.png +0 -0
- data/{img/gicons → out/images}/marker77.png +0 -0
- data/{img/gicons → out/images}/marker78.png +0 -0
- data/{img/gicons → out/images}/marker79.png +0 -0
- data/{img/gicons → out/images}/marker8.png +0 -0
- data/{img/gicons → out/images}/marker80.png +0 -0
- data/{img/gicons → out/images}/marker81.png +0 -0
- data/{img/gicons → out/images}/marker82.png +0 -0
- data/{img/gicons → out/images}/marker83.png +0 -0
- data/{img/gicons → out/images}/marker84.png +0 -0
- data/{img/gicons → out/images}/marker85.png +0 -0
- data/{img/gicons → out/images}/marker86.png +0 -0
- data/{img/gicons → out/images}/marker87.png +0 -0
- data/{img/gicons → out/images}/marker88.png +0 -0
- data/{img/gicons → out/images}/marker89.png +0 -0
- data/{img/gicons → out/images}/marker9.png +0 -0
- data/{img/gicons → out/images}/marker90.png +0 -0
- data/{img/gicons → out/images}/marker91.png +0 -0
- data/{img/gicons → out/images}/marker92.png +0 -0
- data/{img/gicons → out/images}/marker93.png +0 -0
- data/{img/gicons → out/images}/marker94.png +0 -0
- data/{img/gicons → out/images}/marker95.png +0 -0
- data/{img/gicons → out/images}/marker96.png +0 -0
- data/{img/gicons → out/images}/marker97.png +0 -0
- data/{img/gicons → out/images}/marker98.png +0 -0
- data/{img/gicons → out/images}/marker99.png +0 -0
- data/{img/gicons → out/images}/markerA.png +0 -0
- data/{img/gicons → out/images}/markerB.png +0 -0
- data/{img/gicons → out/images}/markerC.png +0 -0
- data/{img/gicons → out/images}/markerD.png +0 -0
- data/{img/gicons → out/images}/markerE.png +0 -0
- data/{img/gicons → out/images}/markerF.png +0 -0
- data/{img/gicons → out/images}/markerG.png +0 -0
- data/{img/gicons → out/images}/markerH.png +0 -0
- data/{img/gicons → out/images}/markerI.png +0 -0
- data/{img/gicons → out/images}/markerJ.png +0 -0
- data/{img/gicons → out/images}/mm_20_red.png +0 -0
- data/{img/gicons → out/images}/mm_20_shadow.png +0 -0
- data/{img/gicons → out/images}/shadow50.png +0 -0
- data/rakefile.rb +79 -0
- data/samples.sh +21 -0
- data/samples/2008_04_27_13_49_50_tcx.csv +2449 -0
- data/samples/2008_04_27_13_49_50_tcx.xml +24560 -0
- data/samples/2009_01_01_14_45_00_tcx.xml +10630 -0
- data/samples/ballantyne.csv +27 -0
- data/samples/ballantyne.gpx +117 -0
- data/samples/ballantyne.kml +91 -0
- data/samples/big_sur_marathon.html +2766 -0
- data/samples/big_sur_marathon.kml +685 -0
- data/samples/build_gem_test_results.txt +6 -0
- data/samples/crowders_mtn_hike.csv +1065 -0
- data/samples/crowders_mtn_hike.html +1283 -0
- data/samples/crowders_mtn_hike.log +1 -0
- data/samples/cucumber_test_results.txt +302 -0
- data/samples/davidson1.csv +1 -0
- data/samples/davidson1.html +75 -0
- data/samples/davidson_1_point_tcx.csv +0 -0
- data/samples/doc.kml +49 -0
- data/samples/gps_track_log_asheville_mt_pisgah.txt +1 -0
- data/samples/gps_track_logs.txt +1 -0
- data/samples/install_test_results.txt +81 -0
- data/samples/mt_pisgah.txt +1 -0
- data/samples/rspec_test_results.txt +5 -0
- data/setup.rb +66 -0
- data/spec/gooby_base_object_spec.rb +116 -0
- data/spec/gooby_counter_hash_spec.rb +34 -0
- data/spec/gooby_dttm_spec.rb +40 -0
- data/spec/gooby_spec_helper.rb +9 -0
- data/spec/gooby_xml_object_spec.rb +32 -0
- metadata +225 -226
- data/bin/code_scan.rb +0 -16
- data/bin/gooby_been_there.rb +0 -33
- data/bin/gooby_config.rb +0 -24
- data/bin/gooby_csv_validation.rb +0 -50
- data/bin/gooby_first_trackpoints_as_poi.rb +0 -31
- data/bin/gooby_gen_gmap.rb +0 -20
- data/bin/gooby_parser.rb +0 -21
- data/bin/gooby_splitter.rb +0 -21
- data/bin/gooby_version.rb +0 -20
- data/bin/run_all.sh +0 -33
- data/bin/run_been_there.sh +0 -19
- data/bin/run_config.sh +0 -12
- data/bin/run_csv_validation.sh +0 -15
- data/bin/run_db_gen.sh +0 -11
- data/bin/run_db_load.sh +0 -11
- data/bin/run_first_trackpoints_as_poi.sh +0 -16
- data/bin/run_gen_gmaps.sh +0 -21
- data/bin/run_parse_full.sh +0 -45
- data/bin/run_parse_samples.sh +0 -21
- data/bin/run_split.sh +0 -24
- data/bin/run_version.sh +0 -12
- data/data/20050305_corporate_cup_hm.csv +0 -251
- data/data/20050305_corporate_cup_hm.xml +0 -2208
- data/data/20050430_nashville_marathon.xml +0 -10043
- data/data/20050430_nashville_marathon_km.csv +0 -1208
- data/data/20060115_phoenix_marathon.csv +0 -1280
- data/data/20060115_phoenix_marathon.xml +0 -10620
- data/data/20070101_davidson_11m.csv +0 -251
- data/data/20070101_davidson_11m.xml +0 -2020
- data/data/20070505_davidson_5k.xml +0 -2875
- data/data/20070505_davidson_5k_km.csv +0 -286
- data/data/hrm1.csv +0 -5
- data/img/gicons/readme.txt +0 -14
- data/lib/gooby_code_scanner.rb +0 -288
- data/lib/gooby_command.rb +0 -210
- data/lib/gooby_course.rb +0 -117
- data/lib/gooby_csv_point.rb +0 -71
- data/lib/gooby_csv_reader.rb +0 -71
- data/lib/gooby_csv_run.rb +0 -28
- data/lib/gooby_delim_line.rb +0 -42
- data/lib/gooby_duration.rb +0 -86
- data/lib/gooby_forerunner_xml_parser.rb +0 -191
- data/lib/gooby_forerunner_xml_splitter.rb +0 -115
- data/lib/gooby_history.rb +0 -41
- data/lib/gooby_kernel.rb +0 -163
- data/lib/gooby_line.rb +0 -80
- data/lib/gooby_object.rb +0 -22
- data/lib/gooby_point.rb +0 -172
- data/lib/gooby_run.rb +0 -213
- data/lib/gooby_simple_xml_parser.rb +0 -50
- data/lib/gooby_test_helper.rb +0 -23
- data/lib/gooby_track.rb +0 -47
- data/lib/gooby_track_point.rb +0 -229
- data/lib/gooby_training_center_xml_parser.rb +0 -224
- data/lib/gooby_training_center_xml_splitter.rb +0 -116
- data/lib/split_code.sh +0 -29
- data/samples/20050305_corporate_cup_hm.html +0 -450
- data/samples/20050430_nashville_marathon.html +0 -1668
- data/samples/20060115_phoenix_marathon.html +0 -1596
- data/samples/20070101_davidson_11m.html +0 -432
- data/samples/20070505_davidson_5k.html +0 -413
- data/samples/been_there.txt +0 -92
- data/samples/hrm1.html +0 -87
- data/sql/gooby.ddl +0 -60
- data/sql/gooby_load.dml +0 -62
data/README
CHANGED
@@ -1,418 +1,210 @@
|
|
1
1
|
= Gooby = Google APIs + Ruby
|
2
2
|
|
3
|
-
|
3
|
+
Gooby is a set of Ruby code to assist you in creating Google Maps, and
|
4
|
+
Google Earth maps, from data exported from your Garmin GPS devices and
|
5
|
+
your desktop software such as Garmin Training Center and/or MacGpsPro.
|
6
|
+
Gooby will also process gpx data from the iPhone "MotionX GPS" application.
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
+
It will parse the exported Garmin xml/tcx/txt data, or MotionX gpx data,
|
9
|
+
into csv files in a "standard gooby format". You then use Gooby to generate
|
10
|
+
maps from specific csv files per yaml configuration files.
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
http://www.joakim-systems.com:8219/gmap/ccc_half_2005
|
12
|
-
http://www.joakim-systems.com:8219/gmap/nashville_marathon_2005
|
13
|
-
http://www.joakim-systems.com:8219/gmap/phoenix_marathon_2006
|
12
|
+
The typical uses of Gooby are to create maps of your running, cycling, or
|
13
|
+
hiking events, though Gooby is suitable for mapping any outdoor activity.
|
14
14
|
|
15
|
-
|
16
|
-
http://www.joakim-systems.com:8219/gooby/readme
|
17
|
-
|
18
|
-
---
|
19
|
-
|
20
|
-
This gem contains 'Gooby', a set of Ruby code to assist you with using and
|
21
|
-
producing content for the various Google APIs. The initial focus of Gooby is
|
22
|
-
on the Google Maps API, version 2.0.
|
23
|
-
|
24
|
-
Google Maps can be produced using Gooby from your data in CSV format,
|
25
|
-
as created in one of the following three ways.
|
26
|
-
1) From exported and parsed Garmin ForerunnerLogbook XML files.
|
27
|
-
2) From exported and parsed Garmin TrainingCenter TCX(XML) files.
|
28
|
-
3) From your own manually edited Global Positioning System (GPS) data.
|
29
|
-
See any of the 'data/*.csv' files in the distribution for an example
|
30
|
-
of the CSV format.
|
31
|
-
|
32
|
-
Google maps are applicable really to any outdoor activity for which GPS data
|
33
|
-
can be obtained. The focus of Gooby is on running, because the author is a
|
34
|
-
marathon runner, and the Garmin Forerunner (I use models 201, 205, and 305)
|
35
|
-
is primarily intended for running. Other activities, such as cycling, hiking,
|
36
|
-
walking, driving, and even golfing are also well suited for Gooby. Please let
|
37
|
-
me know how you use Gooby! Feedback is requested.
|
38
|
-
|
39
|
-
All Gooby functionality is intended to be invoked from a command line. Web
|
40
|
-
and Rails integration may be done in a later release.
|
15
|
+
All Gooby functionality is intended to be invoked from a command line.
|
41
16
|
|
42
17
|
= General
|
43
18
|
|
44
19
|
Author:: Chris Joakim <chris@joakim-systems.com>
|
45
20
|
Requires:: Ruby 1.8.4 or later
|
46
|
-
License:: Copyright
|
21
|
+
License:: Copyright 2009 by Chris Joakim.
|
47
22
|
GNU General Public License (GPL) license.
|
48
23
|
See http://www.gnu.org/copyleft/gpl.html
|
49
|
-
|
24
|
+
|
50
25
|
== License
|
51
26
|
|
52
27
|
Gooby is available under GNU General Public License (GPL) license.
|
53
28
|
|
54
|
-
== Download
|
55
|
-
|
56
|
-
The latest version of gooby can be found at
|
57
|
-
* http://rubyforge.org/projects/gooby/
|
58
|
-
|
59
|
-
== Installation
|
60
|
-
|
61
|
-
Gooby is packaged and installed as a ruby 'gem'. Download the latest gem to
|
62
|
-
your computer, then run the following command from your download directory.
|
63
|
-
|
64
|
-
gem install gooby-1.2.0.gem
|
65
|
-
|
66
|
-
== Online Resources
|
67
|
-
|
68
|
-
* The Gooby home page http://rubyforge.org/projects/gooby/.
|
69
|
-
RubyForge provides CVS hosting for the project.
|
70
|
-
|
71
|
-
Sample Gooby-generated Google Maps are at www.joakim-systems.com, below:
|
72
|
-
|
73
|
-
http://www.joakim-systems.com:8219/gmap/
|
74
|
-
http://www.joakim-systems.com:8219/gmap/ccc_half_2005
|
75
|
-
http://www.joakim-systems.com:8219/gmap/nashville_marathon_2005
|
76
|
-
http://www.joakim-systems.com:8219/gmap/phoenix_marathon_2006
|
77
|
-
http://www.joakim-systems.com:8219/gmap/gps_data_capture
|
78
29
|
|
30
|
+
== Download
|
79
31
|
|
80
|
-
|
32
|
+
Gooby is packaged and installed as a ruby 'gem'. Download file 'gooby-2.0.0.gem'
|
33
|
+
from http://rubyforge.org/projects/gooby/.
|
81
34
|
|
82
|
-
* Added support for the Garmin 305 Heartbeat monitor.
|
83
|
-
- Heartbeat values are captured in the XML parsing process.
|
84
|
-
- CSV file format expanded to include heartbeat.
|
85
|
-
- Database DDL modified to add the heartbeat column.
|
86
|
-
- Generated Google Maps now have heartbeat in the popup windows.
|
87
|
-
- Legacy Garmin 201 and Garmin 205 CSV files and Google Maps simply
|
88
|
-
omit the heartbeat information.
|
89
|
-
- Heartbeat is displayed, if data is present, in the new Gooby 1.1.0
|
90
|
-
"been_there" reports. This may be interesting for hill-climbers
|
91
|
-
and interval-trainers.
|
92
35
|
|
93
|
-
|
94
|
-
- Either 'mi' or 'km' is specified in the XML parsing process.
|
95
|
-
- mi or km unit-of-measure is retained in the CSV files.
|
96
|
-
- Generated Google Maps now generate markers at either integer
|
97
|
-
miles or kilometers, depending on the input CSV file.
|
98
|
-
- Generated Google Map popup windows display the unit-of-measure.
|
36
|
+
== Installation
|
99
37
|
|
100
|
-
|
101
|
-
|
38
|
+
1. Ensure that you have the necessary prerequisites installed on your computer. These
|
39
|
+
include ruby itself, the rubygems package management system, and the libxml-ruby 0.9.7
|
40
|
+
and fastercsv 1.4.0 gems.
|
102
41
|
|
103
|
-
|
104
|
-
|
42
|
+
You will also need desktop software, such as Garmin Training Center and/or MacGpsPro,
|
43
|
+
which reads data from your GPS device, and enables it to be exported to files which
|
44
|
+
Gooby can process. Garmin Training Center is a free download from Garmin.com.
|
105
45
|
|
46
|
+
2. Set the required GOOBY_HOME environment variable on your computer. This variable
|
47
|
+
names the directory on your computer where you will store your Gooby-related files,
|
48
|
+
and where Gooby will generate content to. Suggested values are 'C:\gooby' on Windows,
|
49
|
+
and '~/gooby' on unix-based systems.
|
106
50
|
|
107
|
-
|
51
|
+
3. From your downloads directory, run the following commands:
|
52
|
+
gem unpack gooby-2.0.0.gem
|
53
|
+
sudo gem install gooby-2.0.0.gem
|
108
54
|
|
109
|
-
|
110
|
-
|
55
|
+
4. Step 3 creates directory 'gooby-2.0.0' within your downloads directory. Navigate
|
56
|
+
into this directory, then run the following command.
|
57
|
+
ruby setup.rb
|
111
58
|
|
112
|
-
|
113
|
-
|
59
|
+
This will create subdirectories within your GOOBY_HOME, and will populate the /config
|
60
|
+
and /samples directories with several files.
|
114
61
|
|
115
|
-
* Gooby is a Garmin XML parser! The 'marketing' focus on Gooby prior to now
|
116
|
-
has been on Google Map generation. However, some users simply use it as
|
117
|
-
a Garmin XML to CSV parser, then use the parsed data for their own various
|
118
|
-
needs without creating a Google map. This release recognizes that simple
|
119
|
-
parsing of Garmin data is a significant and "core" use of Gooby.
|
120
62
|
|
121
|
-
|
122
|
-
line, including a unique identifier (primary key), run_id, and lap-specific
|
123
|
-
info such as lap number, lap distance, and lap elapsed time.
|
63
|
+
== Usage
|
124
64
|
|
125
|
-
|
126
|
-
|
127
|
-
"points of interest" (poi) in the yaml file. Furthermore, you can define
|
128
|
-
"courses" or "subcourses" which consist of a given series of points-of-
|
129
|
-
interest. See 'gooby_config.yaml' for examples.
|
65
|
+
All Gooby functionality is invoked from a command line in your GOOBY_HOME directory.
|
66
|
+
The rake program is used to execute all Gooby functions.
|
130
67
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
proximity. Your courses are defined in the yaml file (see the above item).
|
135
|
-
Proximity is specified in "degrees difference" between the course point
|
136
|
-
definition coordinates, and the actual observed GPS coordinates. Degrees
|
137
|
-
difference is defined as the absolute value of lat1 - lat2, plus the
|
138
|
-
absolute value of lng1 - lng2.
|
68
|
+
I encourage the reader to read the cucumber test file, 'features/gooby.feature' to become
|
69
|
+
familiar with how to use Gooby. Cucumber is a ruby testing tool that allows you to specify
|
70
|
+
tests and requirements in English, then have ruby translate and execute the English text.
|
139
71
|
|
140
|
-
|
72
|
+
1. Run command 'rake' from your GOOBY_HOME to see the list of Gooby commands available to you.
|
73
|
+
The list you see will look like the following:
|
141
74
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
75
|
+
rake # Default Task; Display Gooby usage instructions.
|
76
|
+
rake gooby:help # Display Gooby usage instructions.
|
77
|
+
rake gooby:extract_activities_from_tcx # Extract individual Activity xml files from a Garmin tcx file
|
78
|
+
rake gooby:parse_activity_xml_to_csv # Parse an extracted Activity xml file to a corresponding csv file.
|
79
|
+
rake gooby:parse_track_log_to_csv # Parse a GPS Track Log file a corresponding csv file.
|
80
|
+
rake gooby:parse_gpx_to_csv # Parse a GPX file a corresponding csv file.
|
81
|
+
rake gooby:generate_google_map # Generate a Google Map from a csv file.
|
82
|
+
rake gooby:generate_google_earth_map # Generate a Google Earth kml file from a csv file.
|
146
83
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
Windows Explorer during Q2 2007, as the Gooby-generated Google Maps now
|
162
|
-
display properly in IE.
|
163
|
-
|
164
|
-
* Add Rails support for realtime dynamic map/content generation.
|
165
|
-
|
166
|
-
* Parse cadence information from Garmin export file for cyclists.
|
167
|
-
Note: Please provide me a sample file.
|
168
|
-
|
169
|
-
* Add other Google APIs (earth, search, sitemaps, froogle, etc).
|
170
|
-
|
171
|
-
== Support
|
172
|
-
|
173
|
-
Please see http://rubyforge.org/projects/gooby/ to submit a request or report
|
174
|
-
a bug, on the Tracker page.
|
175
|
-
|
176
|
-
----
|
177
|
-
|
178
|
-
= Usage
|
179
|
-
|
180
|
-
See the 'run_xxx.sh' shell scripts and corresponding ruby files in the /bin directory
|
181
|
-
for actual working examples used during Gooby development and testing.
|
182
|
-
|
183
|
-
The following in-line text shows both the shell and ruby code.
|
184
|
-
|
185
|
-
Function 1 - Gooby Version Information
|
186
|
-
-------------------------------------------
|
187
|
-
shell:
|
188
|
-
|
189
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_version.rb
|
84
|
+
2. Run command 'rake', or 'rake gooby:help' to display the "help content" for Gooby;
|
85
|
+
it contains specific examples of each command, and a description of the directory structure.
|
86
|
+
|
87
|
+
3. The typical usage sequence is as follows.
|
88
|
+
|
89
|
+
Part 1 - outside of the realm of Gooby:
|
90
|
+
a. Do some outdoor event, with your Garmin GPS device recording your movements.
|
91
|
+
Or with your MotionX application on your iPhone. Or with another device that
|
92
|
+
can emit data in gpx format.
|
93
|
+
b. Connect your Garmin device to your computer, typically via a USB port.
|
94
|
+
c. Use your desktop software, such as Garmin Training Center, to import the GPS
|
95
|
+
data from your GPS device.
|
96
|
+
d. Use your desktop software to export its data to a file in your 'GOOBY_HOME/data' directory.
|
97
|
+
In Garmin Training Center, this is done with the File -> Export... menu.
|
190
98
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
gooby = Gooby::GoobyCommand.new(config_filename)
|
200
|
-
gooby.display_version
|
201
|
-
|
202
|
-
|
203
|
-
Function 2 - Gooby Configuration YAML Contents
|
204
|
-
----------------------------------------------
|
205
|
-
shell:
|
206
|
-
|
207
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_config.rb
|
208
|
-
|
209
|
-
ruby:
|
210
|
-
|
211
|
-
require 'rubygems'
|
212
|
-
require 'gooby'
|
213
|
-
include REXML
|
214
|
-
|
215
|
-
config_filename = '/devtools/workspace/RF_Gooby/config/gooby_config.yaml'
|
216
|
-
|
217
|
-
gooby = Gooby::GoobyCommand.new(config_filename)
|
218
|
-
gooby.display_configuration
|
219
|
-
|
220
|
-
|
221
|
-
Function 3 - Garmin XML/TCX file splitting:
|
222
|
-
-------------------------------------------
|
223
|
-
shell:
|
224
|
-
|
225
|
-
rm /temp/splits/*.*
|
226
|
-
|
227
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_splitter.rb garmin201 /devtools/workspace/RF_Gooby/data/raw/forerunner_201_2007.xml /temp/splits
|
228
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_splitter.rb garmin205 /devtools/workspace/RF_Gooby/data/raw/forerunner_205_2007.tcx /temp/splits
|
229
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_splitter.rb garmin305 /devtools/workspace/RF_Gooby/data/raw/forerunner_305_2007.tcx /temp/splits
|
230
|
-
|
231
|
-
ls -al /temp/splits
|
232
|
-
|
233
|
-
ruby:
|
234
|
-
|
235
|
-
require 'rubygems'
|
236
|
-
require 'gooby'
|
237
|
-
include REXML
|
99
|
+
Part 2 - within the realm of Gooby:
|
100
|
+
e. Depending on your GPS device and desktop software, you'll use the following commands
|
101
|
+
to parse a data file into the "gooby standard csv format":
|
102
|
+
- rake gooby:extract_activities_from_tcx # Garmin 305 & Garmin Training Center
|
103
|
+
- rake gooby:parse_activity_xml_to_csv # Garmin 305 & Garmin Training Center
|
104
|
+
- rake gooby:parse_track_log_to_csv # Garmin eTrex Venture & MacGpsPro
|
105
|
+
- rake gooby:parse_gpx_to_csv # MotionX app on iPhone
|
238
106
|
|
239
|
-
|
107
|
+
Note that files in "gooby standard csv format" can be used to generate either
|
108
|
+
Google Maps or Google Earth Maps... there is no need to recreate the csv file
|
109
|
+
depending on what type of map you wish to create.
|
240
110
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
-----------------------------------------
|
248
|
-
shell:
|
111
|
+
f. Manually create and edit a yaml configuration file in the /config directory for the
|
112
|
+
specific map you want to generate. For example: config/big_sur_marathon.yaml
|
113
|
+
Specify its input csv file, and any other appropriate yaml parameter values.
|
114
|
+
This design approach was taken so that you can create a configuration file for
|
115
|
+
each map, then essentially not have to modify that file again to regenerate the map.
|
116
|
+
Be sure to set the value of 'gmap_key' to your own Google Maps key.
|
249
117
|
|
250
|
-
|
118
|
+
g. Run command 'rake gooby:generate_google_map' to generate a Google Map html file.
|
119
|
+
View the file in your browser, and optionally deploy it to your web site.
|
251
120
|
|
252
|
-
|
121
|
+
h. Run command 'rake gooby:generate_google_earth_map' to generate a Google Earth kml file.
|
122
|
+
View the file in your Google Earth software.
|
253
123
|
|
254
|
-
|
124
|
+
i. Example commands, see file samples.sh
|
255
125
|
|
256
|
-
|
257
|
-
require 'gooby'
|
258
|
-
include REXML
|
126
|
+
rake
|
259
127
|
|
260
|
-
|
128
|
+
rake gooby:extract_activities_from_tcx
|
261
129
|
|
262
|
-
|
263
|
-
gooby.parse_garmin_xml_file(ARGV)
|
130
|
+
rake gooby:parse_activity_xml_to_csv config_file=config/big_sur_marathon.yaml
|
264
131
|
|
132
|
+
rake gooby:parse_track_log_to_csv config_file=config/crowders_mtn_hike.yaml
|
265
133
|
|
266
|
-
|
267
|
-
--------------------------------
|
268
|
-
shell:
|
134
|
+
rake gooby:parse_gpx_to_csv config_file=config/ballantyne.yaml
|
269
135
|
|
270
|
-
|
136
|
+
rake gooby:generate_google_map config_file=config/big_sur_marathon.yaml
|
137
|
+
rake gooby:generate_google_map config_file=config/crowders_mtn_hike.yaml
|
138
|
+
rake gooby:generate_google_map config_file=config/ballantyne.yaml
|
271
139
|
|
272
|
-
|
140
|
+
rake gooby:generate_google_earth_map config_file=config/big_sur_marathon.yaml
|
141
|
+
rake gooby:generate_google_earth_map config_file=config/crowders_mtn_hike.yaml
|
142
|
+
rake gooby:generate_google_earth_map config_file=config/ballantyne.yaml
|
273
143
|
|
274
|
-
require 'rubygems'
|
275
|
-
require 'gooby'
|
276
|
-
include REXML
|
277
144
|
|
278
|
-
|
279
|
-
|
280
|
-
full_files = false
|
281
|
-
|
282
|
-
list = Array.new
|
283
|
-
list << '/devtools/workspace/RF_Gooby/data/hrm1.csv'
|
284
|
-
list << '/devtools/workspace/RF_Gooby/data/20050305_corporate_cup_hm.csv'
|
285
|
-
list << '/devtools/workspace/RF_Gooby/data/20050430_nashville_marathon_km.csv'
|
286
|
-
list << '/devtools/workspace/RF_Gooby/data/20060115_phoenix_marathon.csv'
|
287
|
-
list << '/devtools/workspace/RF_Gooby/data/20070101_davidson_11m.csv'
|
288
|
-
list << '/devtools/workspace/RF_Gooby/data/20070505_davidson_5k_km.csv'
|
289
|
-
|
290
|
-
list << '/devtools/workspace/RF_Gooby/data/2007_g201.csv' if full_files
|
291
|
-
list << '/devtools/workspace/RF_Gooby/data/2007_g205.csv' if full_files
|
292
|
-
list << '/devtools/workspace/RF_Gooby/data/2007_g305.csv' if full_files
|
293
|
-
|
294
|
-
gooby = Gooby::GoobyCommand.new(config_filename)
|
295
|
-
@csv_points = gooby.read_csv_files(list)
|
296
|
-
@csv_col_names = gooby.csv_col_names
|
297
|
-
|
298
|
-
puts "#{@csv_points.size} points read from csv file(s)."
|
299
|
-
puts "#{@csv_col_names.size} fields per line."
|
300
|
-
|
301
|
-
index = 0
|
302
|
-
@csv_col_names.each {|col_name|
|
303
|
-
puts sprintf("-- %s %2s [%s]", col_name.ljust(16), index, @csv_points[-1].tokens[index])
|
304
|
-
index = index + 1
|
305
|
-
}
|
306
|
-
|
307
|
-
@csv_points.each {|csv_point|
|
308
|
-
puts csv_point.rawdata if csv_point.token_count != 15
|
309
|
-
}
|
310
|
-
|
311
|
-
|
312
|
-
Function 6 - "been_there":
|
313
|
-
--------------------------
|
314
|
-
shell:
|
315
|
-
|
316
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_been_there.rb > /devtools/workspace/RF_Gooby/samples/been_there.txt
|
317
|
-
|
318
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_been_there.rb
|
319
|
-
|
320
|
-
ruby:
|
321
|
-
|
322
|
-
require 'rubygems'
|
323
|
-
require 'gooby'
|
324
|
-
include REXML
|
325
|
-
|
326
|
-
config_filename = '/devtools/workspace/RF_Gooby/config/gooby_config.yaml'
|
327
|
-
|
328
|
-
gooby = Gooby::GoobyCommand.new(config_filename)
|
145
|
+
== Online Resources
|
329
146
|
|
330
|
-
|
331
|
-
list = Array.new
|
332
|
-
list << '/devtools/workspace/RF_Gooby/data/20070101_davidson_11m.csv'
|
333
|
-
list << '/devtools/workspace/RF_Gooby/data/hrm1.csv'
|
334
|
-
gooby.read_csv_files(list)
|
147
|
+
* Gooby may be downloaded from http://rubyforge.org/projects/gooby/.
|
335
148
|
|
336
|
-
|
337
|
-
# 'degrees difference'. Degrees difference is defined as the absolute value of lat1 - lat2,
|
338
|
-
# plus the absolute value of lng1 - lng2. Your courses and points of interest (poi) are defined
|
339
|
-
# in the yaml file.
|
149
|
+
* Gooby project site is http://www.joakim-systems.com/gooby
|
340
150
|
|
341
|
-
|
342
|
-
gooby.been_there('2', 0.0025)
|
343
|
-
gooby.been_there('999', 0.0005)
|
151
|
+
* Sample maps are available at: http://www.joakim-systems.com/maps
|
344
152
|
|
153
|
+
* Gooby cucumber tests are available at: http://www.joakim-systems.com/cuke
|
345
154
|
|
346
|
-
Function 7 - Google Map Generation:
|
347
|
-
-----------------------------------
|
348
|
-
shell:
|
349
|
-
|
350
|
-
ruby /devtools/workspace/RF_Gooby/bin/gooby_gen_gmap.rb /devtools/workspace/RF_Gooby/data/20060115_phoenix_marathon.csv > /devtools/workspace/RF_Gooby/samples/20060115_phoenix_marathon.html
|
351
155
|
|
352
|
-
|
156
|
+
== This Release - version 2.0.0
|
353
157
|
|
354
|
-
|
158
|
+
* The gooby 2.0.0 codebase is essentially a complete rewrite, featuring:
|
355
159
|
|
356
|
-
|
357
|
-
require 'gooby'
|
358
|
-
include REXML
|
160
|
+
- 'libxml' is now used for xml parsing instead of 'rexml'.
|
359
161
|
|
360
|
-
|
162
|
+
- csv creation and reading with 'fastercsv'.
|
361
163
|
|
362
|
-
|
363
|
-
gooby.generate_google_map(ARGV)
|
364
|
-
|
164
|
+
- use of cucumber and rspec rather than test/unit for automated testing.
|
365
165
|
|
366
|
-
|
166
|
+
* Simplified functionality:
|
367
167
|
|
168
|
+
- Device focus - parses data from your Garmin 205/305 and Garmin eTrex devices
|
169
|
+
via your desktop software such as Garmin Training Center and/or MacGpsPro.
|
368
170
|
|
369
|
-
|
370
|
-
|
371
|
-
shell:
|
171
|
+
A late addition to this release was gpx xml file support, such as from the
|
172
|
+
iPhone "MotionX GPS" application.
|
372
173
|
|
373
|
-
|
174
|
+
- Data focus - the specific Garmin device data is formatted into a common csv format.
|
175
|
+
You may optionally import the csv files created by gooby into your database of choice.
|
176
|
+
Gooby itself, however, does not require the use of a database.
|
374
177
|
|
375
|
-
|
178
|
+
- Google Map html generation, from common csv input.
|
376
179
|
|
377
|
-
|
378
|
-
require 'gooby'
|
379
|
-
include REXML
|
180
|
+
- Google Earth kml generation, from common csv input.
|
380
181
|
|
381
|
-
|
182
|
+
- The 'GOOBY_HOME' environment variable is required; a user-defined value.
|
183
|
+
Rails-like "sensible default" directory structure within your 'GOOBY_HOME' directory.
|
382
184
|
|
383
|
-
|
185
|
+
- Configuration yaml files are now a "base plus map-specific" design. A core yaml file
|
186
|
+
defines most configuration parameters; while map-specific configuration yaml files
|
187
|
+
enable you to override the base values for each particular map you create.
|
188
|
+
This results in less need to constantly modify the configuration values for each map
|
189
|
+
you want to generate.
|
384
190
|
|
385
|
-
|
386
|
-
list = Array.new
|
387
|
-
list << '/devtools/workspace/RF_Gooby/data/hrm1.csv'
|
388
|
-
list << '/devtools/workspace/RF_Gooby/data/20050305_corporate_cup_hm.csv'
|
389
|
-
list << '/devtools/workspace/RF_Gooby/data/20050430_nashville_marathon_km.csv'
|
390
|
-
list << '/devtools/workspace/RF_Gooby/data/20060115_phoenix_marathon.csv'
|
391
|
-
list << '/devtools/workspace/RF_Gooby/data/20070101_davidson_11m.csv'
|
392
|
-
list << '/devtools/workspace/RF_Gooby/data/20070505_davidson_5k_km.csv'
|
393
|
-
gooby.read_csv_files(list)
|
191
|
+
- Focus is on the English system of units, rather than the metric system.
|
394
192
|
|
395
|
-
# optional first arg is the date of the run, otherwise the all dates.
|
396
|
-
gooby.first_trackpoints_as_poi(ARGV[0])
|
397
193
|
|
194
|
+
== Road Map / TODO List
|
398
195
|
|
399
|
-
|
400
|
-
|
401
|
-
shell:
|
402
|
-
|
403
|
-
/usr/local/mysql/bin/mysql < /devtools/workspace/RF_Gooby/sql/gooby.ddl -u <your_db_id> -p
|
196
|
+
* No specific plans currently. Future functionality is dependent on my future mapping
|
197
|
+
needs, Google API evolution, and user feedback. Interesting ideas are appreciated.
|
404
198
|
|
405
199
|
|
406
|
-
|
407
|
-
-------------------------------------------------------------------------
|
408
|
-
shell:
|
200
|
+
== Support
|
409
201
|
|
410
|
-
|
202
|
+
* Please see the Tracker page at http://rubyforge.org/projects/gooby/ to submit a request
|
203
|
+
or to report a bug.
|
411
204
|
|
412
|
-
|
205
|
+
|
413
206
|
== Warranty
|
414
207
|
|
415
|
-
This software is provided "as is" and without any express or implied warranties,
|
416
|
-
|
417
|
-
fitness for a particular purpose.
|
208
|
+
This software is provided "as is" and without any express or implied warranties, including,
|
209
|
+
without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
|
418
210
|
|