We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

Wrong date from GPS on Jolla 1

asked 2020-04-20 12:27:35 +0300

atlochowski gravatar image

updated 2020-04-21 01:19:06 +0300

On my Jolla 1 I have a problem with date from GPS.

When I'm using GPS tracker, instead of 2020 year i'm getting year 2000.

For exaple in GPX file form today I got <time>2000-09-04T07:05:43.0Z</time>.

Anyone know how to fix or debbug it?

It doesn't matter if I use OSM Scout or Laufhelden, result is the same.

 [nemo@Sailfish ~]$ date    Mon Apr 20 08:24:24 CEST 2020
edit retag flag offensive close delete

Comments

1

Sounds like
https://www.theverge.com/2019/3/8/18255847/gps-week-rollover-issue-2019-garmin-tomtom-devices-affected
but that was already last year (April 6th, 2019).
Did you not use your Jolla? :)

Afair this was also discussed on TMO and N900 was not affected (but not sure about it).
The Jolla is old but not that old...

peterleinchen ( 2020-04-20 14:44:11 +0300 )edit

My jolla 1 is my main phone.

I noticed that for a first time 1st or 2nd january, then it was ok, and it's appeared again today.

atlochowski ( 2020-04-20 16:07:01 +0300 )edit

I have to check my Jolla C

atlochowski ( 2020-04-20 16:08:57 +0300 )edit

Did you check with e.g. GPStuff the time that is shown there?
(on XA2 this date is 2020)

peterleinchen ( 2020-04-20 16:40:57 +0300 )edit
1

this app shows timestamp 968076047000 so 09/04/2000

So GPS gives me wrong date

atlochowski ( 2020-04-20 17:03:35 +0300 )edit

5 Answers

Sort by » oldest newest most voted
4

answered 2020-04-21 01:45:57 +0300

olf gravatar image

Related / duplicate of: https://together.jolla.com/question/201585/j1-gps-week-number-rollover-on-6th-april-2019/

edit flag offensive delete publish link more
2

answered 2020-04-21 22:31:43 +0300

updated 2020-04-21 22:38:56 +0300

It seems that the Lineage OS folks are faced with the similar issue: https://gitlab.com/LineageOS/issues/android/issues/1446 It seems that some Qualcomm AGPS related binary paths needs to be updated: https://gitlab.com/HardStyl3r/android_device_lge_g3-common/-/commit/208f79c790e97def2e57dfc6385b2823bf2b4aa0

And it seems that on my JP1 the xtra2 is used in the /etc/gps.conf

edit flag offensive delete publish link more

Comments

Jolla C uses different binary path than Jolla 1

Jolla C

XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin

Jolla 1

XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin

i tried to copy Jolla C paths to Jolla 1 but wothout result.

atlochowski ( 2020-04-21 23:31:26 +0300 )edit

I wrote about that on SailfishOS IRC channel and mal noticed that so will se what happen.

atlochowski ( 2020-04-22 00:22:09 +0300 )edit

If you look at this patch: https://gitlab.com/HardStyl3r/android_device_lge_g3-common/-/commit/208f79c790e97def2e57dfc6385b2823bf2b4aa0

they switched to xtrapath4-5-6

I bet the info came from here: https://developer.gemalto.com/threads/gps-time-info-error?page=1

Currently we still don't have any confirmation from Qualcomm. Based on our own tests we consider these links as working: - XTRA_SERVER_1= http://xtrapath4.izatcloud.net/xtra2.bin - XTRA_SERVER_2= http://xtrapath5.izatcloud.net/xtra2.bin - XTRA_SERVER_3= http://xtrapath6.izatcloud.net/xtra2.bin

martonmiklos ( 2020-04-22 00:26:45 +0300 )edit

tried 4,5,6 and still year 2000

atlochowski ( 2020-04-22 00:52:41 +0300 )edit

Did you shut down, waited a few seconds and booted up again?
I would do so with taking out battery...

peterleinchen ( 2020-04-22 01:24:51 +0300 )edit
1

answered 2020-04-21 01:17:34 +0300

atlochowski gravatar image

updated 2020-04-21 01:20:10 +0300

So it's clear now https://github.com/jdrescher2006/Laufhelden/issues/164#issuecomment-616813592

edit flag offensive delete publish link more
0

answered 2020-05-12 12:54:01 +0300

atlochowski gravatar image

updated 2020-05-12 12:54:24 +0300

@jiit can you report that?

I know it's an old phone, but It would be nice any comment. For example "it's an old phone so we don't want to invest our time to fix that." or "we do our best to fix it"

edit flag offensive delete publish link more
0

answered 2020-05-13 11:40:10 +0300

atlochowski gravatar image

The newest version of OSMScout brings us workaround for this bug.

lastUpdate.getTime() < 1587448500800){
console.log("GPS event timestamp is not valid!");
lastUpdate = new Date();
edit flag offensive delete publish link more

Comments

1

Which is then not the GPS timestamp but the device timetamp (which might be also totally off ;).
You just need to add 1023 weeks to the timestamp :)
Or was it 1024? oh, leap years ...

But, to be serious, it is a fixed offset only (for the next 19,7 years)

peterleinchen ( 2020-05-13 16:30:21 +0300 )edit
1

It's a good fix. If gps timestamp is before 2020-04-21 it gets device timestamp if gps time stamp is newer then 2020-04-21 it gets gps timestamp.

Yes, but Jolla should add this missing weeks in gps middleware not app developers in their apps.

atlochowski ( 2020-05-13 16:51:16 +0300 )edit

Sorry to be klein-kariert hier.
But it is an okay workaround.
The rollover date was 2019-04-07 00:00:00 GMT (1554595200).

The fix would be:

ts = gps.time // now  
t0 = 315964800 // GPS zero time  
tR = 619315200 // 1024 weeks  

if (ts < t0)
  print 'no GPS yet, sorry'  
if (ts < t0+tR+tR)  
  ts += tR

The number of tR to check/add is a device specific parameter. This fix is for devices after 1999-08-22 (N900, N9, Jolla1..) and good for the next 19.7 years.
One could also take the non-GPS system time into account and write a globally valid and future-proof fix...

peterleinchen ( 2020-05-13 21:49:58 +0300 )edit

And agreed Jolla should fix this but I do not believe they care and I am not sure they could.
GPS time is delivered from GPS firmware, no chance for an update
middleware is QT? above fix is a GPS-device-specific fix
some firmwares handle this, some not
So I do not know/see where Jolla should fix this?

But at least a heads-up and a brief look at it would be kind, soon(TM).

peterleinchen ( 2020-05-13 22:02:47 +0300 )edit
1

it's from IRC from 21 Apr:

**mal** maybe that could be solved using some hack to add a constant value in the gps middleware to the timestamp coming from gps hardware  21:22

**mal** atlochowski is the value otherwise reasonable, I mean if some contant would be added to it  21:24

mal works for Jolla, after that no answer from Jolla

atlochowski ( 2020-05-13 22:06:34 +0300 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2020-04-20 12:27:35 +0300

Seen: 705 times

Last updated: May 15 '20