-
Notifications
You must be signed in to change notification settings - Fork 690
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
mavproxy_soar: Add initial soaring display #1500
Conversation
73a4b5a
to
0238a68
Compare
MAVProxy/modules/mavproxy_soar.py
Outdated
print("No y") | ||
return | ||
|
||
home = self.module('wp').get_home() |
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.
This module might not be loaded.
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.
.... also, are these thermals really home-relative or are they navigation-origin-relative?
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.
I added a module check for wp, good idea.
.... also, are these thermals really home-relative or are they navigation-origin-relative?
Per SoaringController::update_thermalling
:
const AP_AHRS &_ahrs = AP::ahrs();
if (!_ahrs.get_relative_position_NED_home(current_position)) {
return;
}
...
// update the filter
_ekf.update(_vario.reading, current_position.x, current_position.y, wind_drift.x, wind_drift.y);
Based on that, I take it as home-relative. Not great, but that's how it is today. Seems like moving home would break stuff. Anyways, yea, I currently draw them relative to home to match.
Added the clearing stale thermals! Here's a brief recording of it working. |
(0, 255, 255), | ||
linewidth=2) | ||
for mp in self.module_matching('map*'): | ||
self._last_draw_time = time.time() |
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.
I was thinking timeout might be based on message retrieval time rather than draw time.
That way when the vehicle loses the thermal the GCS gets updated to remove the thermal hint
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.
I was thinking timeout might be based on message retrieval time rather than draw time.
That way when the vehicle loses the thermal the GCS gets updated to remove the thermal hint
The estimator stops running once you exit thermal mode when you lose the thermal - you stop getting packets. Functionally, message receipt calls draw, so it's the same time anyways.
Signed-off-by: Ryan Friedman <[email protected]>
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.
LGTM
Purpose
Add an initial soaring module, which displays the location and estimated radius of the thermal from AP's thermal soaring estimator.
Once we have a mavlink packet definition for the thermal estimator, we can move to that from NAMED_VALUE_FLOAT.
Demo
Enable the NVT for the EKF and run the soaring autotest without speedup.
Terminal 1:
./Tools/autotest/autotest.py build.Plane test.Plane.Soaring --map --speedup=1 --waf-configure-args "--define HAL_SOARING_NVF_EKF_ENABLED=1"
Terminal 2:
Once the vehicle hits the thermal southwest of home, it will show up on the map. You can see the estimator converge on the thermal.