-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
GCS_MAVLink: added ALTITUDE message #141 #21652
Conversation
if (rangefinder != nullptr) { | ||
const AP_RangeFinder_Backend *s = rangefinder->find_instance(ROTATION_PITCH_270); | ||
if (s != nullptr) { | ||
bottom_clearance = s->distance_cm()*0.01; |
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.
If this is out of range somewhere shouldn't we fall back to terrain if we have it, and failing that fall back to relative? I don't see any masking/flags to let a GCS otherwise differentiate on these values.
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 think so. I'm actually confused as how this would be different to terrain - except that perhaps terrain wouldn't fall back to 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.
Technically terrain should be ground level, while clearance would include things like top of tree, building, whatever rose off the ground below you.
73dce42
to
a3b26b3
Compare
a3b26b3
to
9068c3b
Compare
I brought this up for discussion at the DevCall. I've also fixed the compilation so we can see what it costs. A few things came up. The first is that @hendjoshsr71 pointed out this isn't really a good "all in one altitude message". It doesn't include any information about qnh altitudes, perhaps the most important thing up-and-coming. tridge suggested we could add a "is_for_current_location" boolean to the No determination was come to - I ran out of time to progress this on the call, but at least we have more talking points. |
Durandal:
|
if (!_ahrs.get_location(loc)) { | ||
return; | ||
} | ||
const float altitude_amsl = global_position_int_alt() * 0.001; //meters above ground/sea level |
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.
Is 0.001 correct here?
#endif | ||
|
||
float bottom_clearance = -1; //mavlink specs value for unavailable | ||
const RangeFinder *rangefinder = RangeFinder::get_singleton(); |
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.
Why not use AP?
float bottom_clearance = -1; //mavlink specs value for unavailable | ||
const RangeFinder *rangefinder = RangeFinder::get_singleton(); | ||
if (rangefinder != nullptr) { | ||
const AP_RangeFinder_Backend *s = rangefinder->find_instance(ROTATION_PITCH_270); |
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 would likely benefit from an earth frame rotation.
17d4d78
to
b4af3cd
Compare
b4af3cd
to
c332c64
Compare
No description provided.