commit bad7606d271d50db494ac4d93a5b5f61584fad9b Author: hl Date: Thu Jan 13 19:15:14 2022 +0800 提交 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/flows-generic协议(43DAAD).json b/flows-generic协议(43DAAD).json new file mode 100644 index 0000000..dd88e33 --- /dev/null +++ b/flows-generic协议(43DAAD).json @@ -0,0 +1 @@ +[{"id":"fca2f5f.cdf3008","type":"tab","label":"generic协议","disabled":false,"info":""},{"id":"203ee85.484e918","type":"udp in","z":"fca2f5f.cdf3008","name":"","iface":"","port":"5597","ipv":"udp4","multicast":"false","group":"","datatype":"buffer","x":200,"y":200,"wires":[["13dcad67.7cbf03"]]},{"id":"13dcad67.7cbf03","type":"function","z":"fca2f5f.cdf3008","name":"","func":"var mess = String.fromCharCode.apply(null, new Uint8Array(msg.payload));\n//msg.payload = mess;\n\nvar obj = mess.replace(/\\n/g,\",\").replace(/\\t/g,\",\").replace(\" \",\"\").replace(\" \",\"\").replace(\" \",\"\") ;\nmsg.obj = obj;\n\nvar arr = obj.split(',');\nvar length = arr.length;\n\nvar myDate = new Date(); //实例一个时间对象;\nvar hours = ((Array(2).join(0)+myDate.getHours() ).slice(-2)) ;\nvar minutes = ((Array(2).join(0)+myDate.getMinutes()).slice(-2)) ;\nvar seconds = ((Array(2).join(0)+myDate.getSeconds()).slice(-2)) ;\nvar time = hours + \"\" + minutes + \"\" + seconds ; // 时分秒 hhmmss\n\n//日期:年/月/日\nvar day = ((Array(2).join(0)+myDate.getDate() ).slice(-2)) ;\nvar month = ((Array(2).join(0)+(myDate.getMonth()+1)).slice(-2)) ;\nvar year = myDate.getFullYear().toString().substr(2, 2) ;\nvar date = day + \"\" + month + \"\" + year; // 日月年 ddmmyy\n\nfor(var i=0;i + + + + newline + newline + false + + + time (秒) + float + time=%.4f + /sim/time/elapsed-sec + + + + + + longitude(经度) + /position/longitude-deg + float + lng=%03.7f + + + + Latitude(纬度) + /position/latitude-deg + float + lat=%03.7f + + + + Heading (航向) + float + heading=%.1f + /orientation/heading-deg + + + + MACH Number(马赫数) + M=%4.1f + float + /velocities/mach + + + + speed(空速) + airspeed=%d + /velocities/airspeed-kt + + + + Ground Speed(地面速度:kts) + GS=%3d + /instrumentation/gps/indicated-ground-speed-kt + + + + G Load(G负载) + G=%2.1f + float + /accelerations/pilot/z-accel-fps_sec + -0.03108095 + 1.0 + + + + altitude(海拔-英尺) + A=%02d + /position/altitude-ft + + + + AGL(离地高度) + AGL=%4.0f + float + /position/altitude-agl-ft + + + + + + + \ No newline at end of file