Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/filter elevations #135

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

F/filter elevations #135

wants to merge 3 commits into from

Conversation

gri38
Copy link

@gri38 gri38 commented Dec 3, 2024

Summary of Changes

This PR would fix issue #130 , without any DEM stuff (taht can be done in another ENH issue)

I’ve implemented the GpxMetricsComputation class in web/src/lib/models/gpx/gpx-metrics-computation.ts.

This class accumulates points from a GPX track and computes the following metrics:

  • totalElevationGain
  • totalElevationLoss
  • totalElevationGainSmoothed
  • totalElevationLossSmoothed
  • totalDistance
  • totalDistanceSmoothed

In web/src/lib/models/gpx/gpx.ts, the getTotals() method now uses this class to "smooth" elevation gain and loss, aiming for better accuracy.

Implementation Details

I’ve chosen the following fixed thresholds:

  • X/Y threshold: 5m
  • Z threshold: 10m

These thresholds are currently not configurable, as they provide reasonably good results in most cases. However, depending on the track's characteristics we might need to adjust these thresholds in the future (e.g., a nearly flat track => lowering the Z threshold). Ho<ever, that's not easy, we would need a dataset with tracks and there known metrics.

Next Steps

Feel free to merge this PR or suggest alternative strategies for the computation or threshold configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant