comparison code_part1/OSTC_code_c_part2/shared_definitions.h @ 338:b75564fb3d4b

Optimizing access to B?hlmann coefficient (speed). Define number of compartiments, stops and gases.
author JeanDo
date Tue, 17 May 2011 15:56:09 +0200
parents 676d18bce8d7
children cb77d1fa4535
comparison
equal deleted inserted replaced
334:4ccdc72ec0e5 338:b75564fb3d4b
72 # pragma udata overlay bank2=0x200 72 # pragma udata overlay bank2=0x200
73 #else 73 #else
74 bank2 udata_ovr 0x200 74 bank2 udata_ovr 0x200
75 #endif 75 #endif
76 76
77 #ifdef xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
78 Define model dimensions.
79 NUM_COMP is the number of compartiments in the Bühlmann ZH-L16 model, ie 16.
80 NUM_STOPS is the maximum number of stops computed by decoplanning.
81 Note that the deapest stop is roughly limited to 3m * NUM_STOPS
82 (this is assuming all stops up to the surface are used).
83 Note also that if the table overflow, extra stops are ignored,
84 and not reported in TTS summing.
85 NUM_GAS is the number of (potentially) active gas considered during
86 ascent simulation.
87 #endif
88 #define NUM_COMP 0x10
89 #define NUM_STOPS 0x20
90 #define NUM_GAS 5
91
77 VAR_UINT (int_O_gtissue_limit); 92 VAR_UINT (int_O_gtissue_limit);
78 VAR_UINT (int_O_gtissue_press); 93 VAR_UINT (int_O_gtissue_press);
79 VAR_UINT (int_O_desaturation_time); // 94 VAR_UINT (int_O_desaturation_time); //
80 VAR_UINT (int_O_ascenttime); // TTS (in minutes) 95 VAR_UINT (int_O_ascenttime); // TTS (in minutes)
81 VAR_UINT (int_O_extra_ascenttime); // TTS for @+5min variant (in minutes) 96 VAR_UINT (int_O_extra_ascenttime); // TTS for @+5min variant (in minutes)
92 VAR_UCHAR (char_O_CNS_fraction); // new in v.101 107 VAR_UCHAR (char_O_CNS_fraction); // new in v.101
93 VAR_UCHAR (char_O_relative_gradient_GF); // new in v.102 108 VAR_UCHAR (char_O_relative_gradient_GF); // new in v.102
94 109
95 VAR_UCHAR (char_O_first_deco_depth); // Depth of first stop. 110 VAR_UCHAR (char_O_first_deco_depth); // Depth of first stop.
96 VAR_UCHAR (char_O_first_deco_time) ; // Duration of first stop. 111 VAR_UCHAR (char_O_first_deco_time) ; // Duration of first stop.
97 TAB_UCHAR (char_O_deco_depth, 0x20); // Fusionned decompression table: 112 TAB_UCHAR (char_O_deco_depth, NUM_STOPS); // Fusionned decompression table:
98 TAB_UCHAR (char_O_deco_time, 0x20); // Both ZH-L16 and L16-GF models. 113 TAB_UCHAR (char_O_deco_time, NUM_STOPS); // Both ZH-L16 and L16-GF models.
99 114
100 TAB_UCHAR (char_O_tissue_saturation, 0x20); // Compartiment desaturation time, in min. 115 TAB_UCHAR (char_O_tissue_saturation, 2*NUM_COMP); // Compartiment desaturation time, in min.
101 116
102 VAR_UINT (int_O_DBS_bitfield); // NOTE: 9 bytes dumped to divelog by store_dive_decodebug 117 VAR_UINT (int_O_DBS_bitfield); // NOTE: 9 bytes dumped to divelog by store_dive_decodebug
103 VAR_UINT (int_O_DBS2_bitfield); 118 VAR_UINT (int_O_DBS2_bitfield);
104 VAR_UINT (int_O_DBG_pre_bitfield); 119 VAR_UINT (int_O_DBG_pre_bitfield);
105 VAR_UINT (int_O_DBG_post_bitfield); 120 VAR_UINT (int_O_DBG_post_bitfield);
138 VAR_UCHAR (char_I_depth_last_deco); // new in v.101 unit: [m] 153 VAR_UCHAR (char_I_depth_last_deco); // new in v.101 unit: [m]
139 VAR_UCHAR (char_I_deco_model); // new in v.102. 0 == ZH-L16, 1 = ZH-L16-GF (Grandiant facttor) 154 VAR_UCHAR (char_I_deco_model); // new in v.102. 0 == ZH-L16, 1 = ZH-L16-GF (Grandiant facttor)
140 VAR_UCHAR (char_I_bottom_depth); // Bottom depth for planning (used in gas volume evaluation). 155 VAR_UCHAR (char_I_bottom_depth); // Bottom depth for planning (used in gas volume evaluation).
141 VAR_UCHAR (char_I_bottom_time); // Bottom time for planning (used in gas volume evaluation). 156 VAR_UCHAR (char_I_bottom_time); // Bottom time for planning (used in gas volume evaluation).
142 157
143 TAB_UCHAR (char_I_deco_gas_change, 5); // new in v.101 158 TAB_UCHAR (char_I_deco_gas_change,NUM_GAS);// new in v.101
144 TAB_UCHAR (char_I_deco_N2_ratio, 5); // new in v.101 159 TAB_UCHAR (char_I_deco_N2_ratio, NUM_GAS); // new in v.101
145 TAB_UCHAR (char_I_deco_He_ratio, 5); // new in v.101 160 TAB_UCHAR (char_I_deco_He_ratio, NUM_GAS); // new in v.101
146 161
147 #ifdef __18CXX 162 #ifdef __18CXX
148 //---------------------------------------------------------------------------- 163 //----------------------------------------------------------------------------
149 // Access to various utilities defined in ASM-code. 164 // Access to various utilities defined in ASM-code.
150 // 165 //