annotate code_part1/OSTC_code_c_part2/p2_tables.romdata @ 463:86fc79735d3b

Experimental 32MHz mode
author heinrichsweikamp
date Tue, 27 Sep 2011 22:23:12 +0200
parents bdcc5a5aa8d5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
1 // **************************************************************
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
2 // OSTC - diving computer code
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
3 // Copyright (C) 2008 HeinrichsWeikamp GbR
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
4 //
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
5 // This program is free software: you can redistribute it and/or modify
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
6 // it under the terms of the GNU General Public License as published by
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
7 // the Free Software Foundation, either version 3 of the License, or
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
8 // (at your option) any later version.
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
9 //
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
10 // This program is distributed in the hope that it will be useful,
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
13 // GNU General Public License for more details.
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
14 //
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
15 // You should have received a copy of the GNU General Public License
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
17 //
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
18 // HISTORY
197
f15e804ff67f Gas switch delay
JeanDo
parents: 167
diff changeset
19 // 2011-01-20: jDG Cleanup addressing.
f15e804ff67f Gas switch delay
JeanDo
parents: 167
diff changeset
20 // 2011-02-13: jDG Correct some typos.
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
21 // 2011-05-17: jDG Optimized using interleaved arrays.
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
22 //
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
23 // **************************************************************
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
24
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
25 rom const float buhlmann_ab[4*16] = {
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
26 // Data ZH-L16C, from Bühlmann Tauchmedizin 2002, option 1a (4mn)
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
27 // a for N2 b for N2 a of He b for He
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
28 1.2599, 0.5050, 1.7424, 0.4245,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
29 1.0000, 0.6514, 1.3830, 0.5747,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
30 0.8618, 0.7222, 1.1919, 0.6527,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
31 0.7562, 0.7825, 1.0458, 0.7223,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
32 0.6200, 0.8126, 0.9220, 0.7582,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
33 0.5043, 0.8434, 0.8205, 0.7957,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
34 0.4410, 0.8693, 0.7305, 0.8279,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
35 0.4000, 0.8910, 0.6502, 0.8553,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
36 0.3750, 0.9092, 0.5950, 0.8757,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
37 0.3500, 0.9222, 0.5545, 0.8903,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
38 0.3295, 0.9319, 0.5333, 0.8997,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
39 0.3065, 0.9403, 0.5189, 0.9073,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
40 0.2835, 0.9477, 0.5181, 0.9122,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
41 0.2610, 0.9544, 0.5176, 0.9171,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
42 0.2480, 0.9602, 0.5172, 0.9217,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
43 0.2327, 0.9653, 0.5119, 0.9267
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
44 };
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
45
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
46 rom const float buhlmann_ht[2*16] = {
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
47 // Compartiment half-life, in minute
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
48 //-- N2 ---- He ---------------------------------------------------------------------
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
49 4.0, 1.51,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
50 8.0, 3.02,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
51 12.5, 4.72,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
52 18.5, 6.99,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
53 27.0, 10.21,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
54 38.3, 14.48,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
55 54.3, 20.53,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
56 77.0, 29.11,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
57 109.0, 41.20,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
58 146.0, 55.19,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
59 187.0, 70.69,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
60 239.0, 90.34,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
61 305.0, 115.29,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
62 390.0, 147.42,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
63 498.0, 188.24,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
64 635.0, 240.03
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
65 };
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
66
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
67 rom const float e2secs[2*16] = {
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
68 // result of 1 - 2^(-1/(30sec*HT))
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
69 //---- N2 ------------- He ------------
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
70 5.75958E-03, 1.51848E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
71 2.88395E-03, 7.62144E-03,
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
72 1.84669E-03, 4.88315E-03,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
73 1.24813E-03, 3.29997E-03,
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
74 8.55371E-04, 2.26041E-03,
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
75 6.03079E-04, 1.59437E-03,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
76 4.25414E-04, 1.12479E-03,
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
77 3.00019E-04, 7.93395E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
78 2.11949E-04, 5.60641E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
79 1.58240E-04, 4.18555E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
80 1.23548E-04, 3.26795E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
81 9.66686E-05, 2.55722E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
82 7.57509E-05, 2.00387E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
83 5.92416E-05, 1.56716E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
84 4.63943E-05, 1.22734E-04,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
85 3.63850E-05, 9.62538E-05
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
86 //-------------------------------------
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
87 };
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
88
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
89 rom const float e1min[2*16] = {
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
90 // Integration constant for 1 minute,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
91 // Ie. 1- 2^(-1/HT)
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
92 //----- N2 --------- e 1min He --------
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
93 1.59104E-01, 3.68109E-01,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
94 8.29960E-02, 2.05084E-01,
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
95 5.39424E-02, 1.36579E-01,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
96 3.67742E-02, 9.44046E-02,
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
97 2.53454E-02, 6.56359E-02,
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
98 1.79351E-02, 4.67416E-02,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
99 1.26840E-02, 3.31991E-02,
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
100 8.96152E-03, 2.35301E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
101 6.33897E-03, 1.66832E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
102 4.73633E-03, 1.24808E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
103 3.69981E-03, 9.75753E-03,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
104 2.89600E-03, 7.64329E-03,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
105 2.27003E-03, 5.99417E-03,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
106 1.77572E-03, 4.69082E-03,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
107 1.39089E-03, 3.67548E-03,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
108 1.09097E-03, 2.88359E-03
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
109 //-------------------------------------
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
110 };
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
111
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
112 rom const float e10min[2*16] = {
198
1d98f30ed44e minor comment translation into English
heinrichsweikamp
parents: 197
diff changeset
113 // The 10 min Value in float notation:
1d98f30ed44e minor comment translation into English
heinrichsweikamp
parents: 197
diff changeset
114 // result of 1 - 2^(-10/ht)
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
115 //---- N2 -------------- He -----------
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
116 8.23223E-01, 9.89851E-01,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
117 5.79552E-01, 8.99258E-01,
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
118 4.25651E-01, 7.69737E-01,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
119 3.12487E-01, 6.29027E-01,
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
120 2.26416E-01, 4.92821E-01,
364
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
121 1.65547E-01, 3.80407E-01,
bdcc5a5aa8d5 Fix minor rounding in B?hlmann half-times.
JeanDo
parents: 338
diff changeset
122 1.19840E-01, 2.86538E-01,
338
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
123 8.60863E-02, 2.11886E-01,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
124 6.16117E-02, 1.54849E-01,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
125 4.63665E-02, 1.18026E-01,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
126 3.63881E-02, 9.34005E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
127 2.85855E-02, 7.38569E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
128 2.24698E-02, 5.83504E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
129 1.76160E-02, 4.59303E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
130 1.38222E-02, 3.61528E-02,
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
131 1.08563E-02, 2.84646E-02
b75564fb3d4b Optimizing access to B?hlmann coefficient (speed).
JeanDo
parents: 198
diff changeset
132 //-------------------------------------
165
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
133 };
8b5b848db4cd + Clean Buhlmann tables addressing
JeanDo
parents: 0
diff changeset
134