summaryrefslogtreecommitdiffstats
path: root/profile.h
diff options
context:
space:
mode:
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/profile.h b/profile.h
index 13e417785..9389641d5 100644
--- a/profile.h
+++ b/profile.h
@@ -39,6 +39,7 @@ struct plot_data {
void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
int setup_temperature_limits(struct graphics_context *gc, struct plot_info *pi);
+int get_cylinder_pressure_range(struct graphics_context *gc);
struct ev_select {
char *ev_name;
@@ -60,6 +61,9 @@ int get_maxtime(struct plot_info *pi);
* partial pressure graphs */
int get_maxdepth(struct plot_info *pi);
+int get_local_sac(struct plot_data *entry1, struct plot_data *entry2, struct dive *dive);
+
+
#define ALIGN_LEFT 1
#define ALIGN_RIGHT 2
#define INVISIBLE 4
@@ -92,6 +96,14 @@ int get_maxdepth(struct plot_info *pi);
#define SCALEY(gc,y) (((y)-gc->topy)/(gc->bottomy-gc->topy)*gc->maxy)
#define SCALE(gc,x,y) SCALEX(gc,x),SCALEY(gc,y)
+#define SENSOR_PR 0
+#define INTERPOLATED_PR 1
+#define SENSOR_PRESSURE(_entry) (_entry)->pressure[SENSOR_PR]
+#define INTERPOLATED_PRESSURE(_entry) (_entry)->pressure[INTERPOLATED_PR]
+#define GET_PRESSURE(_entry) (SENSOR_PRESSURE(_entry) ? SENSOR_PRESSURE(_entry) : INTERPOLATED_PRESSURE(_entry))
+
+#define SAC_WINDOW 45 /* sliding window in seconds for current SAC calculation */
+
#ifdef __cplusplus
}
#endif