summaryrefslogtreecommitdiffstats
path: root/gaspressures.c
AgeCommit message (Collapse)Author
2014-08-27CCR Patch: Adapt pressure interpolation for CCRGravatar willem ferguson
This patch adapts pressure interpolation (function pr_interpolate_data) in order to process CCR diluent gas as well. A flag diluent_flag is added to the variables for calling this function indicating whether the gas being worked with is diluent gas or not. This is necessitated by the fact that the diluent gas storage is separate from that of the other gases. The data used for interpolation are selected from the appropriate array, depending on nthe value of diluent_flag. In function fill_missing_tank_pressures, diluent_flag is set to 0 in order for the code to work with the current CCR adaptations. The above constitutes no. 1 of a four-part set of patches that allows pressure calculations for CCR gases. There will be CCR functionality only after the whole set of patches is complete. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Code cleanup: gaspressures.cGravatar Willem Ferguson
This patch does some cleaning up of code after the previous CCR patch that extracted the contents of gaspressures.c form profile.c 1) Inapplicable #defines were removed 2) static function types were reinstated where practically possible. 3) comments at the start of the file were expanded a bit. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25CCR code: Split profile.c into two files, with gas caluclations separate.Gravatar Willem Ferguson
This patch implements a separation of the code for gas pressure calculations from the rest of the code in profile.c. The latter file is now split into: profile.c and gaspressures.c. The details of the transferred functions is given at the top of gaspressures.c. The following chnages were made: 1) dive.h: The function types of calculate_depth_to_mbar and depth_to_mbar were made non-static in order to make them available within gaspressures.c. 2) profile.c: Prototypes for the functions in gaspressures.c were inserted at the top of profile. Ten functions were transferred from profile.c to gaspressures.c 3) gaspressures.c as well as a short header, gaspressures.h were created. For the gas pressure calculations for CCR dives, gaspressures.c forms the immediate basis for further code development. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>