Examples of MissionPath


Examples of com.ike.rwdccalc.Objects.MissionPath

          price,
          new String[] {
            "Plane One: " + x, "Plane Two: " + max
          },
          new MissionPath[] {
            new MissionPath(
              small.getDistanceFromCenter(),
              small.getAngleFromCenter(),
              small.getSegmentType()),
            new MissionPath(
              big.getDistanceFromCenter(),
              big.getAngleFromCenter(),
              big.getSegmentType())
          },
          x, time
        ));
       
      }
      break;
    // Three planes
    case 3:
      for (int x = 1; x < max; x+=increment) {
        first = max - x;
        small = CalculatingTools.calculate(true, true, 0, x,
            footprintWidth);
        for (int y = x + 1; y < first; y+=10) {
          min = x + y;
          middle = CalculatingTools.calculate(true, true, x, min,
              footprintWidth);
          big = CalculatingTools.calculate(true, true, min, max,
              footprintWidth);

          time = Math.max(small.getAnswerInFeet(),
              middle.getAnswerInFeet());
          time = Math.max(time, big.getAnswerInFeet());
          time = time / speed;

          price = time * pricePerHour * 3;

          distance.add(new RadiusIteration(
            price,
            new String[] {
              "Plane One: " + x, "Plane Two: " + min, "Plane Three " + max
            },
            new MissionPath[] {
              new MissionPath(
                small.getDistanceFromCenter(),
                small.getAngleFromCenter(),
                small.getSegmentType()),
              new MissionPath(
                middle.getDistanceFromCenter(),
                middle.getAngleFromCenter(),
                middle.getSegmentType()),
              new MissionPath(
                big.getDistanceFromCenter(),
                big.getAngleFromCenter(),
                big.getSegmentType())
            },
            x, time
          ));
        }
      }
      break;
    // Fource planes
    case 4:
      for (int x = 1; x < max; x+=increment) {
        first = max - x;
        small = CalculatingTools.calculate(true, true, 0, x,
            footprintWidth);
        for (int y = x + 1; y < first; y+=10) {
          min = x + y;
          second = max - min;
          middle = CalculatingTools.calculate(true, true, x, min,
              footprintWidth);
          for (int z = y + 1; z < second; z+=10) {
            mid = min + z;
            bigger = CalculatingTools.calculate(true, true, min,
                mid, footprintWidth);
            big = CalculatingTools.calculate(true, true, mid, max,
                footprintWidth);

            time = Math.max(small.getAnswerInFeet(),
                middle.getAnswerInFeet());
            time = Math.max(time, bigger.getAnswerInFeet());
            time = Math.max(time, big.getAnswerInFeet());

            time = time / speed;

            price = time * pricePerHour * 4;

            distance.add(new RadiusIteration(
              price,
              new String[] {
                "Plane One: " + x, "Plane Two: " + min, "Plane Three " + mid, "Plane Four: " + max
              },
              new MissionPath[] {
                new MissionPath(
                  small.getDistanceFromCenter(),
                  small.getAngleFromCenter(),
                  small.getSegmentType()),
                new MissionPath(
                  middle.getDistanceFromCenter(),
                  middle.getAngleFromCenter(),
                  middle.getSegmentType()),
                new MissionPath(
                  bigger.getDistanceFromCenter(),
                  bigger.getAngleFromCenter(),
                  bigger.getSegmentType()),
                new MissionPath(
                  big.getDistanceFromCenter(),
                  big.getAngleFromCenter(),
                  big.getSegmentType())
              },
              x, time
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.