From 932f1539b38567e565fd484171c13539b1467308 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 6 Sep 2009 20:26:17 -0700 Subject: Color plots, integrate only flight portion of data. Telemetry files have piles of pad data which shouldn't be integrated into the velocity data as it tends to generate huge values from the noise of the sensor. Also make the data lines colored to keep them visually distinct from the rest of the plot image. Signed-off-by: Keith Packard --- ao-tools/lib/cc-analyse.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ao-tools/lib/cc-analyse.c') diff --git a/ao-tools/lib/cc-analyse.c b/ao-tools/lib/cc-analyse.c index cdb16f02..27c416a6 100644 --- a/ao-tools/lib/cc-analyse.c +++ b/ao-tools/lib/cc-analyse.c @@ -18,6 +18,20 @@ #include "cc.h" #include +void +cc_timedata_limits(struct cc_timedata *d, double min_time, double max_time, int *start, int *stop) +{ + int i; + + *start = -1; + for (i = 0; i < d->num; i++) { + if (*start < 0 && min_time <= d->data[i].time) + *start = i; + if (d->data[i].time <= max_time) + *stop = i; + } +} + int cc_timedata_min(struct cc_timedata *d, double min_time, double max_time) { -- cgit v1.2.3