📄 mat_test.cpp
字号:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
#include <string.h>
#include <io.h>
#include <Dos.h>
#include "CMatrix3.cpp" // Alberto Perez, Thanks Alberto!!
// They will help make the transition
// to a Kalman filter much easier
void main()
{
float az[6],el[6];
int i;
az[0]=0.0;el[0]=90.0;
az[1]=0.0;el[1]=5.0;
az[2]=90.0;el[2]=5.0;
az[3]=180.0;el[3]=5.0;
az[4]=270.0;el[4]=5.0;
az[5]=235.0;el[5]=45.0;
Matrix G(4,4),H(6,4),M(4,4);
for (i=1;i<=6;i++)
{
H(i,1)=cos(el[i-1]/57.296)*sin(az[i-1]/57.296);
H(i,2)=cos(el[i-1]/57.296)*cos(az[i-1]/57.296);
H(i,3)=sin(el[i-1]/57.296);
H(i,4)=1.0;
}
DebugOut(H);
printf("\n");
M=H.transpose()*H;
DebugOut(M);
printf("\n");
G=(H.transpose()*H).inverse();
DebugOut(G);
scanf("%d",&i);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -