public class PlanUtil
extends java.lang.Object
PlanStatistics| Modifier and Type | Method and Description |
|---|---|
static PlanType |
changePlanVehiclesAndAdjustSettings(PlanType plan,
java.util.Collection<VehicleType> newVehicles)
Will change the plan and return it changed with the settings adjusted (for the first vehicle).
|
static java.lang.String |
estimatedTime(java.util.Vector<LocatedManeuver> mans) |
static java.lang.String |
getDelayStr(LocationType previousPos,
PlanType plan) |
static LocationType |
getEndLocation(PlanType plan)
This method will compute the final location of the given plan
|
static double |
getEstimatedDelay(LocationType previousPos,
Maneuver m) |
static double |
getEstimatedDelay(LocationType previousPos,
PlanType plan)
This method estimates the total time
|
static LocationType |
getFirstLocation(PlanType plan)
This method will compute the initial location of the given plan
|
static java.util.Vector<LocatedManeuver> |
getLocationsAsSequence(PlanType plan)
This method will sequence all maneuvers and return those whose positions are known
|
static double |
getMaxPlannedDepth(java.util.Vector<LocatedManeuver> mans) |
static double |
getMinPlannedDepth(java.util.Vector<LocatedManeuver> mans) |
static double |
getPlanLength(PlanType plan)
This method computes the total length of a plan, in meters
|
static double |
getPlanLength(java.util.Vector<LocatedManeuver> mans)
This method computes the total length of maneuver sequence, in meters
|
static javax.swing.JMenu |
getPlanStatisticsAsJMenu(PlanType plan,
java.lang.String title) |
static java.lang.String |
getPlanStatisticsAsText(PlanType plan,
java.lang.String title,
boolean simpleTextOrHTML,
boolean asHTMLFragment) |
static java.util.ArrayList<ManeuverLocation> |
getPlanWaypoints(PlanType plan) |
static ManeuverLocation.Z_UNITS[] |
getValidZUnitsForVehicle(java.lang.String vehicle) |
static ManeuverLocation.Z_UNITS[] |
getValidZUnitsForVehicle(VehicleType vehicle) |
static int |
numManeuvers(PlanType plan) |
static void |
setPlanAltitude(PlanType plan,
double altitude)
This method will change the altitude of all maneuvers in a plan
|
static void |
setPlanDepth(PlanType plan,
double depth)
This method will change the depth of all maneuvers in a plan
|
static void |
setPlanSpeed(PlanType plan,
double speedMps)
This method will change the speed of all maneuvers in a plan
|
static void |
setPlanZ(PlanType plan,
double z,
ManeuverLocation.Z_UNITS units)
This method will change the depth/altitude of all maneuvers in a plan
|
java.util.Vector<SystemPositionAndAttitude> |
simulatePlan(LocationType loc,
PlanType plan)
This method will simulate a given plan and return a series of system states
|
java.util.Vector<SystemPositionAndAttitude> |
simulatePlan(PlanType plan)
This method will simulate a given plan and return a series of system states
|
public static java.util.Vector<LocatedManeuver> getLocationsAsSequence(PlanType plan)
plan - A given planpublic static void setPlanSpeed(PlanType plan, double speedMps)
plan - A given planspeedMps - The speed to be set to all maneuvers (that accept a speed parameter) in meters per secondpublic static void setPlanDepth(PlanType plan, double depth)
plan - A given plandepth - The depth to be set to all maneuvers (that accept a depth parameter) in meterssetPlanZ(PlanType, double, pt.lsts.neptus.mp.ManeuverLocation.Z_UNITS)public static void setPlanAltitude(PlanType plan, double altitude)
plan - A given plandepth - The altitude to be set to all maneuvers (that accept a depth parameter) in meterssetPlanZ(PlanType, double, pt.lsts.neptus.mp.ManeuverLocation.Z_UNITS)public static void setPlanZ(PlanType plan, double z, ManeuverLocation.Z_UNITS units)
plan - A given planz - The z value to be set in the planunits - The z units to be usedManeuverLocation.Z_UNITSpublic static LocationType getFirstLocation(PlanType plan) throws java.lang.Exception
plan - A planjava.lang.Exception - In case no maneuvers of the plan have a known locationpublic static LocationType getEndLocation(PlanType plan) throws java.lang.Exception
plan - A planjava.lang.Exception - In case no maneuvers of the plan have a known locationpublic java.util.Vector<SystemPositionAndAttitude> simulatePlan(PlanType plan) throws java.lang.Exception
plan - The plan to be simulatedjava.lang.Exception - In case the initial position of the plan cannot be computedpublic java.util.Vector<SystemPositionAndAttitude> simulatePlan(LocationType loc, PlanType plan) throws java.lang.Exception
plan - The plan to be simulatedloc - The initial location to be used for the simulationjava.lang.Exception - In case the initial position of the plan cannot be computedpublic static java.util.ArrayList<ManeuverLocation> getPlanWaypoints(PlanType plan)
public static double getPlanLength(PlanType plan)
plan - A given plangetPlanLength(Vector)public static double getPlanLength(java.util.Vector<LocatedManeuver> mans)
mans - A sequence of located maneuverspublic static double getEstimatedDelay(LocationType previousPos, PlanType plan) throws java.lang.Exception
previousPos - plan - java.lang.Exceptionpublic static double getEstimatedDelay(LocationType previousPos, Maneuver m) throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getDelayStr(LocationType previousPos, PlanType plan) throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String estimatedTime(java.util.Vector<LocatedManeuver> mans)
public static double getMaxPlannedDepth(java.util.Vector<LocatedManeuver> mans)
public static double getMinPlannedDepth(java.util.Vector<LocatedManeuver> mans)
public static int numManeuvers(PlanType plan)
public static javax.swing.JMenu getPlanStatisticsAsJMenu(PlanType plan, java.lang.String title)
public static java.lang.String getPlanStatisticsAsText(PlanType plan, java.lang.String title, boolean simpleTextOrHTML, boolean asHTMLFragment)
public static PlanType changePlanVehiclesAndAdjustSettings(PlanType plan, java.util.Collection<VehicleType> newVehicles)
plan - newVehicles - public static ManeuverLocation.Z_UNITS[] getValidZUnitsForVehicle(java.lang.String vehicle)
vehicle - public static ManeuverLocation.Z_UNITS[] getValidZUnitsForVehicle(VehicleType vehicle)
vehicle - Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.