示例#1
0
  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);
  }
示例#2
0
  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;
  }
示例#3
0
  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;
  }