summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2009-09-06 14:15:53 -0600
committerBdale Garbee <bdale@gag.com>2009-09-06 14:15:53 -0600
commit4b0de757874c0ecaf38e3dfd3beefc398150e3d5 (patch)
treee2eb4a2e577e20c0b00a042d178cc512a035765e
parent773c4ffbc1d2e02eb02cfa543a077a408986da30 (diff)
parentd0eac989b1ffc8ae30ba12da403eb4bf1ad42d6b (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
-rw-r--r--ao-tools/ao-postflight/ao-postflight.c4
-rw-r--r--ao-tools/lib/cc-integrate.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ao-tools/ao-postflight/ao-postflight.c b/ao-tools/ao-postflight/ao-postflight.c
index 6683c67c..c1e4d800 100644
--- a/ao-tools/ao-postflight/ao-postflight.c
+++ b/ao-tools/ao-postflight/ao-postflight.c
@@ -128,7 +128,7 @@ analyse_flight(struct cc_flightraw *f, FILE *summary_file, FILE *detail_file)
}
if (cooked) {
- if (state_start < apogee) {
+ if (state < ao_flight_drogue) {
speed_i = cc_perioddata_max(&cooked->accel_speed, state_start, state_stop);
if (speed_i >= 0)
speed = cooked->accel_speed.data[speed_i];
@@ -230,7 +230,7 @@ main (int argc, char **argv)
}
}
if (detail_name) {
- if (!strcmp (summary_name, detail_name))
+ if (summary_name && !strcmp (summary_name, detail_name))
detail_file = summary_file;
else {
detail_file = fopen(detail_name, "w");
diff --git a/ao-tools/lib/cc-integrate.c b/ao-tools/lib/cc-integrate.c
index 08ca295c..f9793dcd 100644
--- a/ao-tools/lib/cc-integrate.c
+++ b/ao-tools/lib/cc-integrate.c
@@ -72,7 +72,7 @@ cc_perioddata_differentiate(struct cc_perioddata *i)
d->step = i->step;
d->data = calloc (d->num, sizeof(double));
for (n = 1; n < d->num; n++)
- d->data[n] = (i->data[n] - i->data[n-1]) / i->step;
+ d->data[n] = (i->data[n] - i->data[n-1]) / (i->step / 100.0);
d->data[0] = d->data[1];
return d;
}