mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
214bd0ed6e
commit
7575eb44df
6 changed files with 396 additions and 348 deletions
33
gaspressures.h
Normal file
33
gaspressures.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef GASPRESSURES_H
|
||||
#define GASPRESSURES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* simple structure to track the beginning and end tank pressure as
|
||||
* well as the integral of depth over time spent while we have no
|
||||
* pressure reading from the tank */
|
||||
typedef struct pr_track_struct pr_track_t;
|
||||
struct pr_track_struct {
|
||||
int start;
|
||||
int end;
|
||||
int t_start;
|
||||
int t_end;
|
||||
int pressure_time;
|
||||
pr_track_t *next;
|
||||
};
|
||||
|
||||
typedef struct pr_interpolate_struct pr_interpolate_t;
|
||||
struct pr_interpolate_struct {
|
||||
int start;
|
||||
int end;
|
||||
int pressure_time;
|
||||
int acc_pressure_time;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // GASPRESSURES_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue