Absolute value interpolation maintaining accuracy!
I am taking data from an absolute encoder which is measuring rotation and I need this to stay accurate (e.g. 0 on encoder = 0 degress, 63 on encoder = 180 degrees) but I also need to smooth between the values.
Does anyone have any bright ideas?
What you do, in part, depends on what the absolute encoder is putting out (0-359?) Typically something like [Scale rotminvalue rotmaxvalue 0 127] in to a line object to perform smoothing should do the trick. Or is it something trickier in which case we may need more info…
The encoder im looking at outputs 0 – 255 actually so I used scale to map this from 0 – 360 but as i am using this to move an image each increment of 1 causes a less than smooth jump in degrees.
Does that make more sense?
Im using scale before line which gives me floats but there are still market leaps in the values.
With that range you won’t of course get the precision to place the image to a single degree, but with that said, it should be possible to have a gradual motion to your destination without ‘marked leaps". I’ve attached an example here, but not sure how you’re going about it with yours. Maybe you could post your patch…
----------begin_max5_patcher---------- 540.3oc0VEraiBCD8L7UXYsGyVgMP.5s86XUUkAll5JhIx1oa1sp+6KLFRHs MEHcaV0K1Byvad944Mlm78n406.CkbM4mDOum787vkZWvq6YO5ZwthJgACip 1tNGzzEtWcWsxZj+AZeEieUP2xazfATVgUVqtUCEVWF3goMgPh3YsSAcCja5 9pFnkpJvhIh0CkvVbuTsZHL7nqhafIJtEgXDG9PfjkHUqye36r3gTUIViTk9 CsTTQOj25s19Dy2mXcSzVPeKnD4U320u+bga+8FvwHpTYoKHzbgZEkbSaPO6 62NrXhx5ZvXDqfdJYgc3lk9MFgEDLhbejvwOsvwxRPsJBmbirzSHbQyU3XmR bNOEQA+pgGuRPpjJXNxQ33xQxRTNV9t0QrysN50xwhyURJGjrRXkFbV2vki4 6BPmRHK7C465zqv.z9x3Gl1CU+oQCk1ebLPEyd+JmYY4tqpVX+mVZYJDU.If viiaFCiylSc1xwqyXNAycXbpBsz+21tozeexcpYIscpYYAi2oN4qQi5Q8fyz MwSG0LwiW9VlonOWyDRCrc6K9+.bufsgORkL0a0E830wOxgMSIXrRE1YZPLo GEy8xxRPMjnkRSK2wMcvadZMU1jNA1vhtXzIaJzI9hQm1q2FkOYWN5LkZmWv 4OS9LE5jblrw4yDa17HnMcPhDoouyC0582sPaZq3dDQjpgGk8wG52h1y9+kt wR63 -----------end_max5_patcher-----------