public static Survey buildSurvey(MavLinkDrone drone, Survey survey) { org.droidplanner.services.android.core.mission.Mission droneMission = drone == null ? null : drone.getMission(); SurveyImpl updatedSurveyImpl = (SurveyImpl) ProxyUtils.getMissionItemImpl(droneMission, survey); return (Survey) ProxyUtils.getProxyMissionItem(updatedSurveyImpl); }
public static StructureScanner buildStructureScanner(MavLinkDrone drone, StructureScanner item) { org.droidplanner.services.android.core.mission.Mission droneMission = drone == null ? null : drone.getMission(); StructureScannerImpl updatedScan = (StructureScannerImpl) ProxyUtils.getMissionItemImpl(droneMission, item); StructureScanner proxyScanner = (StructureScanner) ProxyUtils.getProxyMissionItem(updatedScan); return proxyScanner; }
public static Mission getMission(MavLinkDrone drone) { Mission proxyMission = new Mission(); if (drone == null) return proxyMission; org.droidplanner.services.android.core.mission.Mission droneMission = drone.getMission(); List<org.droidplanner.services.android.core.mission.MissionItem> droneMissionItems = droneMission.getComponentItems(); proxyMission.setCurrentMissionItem((short) drone.getMissionStats().getCurrentWP()); if (!droneMissionItems.isEmpty()) { for (org.droidplanner.services.android.core.mission.MissionItem item : droneMissionItems) { proxyMission.addMissionItem(ProxyUtils.getProxyMissionItem(item)); } } return proxyMission; }