当前位置:网站首页>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;
}
边栏推荐
- 【RTKLIB 2.4.3 b34 】版本更新简介一
- [offer18] delete the node of the linked list
- 音乐播放(Toggle && PlayerPrefs)
- [算法] 剑指offer2 golang 面试题1:整数除法
- On March 15, the official version of go 1.18 was released to learn about the latest features and usage
- MySQL error warning: a long semaphore wait
- Solution to the problem of automatic login in Yanshan University Campus Network
- Compile GDAL source code with nmake (win10, vs2022)
- 平衡二叉树详解 通俗易懂
- 基于rtklib源码进行片上移植的思路分享
猜你喜欢

第一人称视角的角色移动
![[algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array](/img/d5/4bda133498f71ae9fd7a64c6cba8f0.png)
[algorithm] sword finger offer2 golang interview question 6: sum of two numbers in the sorting array

The service robots that have been hyped by capital and the Winter Olympics are not just a flash in the pan

Unity场景跳转及退出
![[algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix](/img/17/e7c9bfa867030af97eb66a7932c7e3.png)
[algorithm] sword finger offer2 golang interview question 13: sum of numbers of two-dimensional submatrix

平衡二叉树详解 通俗易懂
![[untitled]](/img/b1/9a2bebebb24132a405fc4e7d854e51.png)
[untitled]
![[algorithm] sword finger offer2 golang interview question 3: the number of 1 in the binary form of the first n numbers](/img/64/0f352232359c7d44f12b20a64c7bb4.png)
[algorithm] sword finger offer2 golang interview question 3: the number of 1 in the binary form of the first n numbers

Latex learning

Programming homework: educational administration management system (C language)
随机推荐
PR 2021 quick start tutorial, first understanding the Premiere Pro working interface
Mysql database index
[offer29] sorted circular linked list
[offer78] merge multiple ordered linked lists
341. Flatten nested list iterator
It has been solved by personal practice: MySQL row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT
MySQL error warning: a long semaphore wait
idea中好用的快捷键
GNSS定位精度指标计算
Unity scene jump and exit
Liste des boucles de l'interface graphique de défaillance
NovAtel 板卡OEM617D配置步骤记录
[Chongqing Guangdong education] Shandong University College Physics reference materials
[algorithm] sword finger offer2 golang interview question 2: binary addition
FairyGUI增益BUFF数值改变的显示
[leetcode622] design circular queue
基于rtklib源码进行片上移植的思路分享
第一人称视角的角色移动
wsl常用命令
染色法判定二分图