-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindEllipsoidTest.m
55 lines (42 loc) · 1.32 KB
/
FindEllipsoidTest.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% FileName='~/Dawn/Balmino2/VestaTest/SH_VestaHASTALAVESTAshape_6min';
FileName='/Users/antonermakov/Dawn/Vesta_Shape_Models/Gaskell/GASKELL_SHAPE_POST_VESTA/SHAPE.TXT';
data=load(FileName);
x=data(:,1)*1000;
y=data(:,2)*1000;
z=data(:,3)*1000;
[lambda,fi,r]=cart2sph(x,y,z);
a_approx=280000;
b_approx=280000;
c_approx=226000;
ell2_approx=[a_approx c_approx];
ell3_approx=[a_approx b_approx c_approx];
[ell2_estim,rms2]=FindRotationalEllipsoidRaw(r,fi,lambda,ell2_approx);
% [ell2_estim_spice,rms2_spice]=FindRotationalEllipsoidSpiceRaw(r,fi,lambda,ell2_approx);
% [ell3_estim_spice,rms3_spice]=FindTriaxialEllipsoidSpiceRaw(r,fi,lambda,ell3_approx);
[ell3_estim_spice,rms3_spice]=FindTriaxialEllipsoidSpice(r,fi,lambda,ell3_approx);
[ell2_estim_spice,rms2_spice]=FindRotationalEllipsoidSpice(r,fi,lambda,ell2_approx);
% lmcosi_shape=ReadBalminoSH2(FileName);
%
% Resolution=1;
% MaxDegreeTopo=100;
%
% lmcosi_shape=TruncateGravityModel(lmcosi_shape,MaxDegreeTopo,1);
%
% [ri_shape,~]=plm2xyz(lmcosi_shape,Resolution);
%
% s=size(ri_shape);
%
% fi=linspace(90,-90,s(1))/180*pi;
% lambda=linspace(0,360,s(2))/180*pi;
%
% [lambdai,fii]=meshgrid(lambda,fi);
%
%
%
% a_approx=280000;
% b_approx=280000;
% c_approx=226000;
%
% ell=[a_approx b_approx c_approx];
%
% [ell_estim,rms]=FindTriaxialEllipsoidSpice(ri_shape,fii,lambdai,ell);