Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Airspeed Sensor Performance and Enable User Defined XML Configuration #30

Merged
merged 5 commits into from
Oct 28, 2020

Conversation

mvacanti
Copy link
Contributor

Proposal
This proposal addresses two items associated with the airspeed sensor: 1)Improve Airspeed Sensor performance by using differential pressure directly from JSBSim rather than inferred 2)Enable user-defined JSBSim property mapping for airspeed sensor and define a new JSBSim airspeed sensor system file.

Description of Change 1:
Simplify differential pressure calculation from inferring from ground speed from:

double diff_pressure = 0.005f * rho * vel_a * vel_a + diff_pressure_noise;

to:

std::string _jsb_diff_pressure = "aero/qbar-psf";
double SensorAirspeedPlugin::getDiffPressure() { return psfToMbar(_sim_ptr->GetPropertyValue(_jsb_diff_pressure)); }
double diff_pressure = getDiffPressure();

Before Change 1:
NOTE: Noise / bias removed for comparison purposes and no wind conditions.
Observe that the True Airspeed does not track GPS velocity (ground truth):
before-fix

After Change 1
NOTE: Noise / bias removed for comparison purposes and no wind conditions.
Observe that the True Airspeed does track GPS velocity (ground truth):
after-fix

Description of Change 2:
Enable user mapped JSBSim variables as inputs (as per previous) and add sensor airspeed system file as per previous. The system file includes a bias model related to sensor performance effects of angle of attack and side slip angle. The system files were not added to the Rascal or Malolo in order to prevent conflicts.

To Test:
Modify rascal or malolo JSBSim file and add new system sensor file: <system file="px4_default_airspeed_sensor"/>
Modify rascal or malolo config file and add <jsb_diff_pressure>px4/qbar-psf</jsb_diff_pressure>
OR <jsb_diff_pressure>px4/biased-qbar-psf</jsb_diff_pressure> to observe effects with high alpha or beta.

@Jaeyoung-Lim Jaeyoung-Lim added the enhancement New feature or request label Oct 23, 2020
@Jaeyoung-Lim Jaeyoung-Lim requested a review from bkueng October 23, 2020 07:43
@mvacanti mvacanti marked this pull request as ready for review October 26, 2020 11:45
Copy link
Contributor

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks much better!

@Jaeyoung-Lim Jaeyoung-Lim merged commit 610ca97 into Auterion:master Oct 28, 2020
@mvacanti mvacanti deleted the pr-airspeed-xml-mapping branch November 1, 2020 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants