It was pointed out that the cryptic message about bhp estimation given the
quarter mile times was somewhat confusing. True, in the original article
where one could follow the derivation and know the units it was easier, and
a single line out of context was not that useful. Maybe the program below
will help. At least give you something to do besides wonder about life, the
universe, etc.
Warning: This was a quick hack, the results are probably within the right
order of magnatude, but don’t count on it. As you can see, doing a 5 second
quarter takes only 2,000 bhp in this program’s eyes, but we all know that the
top fuelers who actually DO 4.9x times are running about 2.5 times that. And
in a lighter "car", I bet!
mjb.
—-
/*
* accel.c –
*
* This code is to compute bhp approximations for a car of a given mass
* doing specified quarter mile times.
*
* bhp = 110.7 * ( w / t^3 )
*
* usage: accel w t1 t2
*
* e.g: accel 2350 5 15 gives us
*
* 5 2081.16 bhp [Okay, a ridiculous example....]
* 6 1204.38 bhp
* …
* 14 94.81 bhp
* 15 77.08 bhp
*/
#include <stdio.h>
#define Ratio 110.7
void
usage(s)
char *s;
{
printf("%s <weight> <t1_seconds> <t2_seconds>\n",s);
}
main(argc, argv)
int argc;
char **argv;
{
float Power;
int t1, t2, weight, index;
if (argc != 4) { usage(argv[0]); exit(0); }
t2 = t1 = weight = 0;
while (*argv)
{
sscanf(*++argv,"%d",&index);
if (index > 25) weight = index;
else
if (t1 == 0) t1 = index;
else t2 = index;
}
printf(" For a vehicle weighing %d pounds, we get:\n",weight);
for (index = t1; index <= t2; index++ ) {
Power = Ratio * ((float) weight / (float)( index * index * index));
printf(" %3d %7.2f bhp\n",index,Power);
}
}
You know, I bet the fiscal attitudes of Congress would change dramatically
if taxes were due April 15, and elections were April 16.
m…@hoosier.utah.edu
posted by admin in Uncategorized and have
No Comments