|
|
|
@ -2,17 +2,18 @@ const { getConnection, writeData } = require('./pav-client');
|
|
|
|
|
const { getCoordsFormBetweenCoord, dumyData } = require('./pav-utils'); |
|
|
|
|
|
|
|
|
|
// const host = "192.168.0.24"
|
|
|
|
|
const host = "localhost" |
|
|
|
|
const host = 'localhost'; |
|
|
|
|
// const host = '192.168.0.34';
|
|
|
|
|
const port = 8082; |
|
|
|
|
|
|
|
|
|
// 기본정보
|
|
|
|
|
const prefix = 'PASANGUU'; |
|
|
|
|
const prefix = 'PA'; |
|
|
|
|
const terminalId = 'SANDBOX-001'; |
|
|
|
|
|
|
|
|
|
const pathSampleCoord = [ |
|
|
|
|
[37.5215, 126.605], |
|
|
|
|
[37.5215, 126.61], |
|
|
|
|
// [37.5215, 126.6082],
|
|
|
|
|
[37.5215, 126.61], //비정상, 날릴 것
|
|
|
|
|
// [37.5215, 126.6082], 계획서
|
|
|
|
|
[37.521, 126.6082], |
|
|
|
|
[37.521, 126.6057], |
|
|
|
|
[37.5205, 126.6057], |
|
|
|
@ -43,8 +44,7 @@ const getCoords = coords => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const getClient = () => { |
|
|
|
|
const dronName = prefix; |
|
|
|
|
// const dronName = prefix + '0000001A';
|
|
|
|
|
const dronName = prefix + 'trmnlId'; |
|
|
|
|
|
|
|
|
|
const client = {}; |
|
|
|
|
client.dronName = dronName; |
|
|
|
@ -56,7 +56,8 @@ const getClient = () => {
|
|
|
|
|
const sendData = (client, cnt) => { |
|
|
|
|
const data = { |
|
|
|
|
...dumyData, |
|
|
|
|
terminalId: client.dronName, |
|
|
|
|
terminalId: terminalId, |
|
|
|
|
command: 'SANDBOX', |
|
|
|
|
body: [ |
|
|
|
|
{ |
|
|
|
|
...dumyData.body[0], |
|
|
|
|