-
Notifications
You must be signed in to change notification settings - Fork 0
/
glvf.m
72 lines (70 loc) · 3.47 KB
/
glvf.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function glv1 = glvf(Re, f, wie)
% PSINS Toolbox global variable structure initialization.
%
% Prototype: glv = glvf(Re, f, wie)
% Inputs: Re - the Earth's semi-major axis
% f - flattening
% wie - the Earth's angular rate
% Output: glv1 - output global variable structure array
global glv
if ~exist('Re', 'var'), Re = []; end
if ~exist('f', 'var'), f = []; end
if ~exist('wie', 'var'), wie = []; end
if isempty(Re), Re = 6378137; end
if isempty(f), f = 1/298.257223563; end
% if isempty(wie), wie = 7.2921151467e-5; end
if isempty(wie), wie = 7.292115e-5; end
glv.Re = Re; % 长半轴the Earth's semi-major axis
glv.b = 6356752.3142; %短半轴
glv.f = f; % flattening 地球扁率
glv.Rp = (1-glv.f)*glv.Re; % semi-minor axis
glv.e = sqrt(2*glv.f-glv.f^2); glv.e2 = glv.e^2; % 1st eccentricity 第一偏心率
glv.ep = sqrt(glv.Re^2-glv.Rp^2)/glv.Rp; glv.ep2 = glv.ep^2; % 2nd eccentricity 第二偏心率
glv.wie = wie; % the Earth's angular rate
glv.meru = glv.wie/1000; % milli earth rate unit
glv.g0 = 9.7803267714; % gravitational force
glv.mg = 1.0e-3*glv.g0; % milli g
glv.ug = 1.0e-6*glv.g0; % micro g
glv.mGal = 1.0e-3*0.01; % milli Gal = 1cm/s^2 ~= 1.0E-6*g0
glv.ugpg2 = glv.ug/glv.g0^2; % ug/g^2
glv.ws = 1/sqrt(glv.Re/glv.g0); % Schuler frequency
glv.ppm = 1.0e-6; % parts per million
glv.deg = pi/180; % arcdeg
glv.min = glv.deg/60; % arcmin
glv.sec = glv.min/60; % arcsec
glv.hur = 3600; % time hour (1hur=3600second)
glv.dps = pi/180/1; % arcdeg / second
glv.dph = glv.deg/glv.hur; % arcdeg / hour
glv.dpss = glv.deg/sqrt(1); % arcdeg / sqrt(second)
glv.dpsh = glv.deg/sqrt(glv.hur); % arcdeg / sqrt(hour)
glv.dphpsh = glv.dph/sqrt(glv.hur); % (arcdeg/hour) / sqrt(hour)
glv.dph2 = glv.dph/glv.hur; % (arcdeg/hour) / hour
glv.Hz = 1/1; % Hertz
glv.dphpsHz = glv.dph/glv.Hz; % (arcdeg/hour) / sqrt(Hz)
glv.dphpg = glv.dph/glv.g0; % (arcdeg/hour) / g
glv.dphpg2 = glv.dphpg/glv.g0; % (arcdeg/hour) / g^2
glv.ugpsHz = glv.ug/sqrt(glv.Hz); % ug / sqrt(Hz)
glv.ugpsh = glv.ug/sqrt(glv.hur); % ug / sqrt(hour)
glv.mpsh = 1/sqrt(glv.hur); % m / sqrt(hour)
glv.mpspsh = 1/1/sqrt(glv.hur); % (m/s) / sqrt(hour), 1*mpspsh~=1700*ugpsHz
glv.ppmpsh = glv.ppm/sqrt(glv.hur); % ppm / sqrt(hour)
glv.mil = 2*pi/6000; % mil
glv.nm = 1853; % nautical mile
glv.kn = glv.nm/glv.hur; % knot
%%
glv.wm_1 = [0,0,0]; glv.vm_1 = [0,0,0]; % the init of previous gyro & acc sample
glv.cs = [ % coning & sculling compensation coefficients
[2, 0, 0, 0, 0 ]/3
[9, 27, 0, 0, 0 ]/20
[54, 92, 214, 0, 0 ]/105
[250, 525, 650, 1375, 0 ]/504
[2315, 4558, 7296, 7834, 15797]/4620 ];
glv.csmax = size(glv.cs,1)+1; % max subsample number
glv.v0 = [0;0;0]; % 3x1 zero-vector
glv.qI = [1;0;0;0]; % identity quaternion
glv.I33 = eye(3); glv.o33 = zeros(3); % identity & zero 3x3 matrices
glv.pos0 = [34.246048*glv.deg; 108.909664*glv.deg; 380]; % position of INS Lab@NWPU
glv.eth = [];
% glv.eth = earth(glv.pos0);
%%
glv1 = glv;