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

predict crash location on GCS #24

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

EwoudSmeur
Copy link
Member

I made a GCS marker to predict the ballistic crash position.

I tried to follow this commit: b0e1641

I had to take some time to understand the code structure, but probably I still butchered it. Right now there is only one crashItem, which would be a problem if you have multiple drones. I guess it can be done like with DCSHOT with the QList?

@Fabien-B
Copy link
Collaborator

Since there is a crashItem for each drone, I would put it in the ACItemManager, which hold references to every objects linked to an AC.
It was previously all in the MapWidget, but it quickly became unmanageable, so I created the ACItemManager to organize a little bit. It also made it easier to remove an AC (see the removeItems method).

I would also make that optional, as I can imagine it could be a bit disturbing if this waypoint is not desired.
You can use the settings and GlobalConfig : example

I will try writing a bit of a doc to explain how to use it.

@EwoudSmeur
Copy link
Member Author

Thanks for the tips @Fabien-B! I'll modify accordingly.

@EwoudSmeur EwoudSmeur marked this pull request as ready for review February 21, 2024 14:42
@EwoudSmeur
Copy link
Member Author

@Fabien-B I added the prediction as an attribute of an AC and I added a checkbox to enable the display of the crash prediction. The thing I struggled with was to hide the the waypointItem. I now made it very small, but still visible... Maybe you know an easy way to do this?

@Fabien-B
Copy link
Collaborator

I did not anticipated the need to hide a waypoint, as I usually just remove it.
Discussing with Florian, I understand the need of constantly calculating its position, even though it's not displayed, to being able to display it once the drone is crashed in order to search it.
It's probably ok to leave it like that for now, and will think how to hide items on the map.

@Fabien-B
Copy link
Collaborator

I added the virtual method void setVisible(bool visible) on MapItem. Can you rebase on master and use it ?

@EwoudSmeur
Copy link
Member Author

Thank you so much @Fabien-B, it works like a charm!

I see your point that it makes sense to compute the crash prediction in the background to be able to display it even after losing the datalink. One could also replay the log and then enable the feature, but it would be less convenient.

@Fabien-B Fabien-B merged commit 4df9963 into paparazzi:master Feb 21, 2024
@EwoudSmeur EwoudSmeur deleted the crash_prediction branch February 22, 2024 12:06
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.

2 participants