This project demonstrates a visual simulation where a drone moves within a city map, detects objects (humans and vehicles), and provides real-time updates on the drone’s position and detected objects.
The project consists of the following files:
main.cpp: The entry point of the program. It sets up the simulation and runs the main loop.Drone.h and Drone.cpp: Define and implement the Drone class, which represents the drone in the simulation.CityMap.h and CityMap.cpp: Define and implement the CityMap class, which represents the city environment.Object.h and Object.cpp: Define and implement the Object class, which represents humans and vehicles in the city.CMakeLists.txt: CMake configuration file (not used in the current build process).build.bat: Batch file for building the project using MSVC compiler.To build the project, you’ll need Microsoft Visual C++ compiler (MSVC). This comes with Visual Studio or the Build Tools for Visual Studio.
build.bat
After building the project:
DroneSurveillance.exe
Below the map, you’ll see the drone’s current position and the number of objects it has detected.
You can modify various aspects of the simulation:
main.cppCityMap.cppDrone.cppFeel free to fork this project and submit pull requests with improvements or additional features. If you’re new to C++, this project serves as a good starting point to understand basic concepts like classes, object-oriented programming, and simple simulations.
Enjoy exploring and expanding upon this Drone Surveillance simulation!