mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:23:24 +00:00
Don't calculate the 9 minute average
We don't do the "smoothed" profile anymore (and haven't for years), so no need to calculate the data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eb07faef00
commit
31b34a24cc
2 changed files with 0 additions and 15 deletions
|
@ -207,8 +207,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index)
|
|||
struct plot_data *p = plot_entry; // moves with 'entry'
|
||||
int start = p->sec - HALF_INTERVAL, end = p->sec + HALF_INTERVAL;
|
||||
int min, max;
|
||||
int firsttime, lasttime, lastdepth;
|
||||
int depth_time_2;
|
||||
|
||||
/* Go back 'seconds' in time */
|
||||
while (entry_index > 0) {
|
||||
|
@ -220,10 +218,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index)
|
|||
|
||||
// indexes to the min/max entries
|
||||
min = max = entry_index;
|
||||
// accumulated depth*time*2
|
||||
depth_time_2 = 0;
|
||||
firsttime = lasttime = p->sec;
|
||||
lastdepth = p->depth;
|
||||
|
||||
/* Then go forward until we hit an entry past the time */
|
||||
while (entry_index < pi->nr) {
|
||||
|
@ -233,10 +227,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index)
|
|||
if (time > end)
|
||||
break;
|
||||
|
||||
depth_time_2 += (time - lasttime) * (depth + lastdepth);
|
||||
lasttime = time;
|
||||
lastdepth = depth;
|
||||
|
||||
if (depth < pi->entry[min].depth)
|
||||
min = entry_index;
|
||||
if (depth > pi->entry[max].depth)
|
||||
|
@ -248,10 +238,6 @@ static void analyze_plot_info_minmax(struct plot_info *pi, int entry_index)
|
|||
|
||||
plot_entry->min = min;
|
||||
plot_entry->max = max;
|
||||
if (firsttime == lasttime)
|
||||
plot_entry->avg = pi->entry[min].depth;
|
||||
else
|
||||
plot_entry->avg = depth_time_2 / 2 / (lasttime - firsttime);
|
||||
}
|
||||
|
||||
static velocity_t velocity(int speed)
|
||||
|
|
|
@ -52,7 +52,6 @@ struct plot_data {
|
|||
int speed;
|
||||
// stats over 9 minute window:
|
||||
int min, max; // indices into pi->entry[]
|
||||
int avg; // actual depth average
|
||||
/* values calculated by us */
|
||||
unsigned int in_deco_calc : 1;
|
||||
int ndl_calc;
|
||||
|
|
Loading…
Add table
Reference in a new issue