diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-10 11:04:02 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-10 11:04:02 +1300 |
commit | c37b9de4b1a5d678c191f209b2b8f2447492a5c3 (patch) | |
tree | e7a5607a5a0657843e04e40f429d13087af56de5 /opengts.cfg | |
parent | 0ccf90b139ac70b69145a3e2d9dd763a7c8379fa (diff) | |
download | trackermap-server-c37b9de4b1a5d678c191f209b2b8f2447492a5c3.tar.gz trackermap-server-c37b9de4b1a5d678c191f209b2b8f2447492a5c3.tar.bz2 trackermap-server-c37b9de4b1a5d678c191f209b2b8f2447492a5c3.zip |
Improve OpenGTS config (fix #1021)
Diffstat (limited to 'opengts.cfg')
-rw-r--r-- | opengts.cfg | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opengts.cfg b/opengts.cfg index a7bcad2ad..bee6d9e15 100644 --- a/opengts.cfg +++ b/opengts.cfg @@ -16,8 +16,8 @@ <entry key='database.insertPosition'> START TRANSACTION; - UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:time), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = :device_id; - SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = :device_id; + UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:time), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = RIGHT(CONCAT('000000000000000', :device_id), 15); + SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = RIGHT(CONCAT('000000000000000', :device_id), 15); 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); COMMIT; |