jachetto / alp2gpx

AlpineQuest to GPX Converter
GNU General Public License v3.0
4 stars 2 forks source link

Differences betwween GPX files created by alp2gpx and GPX files exported by AlpineQuest #2

Open ydespond opened 3 years ago

ydespond commented 3 years ago

Hello,

I am trying to use your script to replace GPX export inside AlpineQuest. I am surpised that the result is not the same for elevation and timestamp:

Are you aware of theese differencies ?

Best regards, Y. Despond

ydespond commented 3 years ago

Hello, I asked AQ and I got the following explanations:


Hi, For the GPX format, AQ does export elevations in the EGM96 model (elevation above sea level, same values as displayed within the application) and timestamps in UTC as specified by this format.

alp2gpx may export elevations in the WGS84 model because they're stored like this in the TRK format (but I'm not the author and haven't checked). Concerning the timestamps I don't know but they must be in UTC for GPX.


For the elevation, the difference should be corrected by the conversion from WGS84 to EGM96. I tried some online converter and it is ok. The problem is now to find a program to make the conversion...

For the timestamp, I think that replacing the line: d = datetime.fromtimestamp(int(p['ts'])) by d = datetime.utcfromtimestamp(int(p['ts'])) will make the correction.

What do you think ?

Best regatds, Y. Despond

jachetto commented 3 years ago

Hi despond, sorry for the delay, and tnx for your suggestion. I'm going to introduce this tweak asap. Or if you want feel free to fork and PR.

Tnx again!

ydespond commented 3 years ago

Thank you for the answer.

I am not very skilled in Python, I prefer if you make the modifications.

I think that the most difficult part is to make the conversion from WGS84 to EGM96...

I searched code to do that and the most promising I found is : https://github.com/vandry/geoidheight

Other possibilities are perhaps: https://geographiclib.sourceforge.io/1.50/python/ https://earth-info.nga.mil/GandG/update/index.php?dir=wgs84&action=wgs84#tab_egm96-data-apps https://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html

I searched for a Web service which makes the conversion, but without success.

Let me know if I can help.

Best regards,

Yves

Le mar. 23 févr. 2021 à 15:57, jaco notifications@github.com a écrit :

Hi despond, sorry for the delay, and tnx for your suggestion. I'm going to introduce this tweak asap. Or if you want feel free to fork and PR.

Tnx again!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jachetto/alp2gpx/issues/2#issuecomment-784260442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS525VT7ZCMMTLF44ZBW6QDTAO64NANCNFSM4X7BCVGA .

jachetto commented 3 years ago

tnx for your suggestion, i'm going to work on this