jdrescher2006 / Laufhelden

Sport tracker for Sailfish OS
GNU General Public License v3.0
16 stars 17 forks source link

Laufhelden set all new workouts to year 2000 #164

Closed atlochowski closed 4 years ago

atlochowski commented 4 years ago

Laufhelden set all new workouts.to year 2000. Yesterday and today I made hiking. Both workouts are dated to may 2000. EDIT: Changed workout to running and again has year 2000, 22.05.2000

jdrescher2006 commented 4 years ago

That is a really strange bug. Do you still have this? I have no idea why this could happen. If a workout is saved the date/time is taken from the system.

atlochowski commented 4 years ago

Because of this bug i stoped to use Laufhelden. I just checked and track from now is saved as from 31.08.2000 13:31:05

jdrescher2006 commented 4 years ago

Is the date in system settings and other apps shown correctly? What phone are you using, is it a community port?

atlochowski commented 4 years ago

I have Jolla 1 and Jolla C. Date in every other apps is correct.

atlochowski commented 4 years ago

Because of this issue I switched Laufhelden to OSM Scout.

jdrescher2006 commented 4 years ago

Could you open a GPX file (saved with Laufhelden) with a text editor and check if the date is ok there?

atlochowski commented 4 years ago

It's not ok, i checked it. The date is the same as saved date.

jdrescher2006 commented 4 years ago

Is the filename of the GPX file also the wrong date?

atlochowski commented 4 years ago
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/Gp
xExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1
.xsd" version="1.1" Creator="Laufhelden" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1">
    <metadata>
        <name>Jazda na rolkach - czw. sie 31 13:31:05 2000 - 0.0km</name>
        <desc></desc>
        <extensions>
            <meerun uid="1c53fb3a34cd468a" activity="inlineSkating" filtered="false" interval="1" elevationCorrected="false" manualPause="true" autoPause="false" autoPauseSensiti
vity="medium" gpsPause="false" createLapOnPause="false"/>
        </extensions>
    </metadata>
    <trk>
        <trkseg>
            <trkpt lat="52.2071305" lon="20.97989607">
                <time>2000-08-31T11:31:05Z</time>
                <ele>173</ele>
                <extensions>
                    <g_spd>0</g_spd>
                    <h_acc>28</h_acc>
                    <v_acc>28</v_acc>
                    <gpxtpx:TrackPointExtension>
                        <gpxtpx:hr>0</gpxtpx:hr>
                    </gpxtpx:TrackPointExtension>
                </extensions>
            </trkpt>
            <trkpt lat="52.20712546" lon="20.9798975">
                <time>2000-08-31T11:31:06Z</time>
                <ele>171</ele>
                <extensions>
                    <g_spd>0</g_spd>
                    <h_acc>21</h_acc>
                    <v_acc>21</v_acc>
                </extensions>
            </trkpt>
            <trkpt lat="52.20712699" lon="20.97989982">
                <time>2000-08-31T11:31:07Z</time>
                <ele>173</ele>
                <extensions>
                    <g_spd>0</g_spd>
                    <h_acc>16</h_acc>
:
atlochowski commented 4 years ago

Is the filename of the GPX file also the wrong date?

Yes

atlochowski commented 4 years ago

date on my phone:

[nemo@Sailfish ~]$ date
Thu Apr 16 13:50:23 CEST 2020
[nemo@Sailfish ~]$ 
jdrescher2006 commented 4 years ago

The strange thing is that nobody else seems to have this problem. To get to the core of the problem some debugging of C++ files would be neccessary. Are you familiar with this?

atlochowski commented 4 years ago

i'm familiar with debugging linux systems, bash scripts and ruby scripts but not C++

jdrescher2006 commented 4 years ago

Ok I will have a look into the code maybe today or next week. I might give you a version with extended debug messaged.

atlochowski commented 4 years ago

Today I used OSM scout as a tracker and get 2000 year in track. So it's something wrong, somewhere else but not in you app. Sorry.

martonmiklos commented 4 years ago

The Laufhelden writes the GPS timestamps to the GPX file: https://github.com/martonmiklos/Laufhelden/blob/master/src/trackrecorder.cpp#L466 which is coming from the Qt's QGeoPositionInfoSource, so something is messed up in the lower layers.

@atlochowski on what device do you see this problem?

atlochowski commented 4 years ago

on Jolla 1 https://together.jolla.com/question/225700/wrong-date-from-gps/

martonmiklos commented 4 years ago

Hmm I have used extensively my JP1 in Q1 this year and have not detected anything like this.

atlochowski commented 4 years ago

I had similar problem at the beginning of this year. Then I changed tracker to OSM Scout and it was ok. And now OSM Scout is affected as well. But it looks like it's something deeper then apps.

Karry commented 4 years ago

Ups. In recent release of OSM Scout, I just changed time source for from new Date() (current device time) to Position.timestamp (time from GPS position event).

Did you try to use different location settings? I am using GPS, online Here service and offline Mozilla service... I will try to reproduce it with my Jolla 1, now I am using Jolla C as my primary phone and it is fine...

atlochowski commented 4 years ago

so I think this is the reason why it's not ok anymore "Ups. In recent release of OSM Scout, I just changed time source for from new Date() (current device time) to Position.timestamp (time from GPS position event)." Because time from device is ok, but from gps not.

Yes, on Jolla C everything is fine. Tried different location settings without result.

atlochowski commented 4 years ago

@Karry just installed version 2.0 and it's ok now.

atlochowski commented 4 years ago

So it's not Laufhelden related so I'm closing.

Karry commented 4 years ago

It is weird. It is possible that you have different firmware in your gps chip... Lets see if someone from Jolla or community will comment that... Anyway, there is simple workaround in applications: https://github.com/Karry/osmscout-sailfish/commit/21cf58edd0f9d0df6a5aec8c0c0b4772908efb79