create indexes on tc_positions.fixTime and tc_events.eventTime

mahmouda year ago

Hello Dears,

How can create these command below and where I should put them. Can put them inside this (/etc/cron.daily/traccar-clear-database)?

CREATE INDEX idx_positions_fixtime ON tc_positions (fixtime);
CREATE INDEX idx_events_eventtime ON tc_events (eventtime);
Anton Tananaeva year ago

You should not put them into the cron file. You need to run them only once. Use your database client to enter those queries.

mahmouda year ago

If I run them, it will solve this problem below:

Data truncation: Incorrect datetime value: '1970-01-01 00:00:00' for column 'fixtime' at row 1 - MysqlDataTruncation (... < QueryBuilder:469 < DatabaseStorage:95 < DefaultDataHandler:47 < ...)
Anton Tananaeva year ago

You have to set the SQL mode sql_mode=''.

mahmouda year ago
mahmouda year ago

I run the SQL mode for 2 commands but the fixtime problem still not solved.

Anton Tananaeva year ago

It won't solve the problem with time. Why did you think it would?

mahmouda year ago

Because I tried all ways to solve this problem and I enabled geolocation config to solve it.
I think it solve this problem.
Kindly, do you know any way to solve this problem?

Anton Tananaeva year ago

You haven't really explained why that is a problem and what makes you think it needs fixing.

mahmouda year ago

I am working on elder GPS tracker device which use watch protocol, and I have problem with indoor tracking with GPS so I am trying to use the LBS geolocation and I used a lot of Geolocation API such as google and OpenCelliD. However, all of these didn't work.
Could you give me an advise to solve this?

Anton Tananaeva year ago

Why they didn't work? What have you checked so far?

mahmouda year ago

The server store null data for the location
All data saved zeros

Anton Tananaeva year ago

That's really all you checked? Then I don't think I would be able to help. You have to check the geolocation API, the network data, validity flags etc.

mahmouda year ago

Could you help me with the flags that I should to validate them??

mahmouda year ago

Dear Anton,
I received this information from the device:

[3G*7104870584*013F*UD_LTE,100823,071848,V,00.000000,,00.0000000,,0.00,0.0,0.0,0,100,60,0,0,00000000,6,0,420,3,11240,29359380,6,11240,28469268,6,11240,29359380,1,11240,29359410,7,41140,106159380,1,41140,105269268,-1,5,,f2:d7:7c:39:92:36,-94,,50:a7:2b:f8:03:7d,-94,,72:02:71:cc:99:c1,-102,,38:47:bc:0f:01:a2,-104,,be:27:2b:ef:f2:10,-106,0.0]

And the below my geolocation setting:

<entry key='geolocation.enable'>true</entry>
<entry key='geolocation.type'>google</entry>
<entry key='geolocation.key'>[my API here]</entry>
<entry key='geolocation.processInvalidPositions'>true</entry>
<entry key='geocoder.processInvalidPositions'>true</entry>   

But the server doesn't save position according to LBS information. Also, I checked the the my server doesn't send any request from geolocation API