diff options
author | Willem Ferguson <willemferguson@zoology.up.ac.za> | 2014-08-24 20:48:22 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-25 13:53:51 -0700 |
commit | 7575eb44df7541e4a2ad1f073c4f1b8e139c3cfd (patch) | |
tree | d1b9509e2fa63b9873d69d763feb661b82aa5685 /dive.h | |
parent | 214bd0ed6e16933560bbea9fba3d151ad9be8d0b (diff) | |
download | subsurface-7575eb44df7541e4a2ad1f073c4f1b8e139c3cfd.tar.gz |
CCR code: Split profile.c into two files, with gas caluclations separate.
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>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -362,7 +362,7 @@ static inline int get_surface_pressure_in_mbar(const struct dive *dive, bool non /* Pa = N/m^2 - so we determine the weight (in N) of the mass of 10m * of water (and use standard salt water at 1.03kg per liter if we don't know salinity) * and add that to the surface pressure (or to 1013 if that's unknown) */ -static inline int calculate_depth_to_mbar(int depth, pressure_t surface_pressure, int salinity) +inline int calculate_depth_to_mbar(int depth, pressure_t surface_pressure, int salinity) { double specific_weight; int mbar = surface_pressure.mbar; @@ -376,7 +376,7 @@ static inline int calculate_depth_to_mbar(int depth, pressure_t surface_pressure return mbar; } -static inline int depth_to_mbar(int depth, struct dive *dive) +inline int depth_to_mbar(int depth, struct dive *dive) { return calculate_depth_to_mbar(depth, dive->surface_pressure, dive->salinity); } |