||
一般的变形监测测量作业的过程包括以下几步:
1) 初始化 GeoCOM;
2) 打开通讯端口;
3) 将望远镜照准指定方向
4) 精密照准目标;
5) 执行测距动作;
6) 获取角度和距离的测量数据;
7) 清空测距结果(即清空仪器上数据池);
8) 执行其他作业;
9) 关闭通讯端口;
10)退出GeoCOM;
本文以徕卡机器人为例说明:采用发送与接收ASCII 字符串方式(ASCII Protocol)控制
1、初始化GeoCOM:
ASCII 的请求串:无
ASCII 的应答串:无
2、退出GeoCOM:
ASCII 的请求串:无
ASCII 的应答串:无
3、打开/关闭通讯串口:
ASCII 的请求串:无
ASCII 的应答串:无
4、将望远镜照准指定方向:
ASCII 的请求串:%R1Q,9027:Hz,V,PosMode[integer],ATRMode[integer],0
ASCII 的应答串:%R1P,0,0:RC
JSON格式:
"setDirection": { "enabled": true, "request": "%R1Q,9027:4.5075838041231,1.47996115068853,2,0,0\r\n", "response": "", "responseDelimiter": "\r\n", "responsePattern": "(?:%R1P,0,0:)(?P<rcSetDirection>\\d+)", "sleepTime": 10.0, "timeout": 30.0 },
5、精密照准:
ASCII 的请求串:%R1Q,9037:dSrchHz[double], dSrchV[double],0
ASCII 的应答串:%R1P,0,0:RC
JSON格式:
"automaticTarget": { "enabled": true, "request": "%R1Q,9037:0.5,0.5,0\r\n", "response": "", "responseDelimiter": "\r\n", "responsePattern": "(?:%R1P,0,0:)(?P<rcautomaticTarget>\\d+)", "sleepTime": 10.0, "timeout": 30.0 },
6、执行测距动作(或清空测距结果):
ASCII 的请求串:%R1Q,2008: Command [long], Mode[long]
ASCII 的应答串:%R1P,0,0:RC
JSON格式:
"measureDistanceFace": { "enabled": true, "request": "%R1Q,2008:1,1\r\n", "responseDelimiter": "\r\n", "responsePattern": "(?:%R1P,0,0:)(?P<rcMeasureDistance>\\d+)", "sleepTime": 2.0, "timeout": 30.0 },
The result of the distance measurement is kept in the instrument and is valid to the next TMC_DoMeasure command where a new distance is requested or the distance is clear by the measurement program TMC_CLEAR.
Please note that this command does not output any values (distances). In order to get the values you
have to use other measurement functions such as TMC_GetCoordinate (2082) , TMC_GetSimpleMea (2108) or TMC_GetAngle (2003 or 2107).
7、获取角度和距离数据:
ASCII 的请求串:%R1Q,2108: WaitTime [long], Mode[long]
ASCII 的应答串:%R1P,0,0:RC,Hz[double],V[double],SlopeDistance [double]
JSON格式:
"getCoordinate": { "enabled": true, "request": "%R1Q,2108:5000,0\r\n", "responseDelimiter": "\r\n", "responsePattern": "(?:%R1P,0,0:)(?P<rcGetValues>\\d+)(?:,(?P<Hz>\\d*\\.?\\d+), (?P<V>\\d*\\.?\\d+),(?P<SlopeDistance>-?\\d*\\.?\\d+))?", "sleepTime": 10.0, "timeout": 30.0 }
inclination measure mode:
Inclination sensor measurement mode.:
the inclination measure mode TMC_AUTO_INC has the following form (note that the value 1 is used for the Mode parameter because the counting of enumeration data types start at 0)
8、获得坐标数据:
ASCII 的请求串:%R1Q,2116:WaitTime[long],eProg[long]
ASCII 的应答串:%R1P,0,0:RC,dCoordE[double], dCoordN[double], dCoordH[double]
JSON格式:
"getCoordinate": { "enabled": true, "request": "%R1Q,2116:5000,0\r\n", "responseDelimiter": "\r\n", "responsePattern": "(?:%R1P,0,0:)(?P<rcGetValues>\\d+)(?:,(?P<dCoordE>\\d*\\.?\\d+), (?P<dCoordN>\\d*\\.?\\d+),(?P<dCoordH>-?\\d*\\.?\\d+))?", "sleepTime": 10.0, "timeout": 30.0 }
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-2 03:22
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社