资源描述:
《摄影测量程序汇总(后方交会+前方交会+单模型光束法平差)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、.程序运行环境为VisualStudio2010.运行前请先将坐标数据放在debug下。1.单像空间后方交会原始数据:内方位元素x0(/mm)y0(/mm)主距f(/mm)比例尺分母00153.2450000像点坐标(/mm)物点坐标(/m)-86.15-68.9936589.4125273.322195.17-53.482.2137631.0831324.51728.69-14.78-76.6339100.9724934.982386.510.4664.4340426.5430319.81757.31C语言程序:#include#include#in
2、cludedouble*readdata();voidsavedata(inthang,double*data,double*xishuarray,double*faxishu,double*l,inti,doublexs,doubleys,doublezs,doublefai,doubleoumiga,doublekapa);voidtranspose(double*m1,double*m2,intm,intn);voidinverse(double*a,intn);voidmulti(double*mat1,double*mat2,double*result,i
3、nta,intb,intc);voidinverse(double*a,intn)/*正定矩阵求逆*/{inti,j,k;for(k=0;k4、j)*=*(a+k*n+k);}}}voidtranspose(double*m1,double*m2,intm,intn)//矩阵转置{inti,j;for(i=0;i5、*b+k]*mat2[k*c+j];}}return;}double*readdata(){FILE*fp;inti,j;intnumber;chardatacatolog[100];//scanf("%s",datacatolog);if((fp=fopen("控制点坐标.txt","r"))==NULL){printf("读取数据出错!");returnfalse;}fscanf(fp,"%d",&number);double*cordata=newdouble[number*5];for(i=0;i6、fscanf(fp,"%lf",cordata+i*5+j);}}printf("控制点坐标数据读取成功!");returncordata;}voidsavedata(inthang,double*data,double*xishuarray,double*faxishu,double*l,inti,doublexs,doubleys,doublezs,doublefai,doubleoumiga,doublekapa){FILE*fp;char*file1="结算数据.txt";fp=fopen(file1,"w");fprintf(fp,"---------原始坐标数据为---
7、-----:");for(inti=0;i