-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed air density as a parameter. Using ideal gas law
- Loading branch information
1 parent
0ee7dde
commit 4173d59
Showing
7 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4173d59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The baro sensor temperature measures the sensor chip's internal temperature and not the outside air temperature.
Rather than rho_ = (0.0289644 * data_.baro_pressure) / (8.31432 * data_.baro_temperature);
Assume we are in a standard atmosphere:
rho_ = 1.225 * pow( data_.baro_pressure/101325.0, 0.809736894596450 );
4173d59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks. I was going to ask about that. Do you have a reference for that equation?$\rho = \rho_{STP} * (P / P_0)^{x}$ --> I'm not sure where the exponent comes from.
4173d59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exponent comes from the hydrostatic model of the atmosphere. In terms of those things, the exponent = 1-RGamma/g, where R = 287.052874 J/kg-K, Gamma = 6.5e-3 K/m, and g = 9.80665 m/s^2
1-RGamma/g = 0.809736894_760188_. The last few digits are different from the one in my equation above because of rounding.
4173d59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a reference. for the pressure vs. altitude: http://mae-nas.eng.usu.edu/MAE_6530_Web/New_Course/Section4/[Section4.2](http://mae-nas.eng.usu.edu/MAE_6530_Web/New_Course/Section4/Section4.2.pdf).pdf With a little more algebra and you get the relationship for rho vs. pressure.
4173d59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!