Commit 4c6f95bb authored by liyuanhong's avatar liyuanhong

修复了急变道经纬度不准的问题

parent 9a29f55d
......@@ -496,8 +496,8 @@ def sendInsertAlarmEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -546,8 +546,8 @@ def sendPulloutAlarmEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -596,8 +596,8 @@ def sendLowVoltageEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -646,8 +646,8 @@ def sendPowerOffEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -708,8 +708,8 @@ def sendRapidlyAccelerateEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -770,8 +770,8 @@ def sendSharpSlowdownEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -832,8 +832,8 @@ def sendSharpTurnEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -887,8 +887,8 @@ def sendCollisionAlarmEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -942,8 +942,8 @@ def sendSetUpDefencesEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -997,8 +997,8 @@ def sendSetDownDefencesEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1052,8 +1052,8 @@ def sendLowGearHighSpeedEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1107,8 +1107,8 @@ def sendHighGearLowSpeedEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1162,8 +1162,8 @@ def sendSurplusOilAlarmEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1217,8 +1217,8 @@ def sendOverSpeedAlarmEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1272,8 +1272,8 @@ def sendTiredDrivingAlarmEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1327,8 +1327,8 @@ def sendIdlingOverTimeEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1382,8 +1382,8 @@ def sendIdlingOverTimeOverEvent():
jdata["DEV_ID"] = params["carId"]
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......@@ -1441,6 +1441,8 @@ def sendRapidChangeLeftLanes():
jdata["gpsInfo"]["UTCTime"] = curTime
lng = service.getLongitude()
lat = service.getLatitude()
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
jdata["event"]["002A"]["lng"] = lng
jdata["event"]["002A"]["lat"] = lat
obj = EventReport_protocol(data=jdata)
......@@ -1496,8 +1498,8 @@ def sendRapidChangeRightLanes():
lat = service.getLatitude()
jdata["event"]["002A"]["lng"] = lng
jdata["event"]["002A"]["lat"] = lat
jdata["gpsInfo"]["latitude"] = lng
jdata["gpsInfo"]["longitude"] = lat
jdata["gpsInfo"]["latitude"] = lat
jdata["gpsInfo"]["longitude"] = lng
timeStamp = time.time() - 8 * 3600
timeArray = time.localtime(timeStamp)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment