大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
double wir_cal1()
{
double pi = 3.1415926;
double xb, yb;
double x[20], y[20];
double v_x[20] , v_y[20] ; //坐标增量改正值
double oba[20] , v_oba[20]; //observation angle
double s[20]; // 边长s
double r[20]; //坐标方位角 r
double ce_oba = 0, ce_x, ce_y;
double rba;
int j,p;
cout<< setiosflags(ios::fixed)<< setprecision(3);
cout<< "输入观测角个数"<< "j="<< endl;
cin >>j;
cout<< "左角1右角-1"<< endl;
cin >>p;
cout<< "输入起始坐标B,A"<< endl;
cin >>xb >>yb >>x[0] >>y[0];
cout<< "rab=";
rba = bc_cal(xb, yb, x[0], y[0]);
//键入观测角值
for (int i = 0; i< j; i++)
{
cout<< "请输入观测角值 "<< i<< endl;
cin >>oba[i];
}
for (int i = 0; i< j-1; i++)
{
cout<< "输入边长 "<< i<< endl;
cin >>s[i];
}
//求观测角闭合差
{
for (int i = 0; i
oba[i] = dfm2m(oba[i]);
cout<< "oba["<< i<< "]= "<< oba[i]<< endl;
}
int fg = sum(oba, 0, j);
int fl = 180 * (j-1) * 3600;
ce_oba = double(fg) - fl;
cout<< "理论值="<< fg<< " 观测值="<< fl<< endl;
cout<< "观测角闭合差"<< ce_oba<< endl;
}
//求坐观测角改正值并分配
for (int i = 0; i< j; i++)
{
v_oba[i] = -ce_oba / j;
oba[i] += v_oba[i];
}
//观测角化弧度值
for (int i = 0; i< j; i++)
{
oba[i] = oba[i] / 3600 / 180 * pi;
cout<< oba[i]<< endl;
}
//求坐标方位角
for (int i = 0; i< j-1; i++)
{
if (i == 0)
{
r[0] = oba2pca(rba, oba[0],p);
}
else
r[i] = oba2pca(r[i - 1], oba[i],p);
cout<< "方位角R"<< i<< "="<< r[i]<< endl;
}
//求坐标增量x,y
double deta_x[20], deta_y[20];
for (int i = 0; i< j-1; i++)
{
deta_xy(r[i], s[i], &deta_x[i], &deta_y[i]);
}
//计算坐标增量闭合差、改正值并分配
{
ce_x = sum(deta_x, 0, j-1);
ce_y = sum(deta_y, 0, j-1);
double S = sum(s, 0, j-1);
for (int i = 0; i< j-1; i++)
{
v_x[i] = -ce_x * s[i] / S;
v_y[i] = -ce_y * s[i] / S;
deta_x[i] += v_x[i];
deta_y[i] += v_y[i];
}
}
//输出坐标x,y
for (int i = 1; i
x[i] = x[i - 1] + deta_x[i-1];
y[i] = y[i - 1] + deta_y[i-1];
cout<< "x"<< i<< "="<< x[i]<< " y"<< i<< "="<< y[i]<< endl;
}
return 0;
}
你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧