首页/文章/ 详情

RationalDMIS 7.1探测误差(25点球)

1年前浏览1730



探测误差校准


     通过确定测量点到最小二乘拟合球球心距离的范围,评价三维探测误差P是否符合规定的最大允许探测误差MPEP。


探针位置:按制造商限定范围任意配置,一般用20mm的测杆。


校准过程:在标准球上选取25个探测点进行探测,探测点须均布。


结果处理:用25个测量值计算出最小二乘球中心,求出25个测点到球心的距离R,P=RMAX-RMIN


综合性评定:探测误差P不大于最大允许探测误差MPEP,允许重复再测一次。


RECALL/D(MCS)


UNITS/MM, ANGDEC

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/OFF

FLY/1


SNSET/APPRCH, 10.000000

SNSET/RETRCT, 10.000000

SNSET/DEPTH, 0.000000

SNSET/SEARCH, 10.000000

SNSET/CLRSRF, 10.000000

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

$$定义一个理论球,位置任意

F(SPH1) = FEAT/SPHERE,OUTER,CART, -200.000000, -200.000000, -200.000000,$

30.000000

$$改为手动模式测量一个实际球


MODE/MAN


MEAS/SPHERE, F(SPH1), 5

  PTMEAS/CART,  -356.937692, -107.199353, -373.184071,  0.071462, -0.037765,$

0.996728

  PTMEAS/CART,  -356.892832, -95.183868, -380.621126,  0.074995, 0.908543,$

0.411005

  PTMEAS/CART,  -369.263280, -104.866715, -380.604325,  -0.899269, 0.145947,$

0.412328

  PTMEAS/CART,  -358.708165, -118.254552, -380.602882,  -0.067976,$

-0.908444, 0.412442

  PTMEAS/CART,  -346.313629, -107.139818, -380.541736,  0.908186, -0.033077,$

0.417257

decl/char,100,Var_message

Var_message=prompt/TEXT,'点击继续后,手动在球上取5个测量点'

ENDMES


$$用球的实际球心位置产生一个新的坐标系,原点在球心上

D(ORG_SPH1) = TRANS/XORIG, FA(SPH1), YORIG, FA(SPH1), ZORIG, FA(SPH1)

DECL/COMMON, INTGR, Aj

DECL/COMMON, INTGR, Bj

Aj=prompt/'请输入测头A角角度'

Bj=prompt/'请输入测头B角角度'

D(CRD1) = ROTATE/ZAXIS, Bj

D(CRD2) = ROTATE/XAXIS, -Aj

$$程序所需的变量声明、赋值


$$定义圆周率和其它常规变量

decl/DOUBLE,pie

decl/INTGR,kkk,jjj

$$声明测量点的坐标和法向量

decl/DOUBLE,condx[8,4],condy[8,4],condz[4],i[8,4],j[8,4],k[4]


$$声明实际球的半径

decl/DOUBLE,R_act


$$声明除顶点外4层测量点所在平面圆的半径

decl/DOUBLE,Rar[4]

$$声明标准球的直径

decl/CHAR,100,SHP1_D


$$取得标准球的直径

SHP1_D=prompt/'请输入标准球的直径'

R_act=assign/val(SHP1_D)*0.5

pie=assign/3.141592654


$$将标准球的理论值重新定义

F(SPH1)=Feat/SPHERE,OUTER,CART,0,0,0,R_act*2


$$循环赋值给数组变量,为球的测量点的坐标

do/jjj,1,4,1


  do/kkk,1,8,1

    

  

  condx[kkk,jjj]=assign/R_act*sin(jjj*pie/8)*cos(kkk*pie/4)

  condy[kkk,jjj]=assign/R_act*sin(jjj*pie/8)*sin(kkk*pie/4)

  condz[jjj]=assign/R_act*cos(jjj*pie/8)

  i[kkk,jjj]=assign/sin(jjj*pie/8)*cos(kkk*pie/4)

  j[kkk,jjj]=assign/sin(jjj*pie/8)*sin(kkk*pie/4)

  k[jjj]=assign/cos(jjj*pie/8)

  

  enddo


enddo


MODE/PROG,MAN



$$开始25点、5层测量实际球


RECALL/D(CRD2)


MEAS/SPHERE, F(SPH1), 25


  GOTO/0,0,R_act+10

  $$第1点

  PTMEAS/CART,  0.000000, 0.000000, R_act,  0.000000, 0.000000, 1.000000

  $$22.5度4个测量点

  ptmeas/cart,condx[2,1],condy[2,1],condz[1],i[2,1],j[2,1],k[1]

  ptmeas/cart,condx[4,1],condy[4,1],condz[1],i[4,1],j[4,1],k[1]

  ptmeas/cart,condx[6,1],condy[6,1],condz[1],i[6,1],j[6,1],k[1]

  ptmeas/cart,condx[8,1],condy[8,1],condz[1],i[8,1],j[8,1],k[1]

  $$45度8个测量点

  ptmeas/cart,condx[1,2],condy[1,2],condz[2],i[1,2],j[1,2],k[2]

  ptmeas/cart,condx[2,2],condy[2,2],condz[2],i[2,2],j[2,2],k[2]

  ptmeas/cart,condx[3,2],condy[3,2],condz[2],i[3,2],j[3,2],k[2]

  ptmeas/cart,condx[4,2],condy[4,2],condz[2],i[4,2],j[4,2],k[2]

  ptmeas/cart,condx[5,2],condy[5,2],condz[2],i[5,2],j[5,2],k[2]

  ptmeas/cart,condx[6,2],condy[6,2],condz[2],i[6,2],j[6,2],k[2]

  ptmeas/cart,condx[7,2],condy[7,2],condz[2],i[7,2],j[7,2],k[2]

  ptmeas/cart,condx[8,2],condy[8,2],condz[2],i[8,2],j[8,2],k[2]

  $$67.5度4个测量点

  ptmeas/cart,condx[2,3],condy[2,3],condz[3],i[2,3],j[2,3],k[3]

  ptmeas/cart,condx[4,3],condy[4,3],condz[3],i[4,3],j[4,3],k[3]

  ptmeas/cart,condx[6,3],condy[6,3],condz[3],i[6,3],j[6,3],k[3]

  ptmeas/cart,condx[8,3],condy[8,3],condz[3],i[8,3],j[8,3],k[3]

  $$90度8个测量点

  ptmeas/cart,condx[1,4],condy[1,4],condz[4],i[1,4],j[1,4],k[4]

  ptmeas/cart,condx[2,4],condy[2,4],condz[4],i[2,4],j[2,4],k[4]

  ptmeas/cart,condx[3,4],condy[3,4],condz[4],i[3,4],j[3,4],k[4]

  ptmeas/cart,condx[4,4],condy[4,4],condz[4],i[4,4],j[4,4],k[4]

  ptmeas/cart,condx[5,4],condy[5,4],condz[4],i[5,4],j[5,4],k[4]

  ptmeas/cart,condx[6,4],condy[6,4],condz[4],i[6,4],j[6,4],k[4]

  ptmeas/cart,condx[7,4],condy[7,4],condz[4],i[7,4],j[7,4],k[4]

  ptmeas/cart,condx[8,4],condy[8,4],condz[4],i[8,4],j[8,4],k[4]

  

  GOTO/0,0,R_act+10


ENDMES


$$$$$$$$$$$$$$$$$$$$输出宏定义$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

M(EASI_SPHERE_HIGHLOW_POINTS) = MACRO/'FEATLABEL', 'DEVICELABEL', HIGHR, LOWR, RADSEPARATION, ER

DECL/LOCAL, CHAR, 255, FNAME

DECL/LOCAL, REAL, XC,YC,ZC,XX,YY,ZZ, CDIST

DECL/LOCAL, INTGR, PCOUNT, LPCOUNT

FNAME = OBTAIN/F(@FEATLABEL), 1

ER = ASSIGN/0

HIGHR = ASSIGN/0

LOWR = ASSIGN/100000

PCOUNT = VALUE/FA(@FEATLABEL), PTDATA

XC = OBTAIN/FA(@FEATLABEL), 4

YC = OBTAIN/FA(@FEATLABEL), 5

ZC = OBTAIN/FA(@FEATLABEL), 6

DO/LPCOUNT, 1, PCOUNT

XX = OBTAIN/FA(@FEATLABEL)[LPCOUNT],2

YY = OBTAIN/FA(@FEATLABEL)[LPCOUNT],3

ZZ = OBTAIN/FA(@FEATLABEL)[LPCOUNT],4

CDIST = ASSIGN/SQRT((XX-XC)*(XX-XC)+(YY-YC)*(YY-YC)+(ZZ-ZC)*(ZZ-ZC))

IF/(CDIST .GT. HIGHR)

HIGHR = ASSIGN/CDIST

ENDIF


IF/(CDIST .LT. LOWR)

LOWR = ASSIGN/CDIST

ENDIF

WRITE/DID(@DEVICELABEL), 'PTN = ',LPCOUNT:2, '  X = ', XX, '  Y = ', YY, '  Z = ', ZZ, '  R = ', CDIST

WRITE/DID(DEFAULTSCREEN),'PTN = ',LPCOUNT:2, '  X = ', XX, '  Y = ', YY, '  Z = ', ZZ, '  R = ', CDIST

ENDDO

RADSEPARATION = ASSIGN/(HIGHR-LOWR)

ENDMAC


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


$$$$$$$$$$$$$$$$$$$$$$$$$$输出SPH1结果$$$$$$$$$$$$$$$$$$$$$$$$$$

DECL/COMMON, REAL, HR, LR, RADSEP

DECL/COMMON, INTGR, LPRET

DECL/COMMON, CHAR, 256, STESTDATE, STESTTIME, SSEP


DID(ISO103602-2Report) = DEVICE/STOR,'ISO-103602-Report.out'

OPEN/DID(ISO103602-2Report), DIRECT, OUTPUT, APPEND


SSEP = ASSIGN/'--------------------------------------------------------------------------------'

STESTDATE = ASSIGN/SDATE()

STESTTIME = ASSIGN/STIME()


WRITE/DID(ISO103602-2Report),SSEP 

WRITE/DID(DEFAULTSCREEN),SSEP 


WRITE/DID(ISO103602-2Report),'ISO10360-2 sphere minimin and maximun radius test. Performed on'

WRITE/DID(DEFAULTSCREEN),'ISO10360-2 sphere minimin and maximun radius test. Performed on'


WRITE/DID(ISO103602-2Report),'TIME : ', STESTTIME  

WRITE/DID(DEFAULTSCREEN),'TIME : ', STESTTIME 


WRITE/DID(ISO103602-2Report),'DATE : ', STESTDATE 

WRITE/DID(DEFAULTSCREEN),'DATE : ', STESTDATE


CALL/M(EASI_SPHERE_HIGHLOW_POINTS), (SPH1), (ISO103602-2Report), HR, LR, RADSEP, LPRET

WRITE/DID(ISO103602-2Report),' ' 

WRITE/DID(DEFAULTSCREEN),' ' 


WRITE/DID(ISO103602-2Report),'Maximun Radius = ', HR:6:5, '  Minimun Radius = ', LR:6:5, '  Form Error = ', RADSEP:6:5

WRITE/DID(DEFAULTSCREEN),'Maximun Radius = ', HR:6:5, '  Minimun Radius = ', LR:6:5, '  Form Error = ', RADSEP:6:5


CLOSE/DID(ISO103602-2Report), KEEP


$$

来源:RationalDMIS测量技术
ADS理论
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2023-07-07
最近编辑:1年前
山涧果子
大专 签名征集中
获赞 203粉丝 48文章 1203课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习 福利任务 兑换礼品
下载APP
联系我们
帮助与反馈