Customize Your GPS Altitude Chart: Smoothing, Units, and AnnotationsAccurate and readable altitude charts turn a raw GPS track into a useful narrative of your route: where you climbed, where you descended, how steep a section was, and where to expect views or difficult terrain. This article covers practical ways to customize your GPS altitude chart so it communicates clearly and fits your needs — whether for hiking trip reports, cycling power analysis, or mapping for a guidebook. Topics covered: choosing units, smoothing noisy elevation data, labeling and annotations, axis scaling, color and style choices, exporting and sharing, and tips for specific tools.
Why customize an altitude chart?
A default elevation plot often looks noisy, uses inconvenient units, or buries important features. Customization helps you:
- Emphasize meaningful terrain features (passes, summits, cols).
- Reduce GPS noise so climbs and descents read sensibly.
- Match units to your audience (meters vs. feet).
- Annotate points of interest (water sources, rest stops).
- Create publication-quality graphics for articles, maps, and social media.
Choosing the right vertical units
Pick units to match audience expectations and accuracy:
- Meters are standard internationally and on most topographic maps. Use when your audience is global or you’re comparing to contour lines.
- Feet are common in the U.S. and for audiences familiar with imperial units.
- For large elevation changes, use full units (e.g., 1,200 m or 4,000 ft). For small local differences, consider showing decimals (e.g., 12.3 m) only if sensor accuracy justifies it.
Practical tips:
- Provide both units in a tooltip or secondary axis when your audience spans measurement systems.
- Round displayed labels to sensible increments (e.g., 50 m or 100 ft) to avoid clutter.
- If converting programmatically: 1 m = 3.28084 ft.
Handling noisy GPS elevation data: smoothing techniques
GPS vertical accuracy is worse than horizontal; raw altitude often shows spurious spikes. Smoothing improves readability while preserving real features.
Common smoothing methods:
- Moving average (rolling mean): simple and effective for light noise. Choose window size based on sampling frequency (e.g., 5–30 samples).
- Median filter: removes isolated spikes while preserving edges better than mean.
- Savitzky–Golay filter: fits local polynomials — smooths while preserving peaks and slopes, good for performance analysis.
- Low-pass Butterworth filter: a frequency-domain smoother for advanced users.
- Track matching to DEM: replace GPS elevations with values sampled from a Digital Elevation Model (DEM) when GPS alt is unreliable. Best when accurate DEM is available and sampling alignment is good.
Choosing smoothing parameters:
- For hikes and rides sampled every 1–5 seconds, a window of 10–30 samples often balances noise reduction and resolution.
- For longer-duration activities with sparse points (1 point every few seconds/minutes), prefer smaller windows or DEM-matching to avoid flattening real features.
- Validate: compare smoothed elevation difference against known waypoints (summit elevations) to avoid over-smoothing.
Example (conceptual):
- Raw track shows jagged 5–10 m spikes. Apply a Savitzky–Golay with window = 21 and polyorder = 3 to remove spikes but keep steep pitch changes.
Axis scaling and layout for clarity
Vertical exaggeration:
- Raw vertical scale may hide elevation changes if your route is long and relatively flat. Applying vertical exaggeration (e.g., scale vertical axis by 2–5× relative to horizontal distance) makes slopes visible.
- Indicate any vertical exaggeration explicitly in captions or axis labels.
Axis ranges:
- Use dynamic min/max that add a small margin (5–10%) so lines don’t touch plot borders.
- For multi-track comparisons, align axes across charts so slopes and elevations are directly comparable.
Gridlines and tick marks:
- Use light gridlines and round tick spacing (e.g., every 100 m / 500 ft).
- If showing both units, use slightly different tick styles or a secondary axis.
Distance vs. time x-axis:
- Distance is most common for route elevation charts because it directly relates to where on the trail features occur.
- Time-based x-axis is useful for pace/power analysis; consider adding a secondary distance axis or tick labels.
Annotations: labels, markers, and overlays
Well-placed annotations turn a chart into a story.
Essential annotations:
- Summits, passes, and trail junctions with elevation labels.
- Major distance markers (every 5 km / 2 mi).
- Start/finish points, aid stations, water sources.
- Steep sections: highlight segments exceeding a slope threshold (e.g., >10% or >8°).
How to place labels:
- Avoid overlap: offset labels vertically and use leader lines when needed.
- Use concise text: “Summit — 1,742 m” rather than long descriptions.
- Use icons or small markers for repeated types (water drop for water, tent for campsite).
Slope shading and segments:
- Color-code gradient ranges (e.g., green <=5%, yellow 5–10%, red >10%) along the profile to show difficulty.
- Alternatively, plot a secondary bar or heat map under the elevation line to indicate gradient magnitude.
Integrating photos and waypoints:
- Embed thumbnails along the chart (or link via hover tooltips) at waypoint distances.
- For print, list photo filenames next to markers with small numbers that correspond to captions.
Styling: colors, line styles, and readability
Design choices affect how quickly readers parse the chart.
Color and contrast:
- Use high-contrast line color against background. Dark blue or black lines on light backgrounds are classic.
- Reserve bright colors for highlights (steep segments, key points).
- Ensure colors are colorblind-friendly (avoid red/green pairs).
Line styles and thickness:
- Use a moderately thick line for the main elevation (1.5–3 px) so it prints well.
- Use dashed or thinner lines for secondary tracks or smoothed vs. raw comparisons.
Legend and captions:
- Include a concise legend explaining any color-coding, smoothing applied, and units.
- Caption should note data source (GPS device model or DEM), smoothing method, and vertical exaggeration if used.
Tools and workflows
Quick tool choices depending on skill level:
-
Beginner / GUI:
- Garmin Connect, Strava, Komoot: quick auto-generated profiles with basic smoothing and annotations.
- QGIS (with plugins): GUI for DEM matching and higher control.
-
Intermediate / scripting:
- Python (pandas, numpy, scipy, matplotlib, savgol_filter from scipy.signal) for custom smoothing, annotations, and exporting SVG/PNG.
- R (ggplot2) for publication-quality plots and faceted comparisons.
-
Advanced:
- DEM-based re-profiling (using SRTM, ASTER, or higher-res LIDAR), terrain correction, and frequency-domain filtering (Butterworth).
- GIS workflows for cross-referencing contour lines and slope rasters.
Example Python snippet (conceptual, must be placed in code blocks when used):
from scipy.signal import savgol_filter smoothed = savgol_filter(elevations, window_length=21, polyorder=3)
Exporting, sharing, and publication
Export formats:
- For web: PNG or SVG. SVG preserves vector quality and allows later editing.
- For print: high-resolution PNG or PDF (300+ dpi).
- For interactive sharing: GeoJSON + small HTML/CSS/JS bundle or use platform export features.
Metadata and reproducibility:
- Include metadata: sampling rate, device model, smoothing parameters, DEM source, and author/date.
- For reproducible workflows, publish scripts or notebook (Jupyter/Observable) alongside charts.
Practical examples and templates
Use these short templates for common tasks:
-
Hike trip report:
- Units: meters (with feet in tooltip).
- Smoothing: Savitzky–Golay window 31, polyorder 2.
- Annotations: summit, water, campsite.
- Export: SVG + 300 dpi PNG.
-
Cycling training:
- Units: meters or feet per audience.
- Smoothing: light moving average (window 10) to preserve short climbs.
- Overlays: power/heart-rate as secondary plot, gradient color bands.
- Export: interactive HTML for analysis.
Troubleshooting common problems
- Over-smoothed profile that hides real features: reduce window size or use Savitzky–Golay instead of large moving average.
- Spikes remain: apply median filter first, then smooth.
- GPS altitude offsets (systematically high/low): match to DEM or correct by anchoring known waypoints (e.g., summit elevation).
- Mismatched distance axis between track and DEM: ensure coordinate projections match and resample consistently.
Summary checklist
- Choose appropriate units and label them clearly.
- Apply smoothing tuned to your sampling rate and feature scale.
- Use axis scaling and vertical exaggeration thoughtfully, and disclose it.
- Annotate summits, passes, aid stations, and steep segments.
- Use color and line styles for clarity and accessibility.
- Include metadata and export formats suited to your audience.
This workflow turns raw GPS elevation data into clear, informative altitude charts that tell the story of a route and support decision-making, training analysis, or publication.
Leave a Reply