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

mavlink: GLOBAL_POSITION_INT send without lat/lon availability #15308

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

dagar
Copy link
Member

@dagar dagar commented Jul 12, 2020

@DonLakeFlyer as discussed.

  • the altitude and velocity portions of this message are still relevant without GPS lat/lon

I'm not crazy about the idea of sending this continuously without a way to indicate the lat & lon aren't valid, but let me know what you'd prefer.

 - the altitude and velocity portions of this message are still relevant
without GPS lat/lon
@dagar dagar requested a review from DonLakeFlyer July 12, 2020 14:32
@BazookaJoe1900
Copy link
Member

I am highly agree with this change (I actually made similar change on my repo too..)

msg.lat = gpos.lat * 1e7;
msg.lon = gpos.lon * 1e7;
// lat, lon: Latitude, Longitude in degE7
vehicle_global_position_s gpos{};
Copy link
Contributor

Choose a reason for hiding this comment

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

So lat/lon are just going to be 0 if they are not available?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct (once vehicle_local_position is publishing). This is the behavior @DonLakeFlyer requested that already has special handling in QGC for other platforms.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would have preferred explicit handling, but as long as it's lat=lon=0 I think it's fine.

Copy link
Contributor

@julianoes julianoes Jul 14, 2020

Choose a reason for hiding this comment

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

Ok, I'll have to add a check in MAVSDK then. And we should document it in the MAVLink spec.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about using int32_max for both instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

What about using int32_max for both instead?

Yes that would work (I also suggested it), but I think it's too late with the significant existing deployed usage. We could still try to get the mavlink spec updated with the explicit INT32_MAX, but it would be in addition to the lat=lon=0 special case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, if it's already deployed then we might as well document 0/0.

Copy link
Contributor

Choose a reason for hiding this comment

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

@LorenzMeier speak up if you are not ok with this!

@DonLakeFlyer
Copy link
Contributor

FYI: ArduPilot already does 0/0.

@dagar dagar merged commit ad14796 into master Jul 17, 2020
@dagar dagar deleted the pr-mavlink_global_int_continuous branch July 17, 2020 14:46
@LorenzMeier
Copy link
Member

I haven't seen the notification for this - I strongly disagree with this, as we really shouldn't be adding ANYTHING that induces invalid data without proper flags. This really should have been done as a MAVLink packet extension with either altitude in a separate message or a flag for validity added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants