Class FuelUse

java.lang.Object
org.deltava.beans.acars.FuelUse

public class FuelUse extends Object
A bean to track fuel usage and in-flight refueling on ACARS flights.
Since:
3.7
Version:
8.2
Author:
Luke
  • Field Details

    • MAX_DELTA

      public static final int MAX_DELTA
      Maximum delta between positions before trigerring in-flight refueling flag.
      See Also:
  • Constructor Details

    • FuelUse

      public FuelUse()
  • Method Details

    • getRefuel

      public boolean getRefuel()
      Returns whether refueling occured in-flight.
      Returns:
      TRUE if refueling occured, otherwise FALSE
    • getTotalFuel

      public int getTotalFuel()
      Returns the total amount of fuel used.
      Returns:
      the amount of fuel in pounds
    • getMessages

      public Collection<String> getMessages()
      Returns any warning messages.
      Returns:
      a Collection of messages
    • addFuelUse

      public void addFuelUse(int fuel)
      Adds an amount of fuel to the total fuel used.
      Parameters:
      fuel - the amount of fuel in pounds
    • setRefuel

      public void setRefuel(boolean inflightRefuel)
      Sets whether refueling occured in-flight.
      Parameters:
      inflightRefuel - TRUE if refueling occured, otherwise FALSE
    • validate

      public static FuelUse validate(Collection<? extends FuelChecker> positions)
      Calculates fuel use from flight data.
      Parameters:
      positions - a Collection of RouteEntry beans
      Returns:
      a FuelUse bean