- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimMain.cpp
More file actions
Latest commit
28 lines (22 loc) · 676 Bytes
/
Copy pathSimMain.cpp
File metadata and controls
28 lines (22 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include"header/Sim.h"
#include"header/Drone.h"
intmain()
{
// It deletes the previously created .csv files
std::system("python deleteCsv.py");
// Time step
float dt = 1e-2;
// Start and final time of the simulation
float startTime = 0.0;
float finalTime = 10000.0;
// Number of drones to be created
int numberOfDrones = 1;
// Initial distribution between drones
float initialDistBtwDrns = 2.0;
// New Sim entity
Sim *sim = newSim(dt, startTime, finalTime, numberOfDrones, initialDistBtwDrns);
// Execution of the simulation
sim->Run();
// Save results to the csv file
sim->saveResults2CSV();
}