diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-04-16 11:28:37 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-04-16 11:28:37 +1200 |
commit | ebf7472951073d44c2bb87988df0e85df69421ae (patch) | |
tree | dce5b734e44ee7ce7237e63bc176049bd12d877c /tools/opengts.xml | |
parent | 40bb1b4b9a22f7e88aa17562078260570255de43 (diff) | |
download | trackermap-server-ebf7472951073d44c2bb87988df0e85df69421ae.tar.gz trackermap-server-ebf7472951073d44c2bb87988df0e85df69421ae.tar.bz2 trackermap-server-ebf7472951073d44c2bb87988df0e85df69421ae.zip |
Update opengts integration config
Diffstat (limited to 'tools/opengts.xml')
-rw-r--r-- | tools/opengts.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/opengts.xml b/tools/opengts.xml index a2c0ae7e3..6d1419d30 100644 --- a/tools/opengts.xml +++ b/tools/opengts.xml @@ -23,10 +23,10 @@ <entry key='database.insertPosition'> START TRANSACTION; - UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:time), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2); + UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:fixTime), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2); SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2); INSERT INTO EventData (accountID, deviceID, timestamp, statusCode, latitude, longitude, speedKPH, heading, altitude, rawData, creationTime, address) - VALUES (@accountID, @deviceID, UNIX_TIMESTAMP(:time), 0, :latitude, :longitude, :speed * 1.852, :course, :altitude, '', UNIX_TIMESTAMP(NOW()), :address); + VALUES (@accountID, @deviceID, UNIX_TIMESTAMP(:fixTime), 0, :latitude, :longitude, :speed * 1.852, :course, :altitude, '', UNIX_TIMESTAMP(NOW()), :address); COMMIT; </entry> |