当前位置:网站首页>Realization of the code for calculating the mean square error of GPS Height Fitting
Realization of the code for calculating the mean square error of GPS Height Fitting
2022-07-06 12:53:00 【Proletarians】
Don't talk much , Go straight to the code ,c Code
// 2.1、 Use the median method , Instead of arithmetic median
qsort(tmp_v_res, ns, sizeof(double), cmpres);
median_v_res =median(tmp_v_res, ns);// Mean value of observation Eq.14
// 2.1.1 Find the deviation , Centralization
for (j = 0; j < ns; j++) {
tmp_v_res[j] -= median_v_res;// Eq.15
/*v_res[j] -= median_v_res;*/
if (tmp_v_res[j] < 0) tmp_v_res[j] *= -1;// Take the absolute value
}
// 2.1.2 Use the median to calculate the variance factor
qsort(tmp_v_res, ns, sizeof(double), cmpres);
median_v_res = median(tmp_v_res, ns);// Mean value of observation
sigma1 = median_v_res / 0.6745;// Eq.17
printf(" Robust unit weight mean square error (weighted)sigma1= %f\n", sigma1);
/* Residual comparison */
static int cmpres(const void *p1, const void *p2){
double *q1 = (double *)p1, *q2 = (double *)p2;
double tt = (*q1) - (*q2);
return tt<-0.0 ? -1 : (tt>0.0 ? 1 : 0);
}
/* Find the median */
static double median(const double* A,unsigned int n){
if (n>0){
return (n & 1 == 1) ? A[(n - 1) / 2] : (A[n / 2] + A[n / 2 - 1]) / 2;
}
return 0;
}
边栏推荐
- (core focus of software engineering review) Chapter V detailed design exercises
- Conditional probability
- Itext 7 生成PDF总结
- [offer78]合并多个有序链表
- [Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce
- FairyGUI增益BUFF數值改變的顯示
- 服务未正常关闭导致端口被占用
- [leetcode622] design circular queue
- Combination of fairygui check box and progress bar
- Derivation of logistic regression theory
猜你喜欢

In 2020, the average salary of IT industry exceeded 170000, ranking first

基本Dos命令

FairyGUI条子家族(滚动条,滑动条,进度条)

rtklib单点定位spp使用抗差估计遇到的问题及解决

FairyGUI循環列錶

Teach you to release a DeNO module hand in hand

抗差估计在rtklib的pntpos函数(标准单点定位spp)中的c代码实现
![[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积](/img/e0/cea31070d6365eb57013cdead4a175.png)
[算法] 剑指offer2 golang 面试题5:单词长度的最大乘积

idea问题记录

Mysql database reports an error: row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT=DY
随机推荐
Fabrication of fairygui simple Backpack
[Chongqing Guangdong education] reference materials for regional analysis and planning of Pingdingshan University
Containers and Devops: container based Devops delivery pipeline
[algorithm] sword finger offer2 golang interview question 2: binary addition
[Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce
[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire
FairyGUI摇杆
Fairygui joystick
[algorithm] sword finger offer2 golang interview question 8: the shortest subarray with a sum greater than or equal to K
SSD technical features
KF UD分解之UD分解基础篇【1】
Comparative analysis of the execution efficiency of MySQL 5.7 statistical table records
【GNSS数据处理】赫尔默特(helmert)方差分量估计解析及代码实现
Unity scene jump and exit
[offer78] merge multiple ordered linked lists
Combination of fairygui check box and progress bar
Fairygui loop list
RTKLIB: demo5 b34f.1 vs b33
Usage differences between isempty and isblank
Game 280 weekly