Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
motorCity
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
motorCity
Commits
adf42db4
Commit
adf42db4
authored
Aug 15, 2022
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws
parent
8f7b0a9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
wsData.ts
src/data/interface/wsData.ts
+30
-3
No files found.
src/data/interface/wsData.ts
View file @
adf42db4
import
*
as
WebSocket
from
"ws"
//连接锁
let
lockReconnect
=
false
;
...
...
@@ -88,6 +89,32 @@ async function createSocket() {
//todo
export
async
function
initWSData
()
{
//
await createSocket();
await
createSocket
();
console
.
log
();
}
\ No newline at end of file
}
let
vehicleQueue
=
{};
function
stats
(
data
)
{
}
/*
{
"accLat":0.08,
"accLong":1.542,
"acceleration":0,加速度
"altitude":-3276,海拔高度
"canRecvTime":1660285379691,//接收数据时间
"direction":0,//方向
"drivemode":0,//驾驶模式
"latitude":纬度,
"longitude":经度,
"mileage":里程,
"positiontime":时间戳,
"vehicleid":"车辆id",
"velocity":速度,
"vin":"LSJE24090MS029920"
}
*/
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment