GPS User Stories

1. As a user, I want to be able to load up to 10 GPS data files as acquired by a GPS device into the application.

Acceptance criteria:

bullet
The application shall be able to import files containing GPS track data as represented in GPX format only, where latitude and longitude are expressed in DEGREES, elevation is expressed in METERS and time is in UTF format. Each file contains a single track (route, or path), but each track may consist of an arbitrary number of track segments (including 0). GPS data files may end with either .gpx or .txt extensions.
bullet
The system shall display an acknowledgment upon successful load, indicating the NAME of the track loaded and the number of points loaded.
bullet
The name of the track must be extracted from the <name> element within the GPX file; it is not the filename.
bullet
Files not containing GPX format data, including binary files, text files, corrupted GPX files, or other GPS formats (such as KML, TCX etc) are not to be supported, and must cause the system to generate an error message to the user indicating an unsupported file format.
bullet
The following conditions in GPX files shall be considered as errors, and cause the system to display a detailed error message (including line and column number where the error was encountered):
  1. Any required XML element is missing (gpstest-missing elevation.txt, gpstest-missing latitude.txt, gpstest-missing longitude.txt, gpstest-missing time.txt)
  2. A point's latitude is not between -­90 and +90 degrees (inclusive), or cannot be interpreted as a numeric value. (gps-bad latitude.txt)
  3. A point's longitude is not between ­-180 and +180 degrees (inclusive), or cannot be interpreted as a numeric value. (gps-bad longitude.txt)
  4. The UTF time at which a point is acquired is specified by a <time> element - for example: 2016-09-02T12:57:53Z. The general format is “YYYY-­MM-­DDTHH:MM:SS[.XXX]Z”, where YYYY is the year, MM is the month, DD is the day, HH is the hour, MM is the minute, SS is the second, and XXX are thousands of a second. T, Z, :, and . appear as themselves. Thousands are an optional field, as indicated above with the [ ] brackets. Note: This is a standard time format supported in many programming languages, including Java (SimpleDateFormat).  (gps-bad times.txt)
  5. A point's elevation cannot be interpreted as a numeric value.

2. As a user, I want to display certain metrics for each loaded track.

Acceptance criteria:

bullet
If multiple tracks are loaded, the user shall be able to select which track whose metrics are to be displayed.
bullet
The metrics shall be displayed in the main screen.
bullet
The metrics shall include:
  1. the name of the track, obtained from the <name> element of the GPX file; it is not the filename.
  2. the minimum and maximum latitude in units of degrees, to 2 decimal places of precision.
  3. the minimum and maximum longitude in units of degrees, to 2 decimal places of precision.
  4. the minimum and maximum elevation in units of both meters and feet, to 2 decimal places of precision.
  5. the total distance traveled in a track. The total track distance (in units of both kilometers and miles) is to be displayed to 2 decimal places of precision, computed by summing distances between individual GPS points, and accounting for elevation changes. Note: It is not necessary to account for the curvature of the earth - since distances between successive coordinates acquired by a GPS device are relatively small, you can assume a straight line between any two coordinates, rather than an arc. See this page that contains the relevant formulas.
  6. the average speed (in both kilometers/hr and miles/hr) over the entire track, to 2 decimal places of precision.
  7. the maximum speed (in both kilometers/hr and miles/hr) that occurred during the entire track, to 2 decimal places of precision.
bullet
If a track contains less than two points, a message indicating that distance and speed cannot be computed shall be displayed instead of actual distance and speed values. (gpsTest1.txt)

3. As a user, I want to be able to graphically view up to 10 tracks as a 2D plot.

Acceptance criteria:

bullet
If multiple tracks are loaded, the user shall be able to select the tracks whose plots are to be displayed.
bullet
A track is displayed as a two­dimensional cartesian plot, with the first point in the first track at the origin (0,0) of the plot. (Other tracks will likely have different origin point). Positive Y-axis corresponds to North; positive X-axis corresponds to East.
bullet
The points in the GPX file representing latitude and longitude must be converted and displayed in Cartesian units, rather than in polar units of degrees. (Note that this involves a transformation from polar to Cartesian coordinates).
bullet
The transformation from latitude coordinates to Cartesian coordinates must map positive changes in latitude to positive changes along the Cartesian Y axis (latitude increases in a Northerly direction).
bullet
The transformation from longitude coordinates to Cartesian coordinates must map positive changes in longitude to positive changes along the Cartesian X axis (longitude increases in a Easterly direction).
bullet
Each track is to be displayed with a distinct color
bullet
The plot shall include a table showing track names in their appropriate colors. Each track's distance (in kilometers and miles) is to be displayed in this table.
bullet
The target device for this application is a desktop or laptop computer. The display window must allow resizing according to the user's normal interactions with windows. The plot shall scale the tracks uniformly so that all tracks can be displayed simultaneously, regardless of window size.
bullet
Tracks can be plotted in any order and may obscure each other (thus, one track may overlap another either partially or wholly, and only the overlapping track color may be seen).
bullet
A track containing less than two points can be displayed, but may require special handling for scaling computations.

4. As a user, I want to be able to be able to view a Google Maps view of a track, with the track superimposed over the Map.

Acceptance criteria:

bullet
The user must be able to select either Google Maps satellite or map view.
bullet
The track must appear superimposed on the Google Map view.
bullet
Each track is to be displayed with a distinct color if possible.
bullet
It must be possible to use the usual Google Map controls (e.g. zoom, pan)

5. As a user, I want to be able to graphically view a plot of **elevation** as a function of **time**.

Acceptance criteria:

bullet
The plot must display elevation in units of meters along the Y axis, with time in units of minutes along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
The plot is to include a label (for each track) that indicates the total elevation gain, computed by summing all increases (but not decreases) in elevation between subsequent points.

6. As a user, I want to be able to graphically view a plot of **elevation gain** as a function of **time**.

Note: A plot of Elevation Gain always increases monotonically - it never decreases. Elevation Gain is defined as the running sum of elevation increases while ignoring elevation decreases. For example, if a GPS track includes 3 hills, only the increases in elevation associated with climbing the hills is counted - so with each hill climb, the Elevation Gain plot increases. This is true even if the GPS Track constitutes a closed-loop path where the starting and ending points are the same.

Acceptance criteria:

bullet
The plot must display elevation gain in units of meters along the Y axis, with time in units of minutes along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

7. As a user, I want to be able to graphically view a plot of **calories expended** as a function of **time**.

Note: The value for calories expended varies linearly with both speed and elevation gain. A 15KPH pace for 1 hour expends approximately 1000 calories. Additionally, each meter of elevation gained expends approximately 2 calories.

Acceptance criteria:

bullet
The plot must display calories expended in units of calories along the Y axis, with time in units of minutes along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

8. As a user, I want to be able to graphically view a plot of **elevation** as a function of **distance**.

Acceptance criteria:

bullet
The plot must display elevation in units of meters along the Y axis, with distance in units of kilometers and miles along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
The plot is to include a label (for each track) that indicates the total elevation gain, computed by summing all increases (but not decreases) in elevation between subsequent points.

9. As a user, I want to be able to graphically view a plot of **elevation gain** as a function of **distance**.

Note: A plot of Elevation Gain always increases monotonically - it never decreases. Elevation Gain is defined as the running sum of elevation increases while ignoring elevation decreases. For example, if a GPS track includes 3 hills, only the increases in elevation associated with climbing the hills is counted - so with each hill climb, the Elevation Gain plot increases. This is true even if the GPS Track constitutes a closed-loop path where the starting and ending points are the same.

Acceptance criteria:

bullet
The plot must display elevation gain in units of meters along the Y axis, with time in units of kilometers and miles along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

 10. As a user, I want to be able to graphically view a plot of **calories expended** as a function of **distance**.

Note: The value for calories expended varies linearly with both speed and elevation gain. A 15KPH pace for 1 hour expends approximately 1000 calories. Additionally, each meter of elevation gained expends approximately 2 calories.

Acceptance criteria:

bullet
The plot must display calories expended in units of calories along the Y axis, with distance  in units of kilometers and miles along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

11. As a user, I want to be able to view a plot of **speed** vs **time**.

Acceptance criteria:

bullet
The plot must display speed in units of kilometers/hr along the Y axis, with time in units of minutes along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

12. As a user, I want to be able to view a plot of **speed** vs **distance**.

Acceptance criteria:

bullet
The plot must display speed in units of kilometers/hr along the Y axis, with distance in units of kilometers and miles along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

13. As a user, I want to be able to view a plot of **distance** vs **time**.

Acceptance criteria:

bullet
The plot must display distance in units of kilometers and miles along the Y axis, with time in units of minutes along the X axis.
bullet
If multiple tracks are loaded, the user shall be able to select which tracks are plotted.
bullet
Each track is to be displayed with a distinct color
bullet
The plot is to be automatically centered and scaled with meaningful labels on each axis.
bullet
If a track contains less than two points, no plot can be generated; a message should be displayed in place of an actual plot indicating this.

14. As a user, I want to be able to graphically view up to 10 tracks as a 2D plot with colors indicating the grade of the path.

Acceptance criteria:

bullet
Same as for User Story 3, with the following modifications:
bullet
Rather than displaying each track with a distinct color, each track is to use colors to indicate grade. Dark blue for grade less than -5%, light blue for grades between -5% and -1%, green for grades between -1% and 1%, yellow for grades between 1% and 3%, orange for grades between 3% and 5%, red for grades greater than 5%.
bullet
The plot shall include a table showing grades in their appropriate colors.

15. As a user, I want to display a table summarizing the time spent at various grades of the path.

Acceptance criteria:

bullet
If multiple tracks are loaded, the user shall be able to select which track whose grade metrics are to be displayed.
bullet
The grade metrics shall be displayed in the main screen.
bullet
The grade metrics shall include:
  1. the name of the track, obtained from the <name> element of the GPX file
bullet
If a track contains less than two points, a message indicating that grades cannot be computed shall be displayed.
bullet
The display shall indicate the elapsed time in minutes and percent of total time for grade less than -5%, for grades between -5% and -1%, for grades between -1% and 1%, for grades between 1% and 3%, for grades between 3% and 5%, and for grades greater than 5%.

16. As a user, I want to display a table summarizing the distance traveled at various grades of the path.

Acceptance criteria:

bullet
If multiple tracks are loaded, the user shall be able to select which track whose distance/grade metrics are to be displayed.
bullet
The grade metrics shall be displayed in the main screen.
bullet
The grade metrics shall include:
  1. the name of the track, obtained from the <name> element of the GPX file
bullet
If a track contains less than two points, a message indicating that distances cannot be computed shall be displayed.
bullet
The display shall indicate the distance traveled for grade less than -5%, for grades between -5% and -1%, for grades between -1% and 1%, for grades between 1% and 3%, for grades between 3% and 5%, and for grades greater than 5%.

17. As a user, I want to be able to graphically view up to 10 tracks as a 2D plot with colors indicating the instantaneous speed along the path.

Acceptance criteria:

bullet
Same as for User Story 3, with the following modifications:
bullet
Rather than displaying each track with a distinct color, each track is to use colors to indicate speed. Dark blue for speed less than 3mph, light blue for speeds between 3mph and 7mph, green for speeds between 7mph and 10mph, yellow for speeds between 10mph and 15mph, orange for speeds between 15mph and 20mph, red for speeds greater than 20mph.
bullet
The plot shall include a table showing speeds in their appropriate colors.

18. As a user, I want to be able to graphically view up to 10 tracks as a 2D plot with a specific color indicating the instantaneous speed exceeding some specified value.

Acceptance criteria:

bullet
Same as for User Story 3, with the following modification:
bullet
Each track is to use a specific color to indicate instantaneous speed above some value specified by the user.

19. As a user, I want to display a table summarizing the time spent at various speeds along the path.

Acceptance criteria:

bullet
If multiple tracks are loaded, the user shall be able to select which track whose speed metrics are to be displayed.
bullet
The speed metrics shall be displayed in the main screen.
bullet
The speed metrics shall include:
  1. the name of the track, obtained from the <name> element of the GPX file
bullet
If a track contains less than two points, a message indicating that speeds cannot be computed shall be displayed.
bullet
The display shall indicate the elapsed time in minutes and percent of total time for speed less than 3mph, for speeds between 3mph and 7mph, for speeds between 7mph and 10mph, for speeds between 10mph and 15mph, for speeds between 15mph and 20mph, and for speeds greater than 20mph.

20. As a user, I want to display a table summarizing the distance traveled at various speeds along the path.

Acceptance criteria:

bullet
If multiple tracks are loaded, the user shall be able to select which track whose distance/speed metrics are to be displayed.
bullet
The speed metrics shall be displayed in the main screen.
bullet
If a track contains less than two points, a message indicating that distance/speed metrics cannot be computed shall be displayed.
bullet
The display shall indicate the distance traveled for speed less than 3mph, for speeds between 3mph and 7mph, for speeds between 7mph and 10mph, for speeds between 10mph and 15mph, for speeds between 15mph and 20mph, and for speeds greater than 20mph.