Finding the change and direction of a signed word value (sensor output) ?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    The difference should be smaller than a WORD so if you do the average of a couple you should not need 32 bit math. If it does over flow the WORD then I think that would be telling you that the difference is larger enough to... make a difference
    OK, yes I see that.
    Is there any drawback to averaging the difference between the numbers rather than the total of the numbers ?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mr.sneezy View Post
    OK, yes I see that.
    Is there any drawback to averaging the difference between the numbers rather than the total of the numbers ?
    It sounds like you are after a relative measurement and not concerned withnthe actual so averaging the difference should be fine.

    Are you thinking the Difference values will be small enough to use more samples in the average? Should be on target then.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts