<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Modulo Means (reprised)</title>
	<atom:link href="http://embeddedgurus.com/stack-overflow/2008/11/modulo-means-reprised/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/stack-overflow/2008/11/modulo-means-reprised/</link>
	<description>Thoughts on embedded systems by Nigel Jones</description>
	<lastBuildDate>Thu, 09 Feb 2012 07:32:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Tom Evans</title>
		<link>http://embeddedgurus.com/stack-overflow/2008/11/modulo-means-reprised/comment-page-1/#comment-67</link>
		<dc:creator>Tom Evans</dc:creator>
		<pubDate>Sat, 10 Oct 2009 07:13:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2008/11/30/modulo-means-reprised/#comment-67</guid>
		<description>Am I missing something here? Just modulo subtract the first value from all the others, and now you&#039;re averaging the differences. I think that gets you plus and minus 180 degrees (from the initial value) with no quadrants. Or start by subtracting the previous average (if you can assume it hasn&#039;t moved all that much).</description>
		<content:encoded><![CDATA[<p>Am I missing something here? Just modulo subtract the first value from all the others, and now you&#39;re averaging the differences. I think that gets you plus and minus 180 degrees (from the initial value) with no quadrants. Or start by subtracting the previous average (if you can assume it hasn&#39;t moved all that much).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2008/11/modulo-means-reprised/comment-page-1/#comment-66</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Sat, 06 Dec 2008 13:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2008/11/30/modulo-means-reprised/#comment-66</guid>
		<description>Your comments are prescient Bruno. I&#039;m averaging 32 readings. The maximum phase noise is 90 degrees, although the typical noise is 45 degrees. Kyle&#039;s algorithm is very close to what you suggested. As you observed however, if the noise exceeds 90 degrees, then things get a little more difficult. It&#039;s for this reason that I went with the computationally less efficient, but more robust algorithm that translates the data into cartesian coordinates, processes the data, and then translates back. As and when I get some free time (Hah!) I will investigate this further. The reason is that this is on a battery powered device, and so computational efficiency results in extended battery life.</description>
		<content:encoded><![CDATA[<p>Your comments are prescient Bruno. I&#8217;m averaging 32 readings. The maximum phase noise is 90 degrees, although the typical noise is 45 degrees. Kyle&#8217;s algorithm is very close to what you suggested. As you observed however, if the noise exceeds 90 degrees, then things get a little more difficult. It&#8217;s for this reason that I went with the computationally less efficient, but more robust algorithm that translates the data into cartesian coordinates, processes the data, and then translates back. As and when I get some free time (Hah!) I will investigate this further. The reason is that this is on a battery powered device, and so computational efficiency results in extended battery life.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno Santiago</title>
		<link>http://embeddedgurus.com/stack-overflow/2008/11/modulo-means-reprised/comment-page-1/#comment-65</link>
		<dc:creator>Bruno Santiago</dc:creator>
		<pubDate>Tue, 02 Dec 2008 02:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2008/11/30/modulo-means-reprised/#comment-65</guid>
		<description>I tried not to think before you gave more information, but I couldn´t and I thought about your problem a bit more.******If your noise(peak to peak) is below 90 degrees peak to peak, I can imagine a method similar to Kyle´s that is efficient.If your first sample is from the second or third quadrant(90 to 270 degrees), then it´s simple arithmetic meanIf your first sample is from the first quadrant(0 to 90 degrees), it´s simple arithmetic mean but the samples of the fourth quadrant that may appear need to be preprocessed(330 becames -30 and so on) before entering summing. And If your final value is negative, add 360.And If your first sample is from the fourth quadrant(270 to 360 degrees), you have to a simple arithimethic mean and preprocessed one(330 becames -30 and so on) until a sample from the third or the first quadrant appears. If it is from the third you continue with the simple one, else you continue with preprocessed one.******And if your noise is below 45 degrees peak to peak, It´s even simpler!If the first sample is over 45 degrees and smaller than 315, then it´s simple arithmetic mean.Else, the samples from the fourth quadrant need to be preprocessed like I said before.******Hope it helps, if it is confused try drawing what I say on the unit circle.</description>
		<content:encoded><![CDATA[<p>I tried not to think before you gave more information, but I couldn´t and I thought about your problem a bit more.******If your noise(peak to peak) is below 90 degrees peak to peak, I can imagine a method similar to Kyle´s that is efficient.If your first sample is from the second or third quadrant(90 to 270 degrees), then it´s simple arithmetic meanIf your first sample is from the first quadrant(0 to 90 degrees), it´s simple arithmetic mean but the samples of the fourth quadrant that may appear need to be preprocessed(330 becames -30 and so on) before entering summing. And If your final value is negative, add 360.And If your first sample is from the fourth quadrant(270 to 360 degrees), you have to a simple arithimethic mean and preprocessed one(330 becames -30 and so on) until a sample from the third or the first quadrant appears. If it is from the third you continue with the simple one, else you continue with preprocessed one.******And if your noise is below 45 degrees peak to peak, It´s even simpler!If the first sample is over 45 degrees and smaller than 315, then it´s simple arithmetic mean.Else, the samples from the fourth quadrant need to be preprocessed like I said before.******Hope it helps, if it is confused try drawing what I say on the unit circle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno Santiago</title>
		<link>http://embeddedgurus.com/stack-overflow/2008/11/modulo-means-reprised/comment-page-1/#comment-64</link>
		<dc:creator>Bruno Santiago</dc:creator>
		<pubDate>Mon, 01 Dec 2008 06:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2008/11/30/modulo-means-reprised/#comment-64</guid>
		<description>To get the best method you have to analyse two things.How many inputs you will average? 4? 10? 500? 10000?What´s the max noise? 10 degrees? 30? 70? 90? 180?If it´s over 90 your measurement is probably useless.With that information and looking to the unit circle and the four quadrants for a couple of hours you will probably find a efficient and robust method.The magic will probably on analysing the inputs before averaging. Something like my second suggestion but without restrictions for the number of inputs, but with restrictions about the maximum noise.</description>
		<content:encoded><![CDATA[<p>To get the best method you have to analyse two things.How many inputs you will average? 4? 10? 500? 10000?What´s the max noise? 10 degrees? 30? 70? 90? 180?If it´s over 90 your measurement is probably useless.With that information and looking to the unit circle and the four quadrants for a couple of hours you will probably find a efficient and robust method.The magic will probably on analysing the inputs before averaging. Something like my second suggestion but without restrictions for the number of inputs, but with restrictions about the maximum noise.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

