When detailed search scans a point of interest, it sends a VLD message to GCS if the point of interest is the actual target. If the point of interest is a false positive, no message is sent. In both cases, the drone moves on to the next point of interest in the vector afterwards.
Create a new message that is sent to the GCS when a false positive is found. The important section of code to look at is from line 626 to line 652 of PNav.cpp:
This section of code checks if the drone is within a certain boundary of the point of interest. If so, it will perform a detailed search, and then increment the current waypoint (so it can move on to the next point of interest) using mission_waypoints.current_wp++;
std::this_thread::sleep_for(std::chrono::milliseconds(2500)) allows the CV thread to run for 2.5 seconds, scanning the point of interest, before moving on to the next waypoint. Modify the code after this statement so that PNav asks the CV thread if the ball was found (using CeeToPee.cv_found()), and if not, send a message to the GCS by setting vehicle_status.gcs_update and calling UpdateGCS().
When detailed search scans a point of interest, it sends a VLD message to GCS if the point of interest is the actual target. If the point of interest is a false positive, no message is sent. In both cases, the drone moves on to the next point of interest in the vector afterwards.
Create a new message that is sent to the GCS when a false positive is found. The important section of code to look at is from line 626 to line 652 of PNav.cpp:
This section of code checks if the drone is within a certain boundary of the point of interest. If so, it will perform a detailed search, and then increment the current waypoint (so it can move on to the next point of interest) using mission_waypoints.current_wp++;
std::this_thread::sleep_for(std::chrono::milliseconds(2500)) allows the CV thread to run for 2.5 seconds, scanning the point of interest, before moving on to the next waypoint. Modify the code after this statement so that PNav asks the CV thread if the ball was found (using CeeToPee.cv_found()), and if not, send a message to the GCS by setting vehicle_status.gcs_update and calling UpdateGCS().
Document the new message type you have created on https://docs.google.com/document/d/16iQx5FT5fBzUKCwwsokNy-8_jHNTtocB2g0SLxVtzUk/edit?usp=sharing