Class RunwayLandingStats

java.lang.Object
org.deltava.beans.stats.RunwayLandingStats
All Implemented Interfaces:
Serializable, Comparable<RunwayLandingStats>, Cacheable

public class RunwayLandingStats extends Object implements Cacheable, Comparable<RunwayLandingStats>
A bean to track landing statistics for a particular runway.
Since:
12.4
Version:
12.4
Author:
Luke
See Also:
  • Field Details

    • MIN_LANDING_SCORE

      public static final int MIN_LANDING_SCORE
      Minimum landing score to avoid aggregating outlier data.
      See Also:
  • Constructor Details

    • RunwayLandingStats

      public RunwayLandingStats(Airport a, String rw, int year)
      Creates the bean.
      Parameters:
      a - the Airport
      rw - the Runway name
      year - the year, or zero if aggregated
  • Method Details

    • merge

      public static RunwayLandingStats merge(Collection<RunwayLandingStats> rls, int minLandings)
      Aggregates a Collection of RunwayLandingStats beans, optionally ensuring a minimum number of landings have been included.
      Parameters:
      rls - a Collection of RunwayLandingStats beans
      minLandings - the minimum number of landings, or zero for all
      Returns:
      a RunwayLandingStats bean with aggregated totals
    • getAirport

      public Airport getAirport()
      Returns the Airport.
      Returns:
      the Airport
    • getRunway

      public String getRunway()
      Returns the Runway name.
      Returns:
      the name
    • getYear

      public int getYear()
      Returns the year, or zero if aggregated.
      Returns:
      the year
    • getAverageScore

      public double getAverageScore()
      Returns the average landing score.
      Returns:
      the score
    • getScoreSD

      public double getScoreSD()
      Returns the landing score standard deviation size.
      Returns:
      the standard deviation
    • getAverageDistance

      public int getAverageDistance()
      Returns the average touchdown distance from the runway threshold.
      Returns:
      the average ditsance in feet
    • getDistanceSD

      public int getDistanceSD()
      Returns the touchdown distance standard deviation size.
      Returns:
      the standard deviation
    • getAverageVerticalSpeed

      public int getAverageVerticalSpeed()
      Returns the average touchdown vertical speed.
      Returns:
      the vertical speed in feet per minute
    • getVerticalSpeedSD

      public int getVerticalSpeedSD()
      Returns the touchdown vertical speed standard deviation size.
      Returns:
      the standard deviation
    • getCount

      public int getCount()
      Returns the number of scored landings.
      Returns:
      the number of landings
    • setScore

      public void setScore(double avg, double sd)
      Updates the average landing score and standard deviation.
      Parameters:
      avg - the average score
      sd - the score standard deviation
    • setDistance

      public void setDistance(int avg, int sd)
      Updates the average touchdown distance and standard deviation.
      Parameters:
      avg - the average distance from the threshold in feet
      sd - the standard deviation
    • setVerticalSpeed

      public void setVerticalSpeed(int avg, int sd)
      Updates the average vertical speed at touchdown and standard deviation.
      Parameters:
      avg - the average vertical speed in feet per minute
      sd - the standard deviation
    • setCount

      public void setCount(int cnt)
      Updates the number of scored landings.
      Parameters:
      cnt - the number of landings
    • merge

      Merges two beans, claculcating combined means and standard deviations.
      Parameters:
      rsw - a RunwayLandingStats bean
      Returns:
      a combined RunwayLandingStats bean
    • compareTo

      public int compareTo(RunwayLandingStats rsw)
      Specified by:
      compareTo in interface Comparable<RunwayLandingStats>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object