Cycling Equipment · Public discussion

Computer math -- update

Started by tcmedara · · Last activity · 24 posts · 744 views

Thread navigation

Jump through the discussion

Go to the original post, the replies on this page, or the latest preserved contribution.

Thread details

What we know about this thread

Original section
Cycling Equipment
Published
27 September 2004
Last activity
30 September 2004
Original author
tcmedara
Posts
24
Discussion status
Public discussion
Total views
744
Views / 30 days
0

The navigation and discussion metadata provide context. Posts remain in their original chronological order.

Showing posts 21–24 of 24
Posts remain in their original chronological order.

Text size
  1. Quoted message said:

    First, my calculator shows 19.638586. That's closer to
    19.638 than it is to 19.400. You should have argued for
    16.639.

    When people say: "it is ok to use a calculator, as long as you
    understand the results" this is one of the issues they have in mind.

    It has to do with the way measurement works. When you Schwinn says
    "4.015 miles" it really means "somewhere between 4.014 miles and 4.016
    miles." Similarly, when it says "736 seconds" it really means
    "somewhere between 735 and 737 seconds." Your 3600 seconds per hour
    is exact. When we do the calculations, taking into account what your
    Schwinn really means, all we can say is "the average is somewhere
    between 19.607 mph and 19.670 mph."

    Over time, people have developed conventions and decorums to avoid
    this verbosity. These rules dictate that we should report our result
    as 19.6 mph to indicate that we don't know what is going on beyond the
    six. It would be improper to report our result as 19.60 mph or 19.638
    mph or 19.640 mph or 19.64 mph because all of these imply we know more
    than we really do. We are sure about the six and the nine and the one,
    so we write those: 19.6 mph.

    So, all those extra digits on your calculator are meaningless. It is
    important to understand this.

  2. Jim Smith said:
    Quoted message said:

    First, my calculator shows 19.638586. That's closer to
    19.638 than it is to 19.400. You should have argued for
    16.639.

    When people say: "it is ok to use a calculator, as long as you
    understand the results" this is one of the issues they have in mind.

    It has to do with the way measurement works. When you Schwinn says
    "4.015 miles" it really means "somewhere between 4.014 miles and 4.016
    miles." Similarly, when it says "736 seconds" it really means
    "somewhere between 735 and 737 seconds." Your 3600 seconds per hour
    is exact. When we do the calculations, taking into account what your
    Schwinn really means, all we can say is "the average is somewhere
    between 19.607 mph and 19.670 mph."

    Over time, people have developed conventions and decorums to avoid
    this verbosity. These rules dictate that we should report our result
    as 19.6 mph to indicate that we don't know what is going on beyond the
    six. It would be improper to report our result as 19.60 mph or 19.638
    mph or 19.640 mph or 19.64 mph because all of these imply we know more
    than we really do. We are sure about the six and the nine and the one,
    so we write those: 19.6 mph.

    So, all those extra digits on your calculator are meaningless. It is
    important to understand this.

    Dear Jim,

    True, as I recall, but you mustn't say so too loudly, lest
    you hurt my cyclocomputer's feelings.

    Carl Fogel

  3. some guy said:


    What in the world do DACs and ADCs have to do with a cyclocomputer?
    I will tell you: not a damn thing. What in the world are you talking
    about?

    Are you trying to tell me that they are not, in essence, sampling a
    signal and converting it into a suggestion of a continuous measure?
    You are being a little too narrow in your interpretation of my
    assertion.

    and continued:

    Quoted message said:

    Better study harder App!

    Yah, yah, the moving average dealie was way off - I was thinking about
    heart monitors for some reason at the same time I was writing my prior
    post.

    And BTW, there is more than one way to skin a moving average.

    App

  4. Quoted message said:


    DiabloScott said:


    Quoted message said:

    I'm also still puzzled by the idea that the average speed
    will somehow vary according to how often it's calculated
    when the elapsed time is 60 minutes and the elapsed distance
    is 5.00 miles--what's that got to do with current speed?
    What calculation at sixty minutes and five miles can make it
    anything but 5.00 mph average?

    Carl Fogel

    Dear Carl:

    Cateye's response isn't necessarily hokum. Whether or not it's true is
    still questionable but it is not logically inconsistant with any of the
    known facts in this case.

    It could be that the average speed function hadn't yet been updated to
    reflect the most current time and distance readings. Imagine riding at
    15.1 miles per hour for 59 minutes and 30 seconds - you would have
    travelled 14.97 miles. Then in the next 30 seconds you travel at 3.6
    mph and go 0.03 miles. Your distance would read 15.00 miles and your
    time would read 60 minutes and 00 seconds. But if your average speed
    were calculated once every 30 seconds, and it hadn't been updated since
    the 59m30s calc - the average speed would still read 15.1 mph.

    I'm sure the statistical sampling method isn't used - that would
    require storage of large amounts of data, where recalculation every few
    seconds does not - and is more accurate by definition.

    Dear Diablo,

    I suspect that your idea, though ingenious, doesn't explain
    the actual situation.

    Yes, a rider could travel at a higher average speed for most
    of the trip and then slow down during the last 29 seconds,
    just before the next half-minute re-calculation of the
    average speed.

    Yes, this would preserve a higher-than-actual average speed.

    And yes, It works for your example of displaying a 15.1 mph
    average when the true average is 15.0 mph.

    But it works only if you slow to a crawl in the last 30
    seconds and sample only every 30 seconds.

    And it won't work if we go 5.4 mph for 59:30 and want to
    cover 5.00 miles in an hour, unless we do some time travel
    or ride backwards..

    At 5.4 mph, we cover 5.00 miles in about 55:30.

    So we'd have spend the last four-and-a-half minutes stopped
    dead an inch from the finish line to preserve a 5.4 mph
    average.

    A 4.5 minute sampling time is unlikely to explain things.

    Frankly, I'm doubtful of claims that the average is updated
    only every 30 seconds to save batteries. The calculation is
    trivial (current distance divided by current elapsed time)
    and the speedometer is constantly updating all the other
    functions.

    I also doubt that tiny computations every three seconds or
    so (roughly the sampling rate for the speed function) is
    what drains the battery. The display's turn-off function
    suggests that running the LCD is what really drains the
    battery, not twenty calculations per minute. But maybe
    someone who knows more about circuits will surprise me by
    revealing that the calculations are trickier than I think.

    Carl Fogel

    Well, yes, the calculations are trickier than you (might) think. The
    device in question probably uses a microcontroller, not a
    microprocessor. Although the latter usually has multiply and divide,
    the former usually does not; divides are accomplished by repeated
    subtractions and/or shift or rotate operations, and multiplies by
    repeated additions ... etc. Bottom line: more than just one math
    operation per computation.

    That said, floating point multiplies or divides in a bike computer
    application are not terribly difficult to code nor terribly time
    consuming in execution. I built a little computer (housed in an Altoids
    tin that clips to handlebar) that computes and stores instantaneous
    speed in real time. While there is no display to add to power
    consumption (data are downloaded later for display and manipulation),
    the circuit draws only microamperes for a tiny fraction of a second
    after each wheel revolution. To the microcontroller, one wheel
    revolution takes FOREVER, even at 20-30 miles/hour.

    Michael

Active in the last 60 minutes

Active in this thread

0 users · 0 guests ·0 bots ·0 total

No signed-in users are active right now.

No known search crawlers active right now.