-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
cumulativeElevationGain and cumulativeElevationLoss not correct when missing parts of track with gps problem? #59
Comments
Hello @bloodangel78, |
Hello, no problem. I have checked with a good gpx file with no cut or gps problem in it, and ill is perfect. Well done for the speed, it is nice info to have too ;) |
Hello @Sibyx and thank you for your work :) Do you plan to publish the fix in the next release ? |
Hello @syl20b, I am sorry to disappoint you I was kind of struggling last time trying to resolve this issue (the numbers I get in the feature branch feature/real-distance didn't make any sense). I will gladly make a release if you offered a PR. I will try to resolve the issue after June (I am finishing my master thesis so I have different priorities right now). |
Hi @here, Having some test with a gpx track and here are my results for cumulativeElevationGain:
With DEM (DTM1) elevation rewrited gpx
In my point of view I will test some median smoothing algorithm to qualify quality of results
|
First of all, @syl20b, part of the issue discussed about real distance has been resolved in 1.2.0. @nono303, please feel free to implement this. We already have some analytics implemented, so I don't think it's out of scope. I have a different solution that won't introduce breaking changes. However, I'm not sure how it will behave on PHP 8.1+, so please correct me if I'm wrong. My proposal is to keep I know this may not be the ideal solution, but I want to avoid introducing breaking changes. We can address it in the next major release. I'll try to implement it soon. Feel free to assist @nono303 if you have time. |
@nono303 It will be nice to take a look on |
Hi @Sibyx,
Waiting for your feedback! |
Hello @nono303, thank you for your response. I've further organized my thoughts below, sorted by category. Your feedback is very much appreciated. GPX smoothingThe gpx_reduce function seems quite effective. I believe it should not pose much difficulty to incorporate this behavior into a library. Indeed, I consider it a beneficial feature that should be revisited in 2.x. Kindly review my proposed implementation approach. The additional computational processes for statistical analysis can be managed through middleware that implement the library interface. These middleware will execute in a specified sequence, post GPX parsing, following the basic statistical computations (or the library may include some middleware for elementary stats by default). To better understand my concept, consider the code below. It is merely a rough draft, hence open to modifications. $phpgpx = new \phpGPX();
$phpgpx->middlewares->add(new \phpGPX\Middlewares\GpxReductionSmoothingMiddleware(2, 5));
$phpgpx->middlewares->add(new \phpGPX\Middlewares\TrackPointExtensionStatsMiddleware());
$phpgpx->middlewares->add(new CustomMiddleware());
$file = $phpgpx->load('example.gpx'); Implementing such a layer should substantially simplify the extension or modification of the library's behavior. I aim to develop a preliminary model for this layer. This should enhance the library's configurability (I'm not particularly fond of the current use of constants for this purpose). I would love to hear your thoughts on this proposal. There is already an opened discussion about the elevation smoothing. Check it out for some other thougts #55. phpgistoolboxI would be more than willing to examine and contribute some pull requests. I can even establish a CI/CD pipeline and set up tests as requested. Initially, I would like to ask you to update your README with a detailed description of the public API, as well as examples of its usage. Subsequently, I'd be delighted to assist you with the implementation and code organization. If you want to check my other thoughts on the |
Hi @Sibyx, |
Hello,
Very nice work for the code you do.
I just want to report you a problem I see.
Here my gpx point, like you can see, it seems like there is missing points somewhere.
All data seems pretty ok with your code, except the "cumulativeElevationGain" and "cumulativeElevationLoss".
You code give me in the "stats" result of the "track":
+distance: 17597.984230898
+averageSpeed: 0.87508623724007
+averagePace: 1142.7445175619
+minAltitude: 1060.03
+maxAltitude: 1931.62
+cumulativeElevationGain: 1577.43
+cumulativeElevationLoss: 1604.36
+startedAt: DateTime @1604220199 {#4201 ▶}
+finishedAt: DateTime @1604240309 {#11583 ▶}
+duration: 20110
With classic call:
$gpx = new phpGPX();
$fileData = $gpx::load($filePath);
But good data for elevation gain must be: 932m (on alltrails.com) or 958m (on wikiloc.com)
You can see it here => https://www.alltrails.com/fr/explore/recording/grand-paradis-to-col-de-coux-circular-019fa4f
I have same result ok like "alltrails" when uploading my gpx point here on an other website => https://fr.wikiloc.com
ps: I think they can detect mis
gpx_file.zip
sing parts but do not know where :D
The text was updated successfully, but these errors were encountered: