<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for myahrs</title>
	<atom:link href="http://myahrs.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://myahrs.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Tue, 16 Apr 2013 01:48:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Where&#8217;s the code? by alecmyers</title>
		<link>http://myahrs.wordpress.com/2012/04/11/wheres-the-code/#comment-47</link>
		<dc:creator><![CDATA[alecmyers]]></dc:creator>
		<pubDate>Tue, 16 Apr 2013 01:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=84#comment-47</guid>
		<description><![CDATA[Don, 

The problem was caused by the initialization code: your unit was failing the &quot;stillness&quot; test during the calibration and therefore reading in a previously-stored value for some parameters. Unfortunately as it was new hardware no value had ever been stored so what was being read back was trash and causing the calculations to fail.

The workaround was to look in the file ApplicationRoutines and change the line
 if (vAccelVariance.magnitude() &gt; 5.0e-4) {

to 
if (FALSE) {

for one run. 

You should probably investigate what a sensible value for the condition test there is by printing and examining values of vAccelVariance.magnitude() for different conditions; you want the &quot;if&quot; condition to succeed if the unit is sitting still on a table, but not if (for example) you&#039;re holding it in your hand.]]></description>
		<content:encoded><![CDATA[<p>Don, </p>
<p>The problem was caused by the initialization code: your unit was failing the &#8220;stillness&#8221; test during the calibration and therefore reading in a previously-stored value for some parameters. Unfortunately as it was new hardware no value had ever been stored so what was being read back was trash and causing the calculations to fail.</p>
<p>The workaround was to look in the file ApplicationRoutines and change the line<br />
 if (vAccelVariance.magnitude() &gt; 5.0e-4) {</p>
<p>to<br />
if (FALSE) {</p>
<p>for one run. </p>
<p>You should probably investigate what a sensible value for the condition test there is by printing and examining values of vAccelVariance.magnitude() for different conditions; you want the &#8220;if&#8221; condition to succeed if the unit is sitting still on a table, but not if (for example) you&#8217;re holding it in your hand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Where&#8217;s the code? by don</title>
		<link>http://myahrs.wordpress.com/2012/04/11/wheres-the-code/#comment-46</link>
		<dc:creator><![CDATA[don]]></dc:creator>
		<pubDate>Mon, 15 Apr 2013 22:44:51 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=84#comment-46</guid>
		<description><![CDATA[I&#039;m by no means a professional coder, but I am comfortable with the Arduino IDE.   I did insert a couple of output comands and I&#039;ve figured out that the hardware is returning roll and pitch values as expected from the first call to ReadGyroAccel(); but seems to disappear after any call to Update();

    ReadGyroAccel();
      Serial.print(10 * RADTODEG * roll,0);
      Serial.print(&quot;,&quot;);
      Serial.print(10 * RADTODEG * pitch,0);
      Serial.println();  
    if (compassCounter &gt; 10) { //20Hz
      compassCounter = 0;
      ReadCompass();
      CorrectHeading();
    }
    #if MONGOOSE == 1
    if (baroCounter &gt; 100) { //2Hz
      baroCounter = 0; 
      ReadTemperature();
      ReadAltitude();
      PrintBaro();
    }
    #endif 
    if (powerOnCounter  200) {  //1 Hz
      powerCounter = 0;
      ReadBattery();
      PrintPower(); 
    }]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m by no means a professional coder, but I am comfortable with the Arduino IDE.   I did insert a couple of output comands and I&#8217;ve figured out that the hardware is returning roll and pitch values as expected from the first call to ReadGyroAccel(); but seems to disappear after any call to Update();</p>
<p>    ReadGyroAccel();<br />
      Serial.print(10 * RADTODEG * roll,0);<br />
      Serial.print(&#8220;,&#8221;);<br />
      Serial.print(10 * RADTODEG * pitch,0);<br />
      Serial.println();<br />
    if (compassCounter &gt; 10) { //20Hz<br />
      compassCounter = 0;<br />
      ReadCompass();<br />
      CorrectHeading();<br />
    }<br />
    #if MONGOOSE == 1<br />
    if (baroCounter &gt; 100) { //2Hz<br />
      baroCounter = 0;<br />
      ReadTemperature();<br />
      ReadAltitude();<br />
      PrintBaro();<br />
    }<br />
    #endif<br />
    if (powerOnCounter  200) {  //1 Hz<br />
      powerCounter = 0;<br />
      ReadBattery();<br />
      PrintPower();<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Where&#8217;s the code? by alecmyers</title>
		<link>http://myahrs.wordpress.com/2012/04/11/wheres-the-code/#comment-45</link>
		<dc:creator><![CDATA[alecmyers]]></dc:creator>
		<pubDate>Mon, 15 Apr 2013 01:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=84#comment-45</guid>
		<description><![CDATA[Hi Don,

You (or we) will need to do some debugging to see what&#039;s going wrong. What&#039;s your programming skill level?]]></description>
		<content:encoded><![CDATA[<p>Hi Don,</p>
<p>You (or we) will need to do some debugging to see what&#8217;s going wrong. What&#8217;s your programming skill level?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Where&#8217;s the code? by don</title>
		<link>http://myahrs.wordpress.com/2012/04/11/wheres-the-code/#comment-44</link>
		<dc:creator><![CDATA[don]]></dc:creator>
		<pubDate>Mon, 15 Apr 2013 01:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=84#comment-44</guid>
		<description><![CDATA[I&#039;ve successfully compiled the code and uploaded to my Mongoose, but the result doesn&#039;t look quite right:

Init Baro...
Calibrating device parameters...
Starting Calibration loop...... finished.
Variance of acceleration * 10000 28.16
Detected motion during calibration. Using stored values.
Beginning operation.
$RPYL,nan,nan,nan,-46,0,1001,0,
$RPYL,nan,nan,nan,-78,nan,1002,0,
$RPYL,nan,nan,nan,-103,nan,1010,0,
$RPYL,nan,nan,nan,-128,nan,1011,0,
$RPYL,nan,nan,nan,-152,nan,1016,0,
$RPYL,nan,nan,nan,-166,nan,1019,0,


The roll,pitch, and yaw readings aren&#039;t making it.... any ideas?

Don]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve successfully compiled the code and uploaded to my Mongoose, but the result doesn&#8217;t look quite right:</p>
<p>Init Baro&#8230;<br />
Calibrating device parameters&#8230;<br />
Starting Calibration loop&#8230;&#8230; finished.<br />
Variance of acceleration * 10000 28.16<br />
Detected motion during calibration. Using stored values.<br />
Beginning operation.<br />
$RPYL,nan,nan,nan,-46,0,1001,0,<br />
$RPYL,nan,nan,nan,-78,nan,1002,0,<br />
$RPYL,nan,nan,nan,-103,nan,1010,0,<br />
$RPYL,nan,nan,nan,-128,nan,1011,0,<br />
$RPYL,nan,nan,nan,-152,nan,1016,0,<br />
$RPYL,nan,nan,nan,-166,nan,1019,0,</p>
<p>The roll,pitch, and yaw readings aren&#8217;t making it&#8230;. any ideas?</p>
<p>Don</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on About this project by alecmyers</title>
		<link>http://myahrs.wordpress.com/2012/03/30/hello-world/#comment-42</link>
		<dc:creator><![CDATA[alecmyers]]></dc:creator>
		<pubDate>Fri, 30 Nov 2012 23:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=1#comment-42</guid>
		<description><![CDATA[Hi Rodney,

Thanks for the kind words. Feel free to ask any questions if something&#039;s not clear and I&#039;ll do my best to answer.
To get an airspeed readout is going to take some more work on your part; you&#039;re going to need to connect a second pressure transducer to your pitot line (which of course I can&#039;t do, with a certified aircraft). But it shouldn&#039;t be impossible. 

By the way have you seen the new Dynon D1 Pocket Panel? Kind of like the Mini G, with a display built in.]]></description>
		<content:encoded><![CDATA[<p>Hi Rodney,</p>
<p>Thanks for the kind words. Feel free to ask any questions if something&#8217;s not clear and I&#8217;ll do my best to answer.<br />
To get an airspeed readout is going to take some more work on your part; you&#8217;re going to need to connect a second pressure transducer to your pitot line (which of course I can&#8217;t do, with a certified aircraft). But it shouldn&#8217;t be impossible. </p>
<p>By the way have you seen the new Dynon D1 Pocket Panel? Kind of like the Mini G, with a display built in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on About this project by Rodney Wallace</title>
		<link>http://myahrs.wordpress.com/2012/03/30/hello-world/#comment-41</link>
		<dc:creator><![CDATA[Rodney Wallace]]></dc:creator>
		<pubDate>Fri, 30 Nov 2012 22:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=1#comment-41</guid>
		<description><![CDATA[Hi Alec and greetings from Australia!! First of all I would like to say that you are a bloody legend! This has been an idea of mine for sometime now for my plane, and I am extremely interested in the concept and your methods. I would be lying if I said I understood your entire article, even if I did do physics and maths till the end of high school. Alot of it went over my head! But reading it gives me confifence in your ability to understand and minimise any problems evident. I also was looking at Levil&#039;s AHRS, even before the mini was released. But I have a thing for being able to &quot;make&quot; things myself. Honestly, here I would be riding your coat tail. Levil did have a software version for Windows, which was free to download, called EFIS 1831, of which I still have here on my desktop, which allows the AHRS to be connected by COM PORT. I would say that magnetic heading is not important for me, but altitude and airspeed are, both of which are represented by tapes on the EFIS 1831. So getting the output format from the Levil AHRS for airdata would be interesting. My grand plan would be to run an AH software on a small Windows CE based device, like a car navigation unit, utulising air data, and I must say, that you have already laid a fantastic foundation for this, and I thank you ahead for any information you share with me. Thanks for the opportunity to find you here. my email is rocket11721@gmail.com if you wish to ask any questions of me. Thank you so much, and keep up the great work! Rodney Wallace]]></description>
		<content:encoded><![CDATA[<p>Hi Alec and greetings from Australia!! First of all I would like to say that you are a bloody legend! This has been an idea of mine for sometime now for my plane, and I am extremely interested in the concept and your methods. I would be lying if I said I understood your entire article, even if I did do physics and maths till the end of high school. Alot of it went over my head! But reading it gives me confifence in your ability to understand and minimise any problems evident. I also was looking at Levil&#8217;s AHRS, even before the mini was released. But I have a thing for being able to &#8220;make&#8221; things myself. Honestly, here I would be riding your coat tail. Levil did have a software version for Windows, which was free to download, called EFIS 1831, of which I still have here on my desktop, which allows the AHRS to be connected by COM PORT. I would say that magnetic heading is not important for me, but altitude and airspeed are, both of which are represented by tapes on the EFIS 1831. So getting the output format from the Levil AHRS for airdata would be interesting. My grand plan would be to run an AH software on a small Windows CE based device, like a car navigation unit, utulising air data, and I must say, that you have already laid a fantastic foundation for this, and I thank you ahead for any information you share with me. Thanks for the opportunity to find you here. my email is <a href="mailto:rocket11721@gmail.com">rocket11721@gmail.com</a> if you wish to ask any questions of me. Thank you so much, and keep up the great work! Rodney Wallace</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calibration Part 3: Gyroscopes (continued) by alecmyers</title>
		<link>http://myahrs.wordpress.com/2012/04/09/calibration-part-3/#comment-40</link>
		<dc:creator><![CDATA[alecmyers]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 04:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=74#comment-40</guid>
		<description><![CDATA[You&#039;re looking at the code that does the &#039;update&#039; part of the Kalman filter. 
For nomenclature I followed the very basic Kalman Filter discussion on Wikipedia, at http://en.wikipedia.org/wiki/Kalman_filter#Details

You can see there that x_hat is the state estimator, z is the latest (noisy) measurement, and y_tilde is the residual - the difference between the two, at the time of the update.

In a more general Kalman filter the elements of the state vector and the observation vector have a general linear relationship represented by the matrix H - as the Wikipedia page puts it, H &quot;is the observation model which maps the true state space into the observed space&quot;. In this very simple Kalman filter the state space vector has two entries - the angle to north, and the angular velocity - both of which we measure directly, so H is actually an identity matrix and drops out of the mathematics.

A further simplification is that the measurement of the magnetic angle is stored in the form of a displacement of DCM north to measured magnetic north, so it&#039;s already exactly the residual - there is nothing to subtract - so that gives you the u- component of the y_tilde 2-vector.

The v- component of the y_tilde residual is the difference between the observed angular velocity about the earth-z axis and the estimator of that same variable.

The nice thing about implementing a Kalman Filter is that you get the ducks lined up in a row by thinking carefully about what the elements of the state vector should be, and how to calculate the residual from your measurements. After that you simply crank the handle of the equations and  make use of the fact that the theory is already accounted for.

I hope that makes sense. Please remember also that I know very little about Kalman Filters and this is my only attempt to implement one. There may be errors in what I have done!]]></description>
		<content:encoded><![CDATA[<p>You&#8217;re looking at the code that does the &#8216;update&#8217; part of the Kalman filter.<br />
For nomenclature I followed the very basic Kalman Filter discussion on Wikipedia, at <a href="http://en.wikipedia.org/wiki/Kalman_filter#Details" rel="nofollow">http://en.wikipedia.org/wiki/Kalman_filter#Details</a></p>
<p>You can see there that x_hat is the state estimator, z is the latest (noisy) measurement, and y_tilde is the residual &#8211; the difference between the two, at the time of the update.</p>
<p>In a more general Kalman filter the elements of the state vector and the observation vector have a general linear relationship represented by the matrix H &#8211; as the Wikipedia page puts it, H &#8220;is the observation model which maps the true state space into the observed space&#8221;. In this very simple Kalman filter the state space vector has two entries &#8211; the angle to north, and the angular velocity &#8211; both of which we measure directly, so H is actually an identity matrix and drops out of the mathematics.</p>
<p>A further simplification is that the measurement of the magnetic angle is stored in the form of a displacement of DCM north to measured magnetic north, so it&#8217;s already exactly the residual &#8211; there is nothing to subtract &#8211; so that gives you the u- component of the y_tilde 2-vector.</p>
<p>The v- component of the y_tilde residual is the difference between the observed angular velocity about the earth-z axis and the estimator of that same variable.</p>
<p>The nice thing about implementing a Kalman Filter is that you get the ducks lined up in a row by thinking carefully about what the elements of the state vector should be, and how to calculate the residual from your measurements. After that you simply crank the handle of the equations and  make use of the fact that the theory is already accounted for.</p>
<p>I hope that makes sense. Please remember also that I know very little about Kalman Filters and this is my only attempt to implement one. There may be errors in what I have done!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calibration Part 3: Gyroscopes (continued) by Rud Merriam</title>
		<link>http://myahrs.wordpress.com/2012/04/09/calibration-part-3/#comment-39</link>
		<dc:creator><![CDATA[Rud Merriam]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 04:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=74#comment-39</guid>
		<description><![CDATA[Around line 117 in the DCM file. These lines are: 

//Calculate residual:
  //y_tilde = zed - x_hat
  //can do this componentwise size H is identity
  //angle resid. observed directly
  y_tilde.u = atan2(-vMag.y, vMag.x); 

  //this depends only on roll and pitch angles, not heading:
  y_tilde.v = vGyro.dot(R.Z) - x_hat.v;


The line number is probably off because I have converted the file to C++ adding header file includes, etc.]]></description>
		<content:encoded><![CDATA[<p>Around line 117 in the DCM file. These lines are: </p>
<p>//Calculate residual:<br />
  //y_tilde = zed &#8211; x_hat<br />
  //can do this componentwise size H is identity<br />
  //angle resid. observed directly<br />
  y_tilde.u = atan2(-vMag.y, vMag.x); </p>
<p>  //this depends only on roll and pitch angles, not heading:<br />
  y_tilde.v = vGyro.dot(R.Z) &#8211; x_hat.v;</p>
<p>The line number is probably off because I have converted the file to C++ adding header file includes, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calibration Part 3: Gyroscopes (continued) by alecmyers</title>
		<link>http://myahrs.wordpress.com/2012/04/09/calibration-part-3/#comment-38</link>
		<dc:creator><![CDATA[alecmyers]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 03:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=74#comment-38</guid>
		<description><![CDATA[Hi Rud,


Which line are you looking at?]]></description>
		<content:encoded><![CDATA[<p>Hi Rud,</p>
<p>Which line are you looking at?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calibration Part 3: Gyroscopes (continued) by Rud Merriam</title>
		<link>http://myahrs.wordpress.com/2012/04/09/calibration-part-3/#comment-37</link>
		<dc:creator><![CDATA[Rud Merriam]]></dc:creator>
		<pubDate>Mon, 26 Nov 2012 03:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://myahrs.wordpress.com/?p=74#comment-37</guid>
		<description><![CDATA[Hi Alec,

I am working on a robotics project using gyro and accelerometer. A GPS or magnetometer cannot be used for the project. It has been to many years since I took math in college so it is hard going to understand the theory papers. So I&#039;ve been looking for code.

My project runs on a PC in standard C++. I grabbed your code to work with but am hung up on the meaning of the variable &#039;zed&#039; that is used to in a calculation for &quot;y_tilde&quot;. Can you tell me what it is supposed to be?

The project information in on my website if you are interested.

Rud]]></description>
		<content:encoded><![CDATA[<p>Hi Alec,</p>
<p>I am working on a robotics project using gyro and accelerometer. A GPS or magnetometer cannot be used for the project. It has been to many years since I took math in college so it is hard going to understand the theory papers. So I&#8217;ve been looking for code.</p>
<p>My project runs on a PC in standard C++. I grabbed your code to work with but am hung up on the meaning of the variable &#8216;zed&#8217; that is used to in a calculation for &#8220;y_tilde&#8221;. Can you tell me what it is supposed to be?</p>
<p>The project information in on my website if you are interested.</p>
<p>Rud</p>
]]></content:encoded>
	</item>
</channel>
</rss>
