Drones are increasingly used for surveillance, delivery, and research. However, simulating their real-time movement, weather conditions, and return paths is challenging. This prototype provides a virtual environment to test drone movement with live weather monitoring.
This project simulates a drone's movement through a set of GPS coordinates uploaded from a JSON file. The drone moves step by step, tracing its path dynamically, and allows control with Play/Pause buttons.
This Drone Simulation application enables users to:
- Upload flight path coordinates.
- Simulate real-time drone movement.
- Monitor weather conditions at the drone's location.
- Auto-return to the starting point after reaching the destination.
Load a JSON file containing GPS coordinates for the drone’s movement.
The drone moves dynamically along the provided path.
Displays real-time weather conditions at the drone’s current location using OpenWeatherMap API.
- Play: Starts the drone’s movement.
- Pause: Stops the movement and resumes from the last point.
The drone automatically returns to the starting point after reaching the last coordinate.
Displays the drone's path and current position on a dynamic map.
Measures and displays the total distance traveled by the drone.
- Frontend: React.js, css
- Leaflet.js (Map visualization)
- APIs: OpenWeatherMap API, OpenStreetMap API
- Version Control: Git, GitHub
- Node.js v18+
- npm or yarn
git clone https://github.com/MaheshSuthar119/Dron_simulation.git
npm install
WEATHER_APIKEY=your_api_key_here
npm start
- Upload a JSON file with flight coordinates.
- Click Start Simulation to move the drone.
- View the live weather updates at the drone's location.
- The drone will automatically return to the starting point.
<TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
/>
the in Leaflet uses an API (OpenStreetMap tile service) to fetch map tiles dynamically. The URL "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" is an endpoint that retrieves map tiles based on zoom level ({z}), x and y coordinates ({x}, {y}), and subdomains ({s}).
https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&units=metric&appid=YOUR_API_KEY
| Parameter | Description |
|---|---|
| lat | Latitude of the location |
| lon | Longitude of the location |
| appid | Your OpenWeatherMap API key |
timestamp,lat,lng
2025-02-20T12:00:00Z,19.076,72.877
2025-02-20T12:01:00Z,18.520,73.856
2025-02-20T12:02:00Z,28.613,77.209
freecompress-Dron_Simulation_video.1.1.mp4
Mahesh Suthar