main.cpp 786 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include <iostream>
  2. #include <ctime>
  3. #include <iomanip>
  4. #include <zconf.h>
  5. #include "throttle.h"
  6. #include "drone.h"
  7. using namespace std;
  8. using namespace main_stronglogic;
  9. float lng, lat;
  10. int mission_time;
  11. int distance_travelled;
  12. drone my_drone;
  13. int main() {
  14. std::cout << "Beginning drone program" << std::endl;
  15. std::cout << "Please enter geolocation coordinates" << std::endl << "Longitude:" << std::endl;
  16. std::cin >> lng;
  17. std::cout << std::endl << "Latitude:" << std::endl;
  18. std::cin >> lat;
  19. my_drone.set_location(lng,lat);
  20. cout << "Enter mission length in minutes" << endl;
  21. cin >> mission_time;
  22. distance_travelled = my_drone.explore(mission_time);
  23. cout << "Drone has travelled " << distance_travelled << " km" << endl;
  24. return 0;
  25. }