Exemple #1
0
 public MissionDebugger(CameraDefinition cameraDefinition, SurveyArea surveyArea, Mission mission, Transform droneTransform)
 {
     this.cameraDefinition = cameraDefinition;
     this.surveyArea       = surveyArea;
     this.flightPlan       = mission.CalculateFlightPlan();
     this.droneTransform   = droneTransform;
 }
Exemple #2
0
    public MissionExecution(CameraDefinition cameraDefinition, SurveyArea surveyArea, Georeferencing georeferencing, Mission mission, Transform droneTransform, float flightSpeed, string folderPath)
    {
        // Calculate the flight plan
        FlightPlan flightPlan = mission.CalculateFlightPlan();

        Debug.Log(string.Format("Mission calculated. Will take {0} images.", flightPlan.waypoints.Count));

        // Build helpers that will move the drone, take the images, and log everything to later geotag the images
        droneMovement     = new DroneMovement(droneTransform, flightPlan, flightSpeed);
        waypointProcessor = new WaypointProcessor(cameraDefinition, surveyArea, georeferencing, flightPlan.waypoints.Count, folderPath);

        // Save all configuration as XML
        SaveXML(cameraDefinition, surveyArea, flightPlan, georeferencing, folderPath);

        // Add event listeners
        droneMovement.OnReachedWaypoint           += ReachedWaypoint;
        waypointProcessor.OnProcessedAllWaypoints += () => OnMissionFinished?.Invoke();
    }