<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Processing RSSI Value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44207/processing-rssi-value</link><description>At the moment I am collecting 64 RSSI values into an array and want to calculate the average and variance of them. I have managed to calculate the average by adding up the values during collection but trying to find the deviation after the collection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Feb 2019 11:21:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44207/processing-rssi-value" /><item><title>RE: Processing RSSI Value</title><link>https://devzone.nordicsemi.com/thread/173445?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 11:21:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17182c1b-00b6-4f17-8420-986d378e3ad0</guid><dc:creator>Kebab</dc:creator><description>&lt;p&gt;Ah thank you! Making it static fixed the issue.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll take note of that formatting for future reference too, thanks for the heads up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processing RSSI Value</title><link>https://devzone.nordicsemi.com/thread/173377?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 07:27:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c18ccf6e-24ab-4c43-9880-7c5a8ae7f20d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is clearly a problem with your RSSI array. It is not static, so it is allocated on stack. Therefore it is expected that it is corrupted.&lt;/p&gt;
&lt;p&gt;PS: Please use Insert -&amp;gt; Insert Code instead of an image when posting code, as that makes it easier to read and search in it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processing RSSI Value</title><link>https://devzone.nordicsemi.com/thread/173342?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 00:02:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1a06eec-b791-4918-9ec4-12c8356935fa</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;No the first time, assuming it is in the &lt;em&gt;zerovars&lt;/em&gt; section which would be the default, but since it is not created within the function it will retain its previous value on the next calculation (if any), which of course would cause an error. Ideally &lt;em&gt;istdcount = 0;&lt;/em&gt; should be added at the end of the calculation ready for the next time, or better at the beginning of that calculation loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processing RSSI Value</title><link>https://devzone.nordicsemi.com/thread/173341?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 23:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e226f22b-642f-434f-ac21-edca1ca45c7f</guid><dc:creator>Kebab</dc:creator><description>&lt;p&gt;Yes it was initialized to 0. Is that just a good practice thing? It didn&amp;#39;t seem to change the outcome of the program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processing RSSI Value</title><link>https://devzone.nordicsemi.com/thread/173340?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 23:42:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eed7cdb-034a-4d3b-ad9e-602aa33d1533</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Assuming &lt;em&gt;stdcount&lt;/em&gt; is initialised to 0 every time (not shown in code), the last occurring&amp;nbsp;&lt;em&gt;RSSICount++&lt;/em&gt; should actually be &lt;em&gt;RSSICount = 0&lt;/em&gt;;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>