comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 554:896b6346ccd2

CHANGE: Allow up to 96h desat when computing NoFly (OSTC Planner).
author JeanDo
date Fri, 10 Feb 2012 16:23:41 +0100
parents 6626a6c4eda3
children 43296991c283
comparison
equal deleted inserted replaced
553:97b11ff4bcea 554:896b6346ccd2
2296 void deco_calc_percentage(void) 2296 void deco_calc_percentage(void)
2297 { 2297 {
2298 RESET_C_STACK 2298 RESET_C_STACK
2299 2299
2300 assert( 60 <= char_I_temp && char_I_temp <= 100 ); 2300 assert( 60 <= char_I_temp && char_I_temp <= 100 );
2301 assert( 0 <= int_I_temp && int_I_temp < 2880 ); // Less than 48h... 2301 assert( 0 <= int_I_temp && int_I_temp < 5760 ); // Less than 4 days = 96h...
2302 2302
2303 int_I_temp = (unsigned short)(((float)int_I_temp * (float)char_I_temp) * 0.01 ); 2303 int_I_temp = (unsigned short)(((float)int_I_temp * (float)char_I_temp) * 0.01 );
2304 2304
2305 assert( int_I_temp < 2880 ); // Less than 48h... 2305 assert( int_I_temp < 5760 ); // Less than 96h too...
2306 } 2306 }
2307 2307
2308 2308
2309 ////////////////////////////////////////////////////////////////////////////// 2309 //////////////////////////////////////////////////////////////////////////////
2310 // deco_gas_volumes 2310 // deco_gas_volumes