Interface NavigationPosition

All Known Subinterfaces:
CategorizedNavigationPosition, ExtendedSensorNavigationPosition
All Known Implementing Classes:
BaseNavigationPosition, BcrPosition, CsvPosition, ExcelPosition, GarminFlightPlanPosition, GkPosition, GoPalPosition, GpxPosition, KmlPosition, MercatorPosition, NmeaPosition, NmnPosition, PhotoPosition, SimpleCategorizedNavigationPosition, SimpleNavigationPosition, TomTomPosition, TourPosition, Wgs84Position

public interface NavigationPosition
A navigation position.
Author:
Christian Pesch
  • Method Details

    • getLongitude

      Double getLongitude()
      Return the longitude in the WGS84 coordinate system
      Returns:
      the longitude in the WGS84 coordinate system
    • setLongitude

      void setLongitude(Double longitude)
    • getLatitude

      Double getLatitude()
      Return the latitude in the WGS84 coordinate system
      Returns:
      the latitude in the WGS84 coordinate system
    • setLatitude

      void setLatitude(Double latitude)
    • hasCoordinates

      boolean hasCoordinates()
    • isStartsNewSegment

      default boolean isStartsNewSegment()
      Return whether this position starts a new track segment, i.e. the GPS recorded no positions between the previous position and this one
      Returns:
      true if this position starts a new track segment
    • getElevation

      Double getElevation()
      Return the elevation in meters above sea level
      Returns:
      the elevation in meters above sea level
    • setElevation

      void setElevation(Double elevation)
    • getTime

      CompactCalendar getTime()
      Return the date and time in UTC time zone
      Returns:
      the date and time in UTC time zone
    • setTime

      void setTime(CompactCalendar time)
    • hasTime

      boolean hasTime()
    • getSpeed

      Double getSpeed()
      Return the speed in kilometers per hour
      Returns:
      the speed in kilometers per hour
    • setSpeed

      void setSpeed(Double speed)
    • getDescription

      String getDescription()
    • setDescription

      void setDescription(String description)
    • setStartDate

      void setStartDate(CompactCalendar startDate)
      Set the day/month/year-offset for date-less, time-only positions
      Parameters:
      startDate - the day/month/year-offset
    • calculateDistance

      Double calculateDistance(NavigationPosition other)
      Calculate the distance in meters between this and the other position.
      Parameters:
      other - the other position
      Returns:
      the distance in meters between this and the other position or null if the distance cannot be calculated
    • calculateOrthogonalDistance

      Double calculateOrthogonalDistance(NavigationPosition pointA, NavigationPosition pointB)
      Calculate the orthogonal distance of this position to the line from pointA to pointB, supposed you are proceeding on a great circle route from A to B and end up at D, perhaps ending off course. ... ...
      Parameters:
      pointA - the first point determining the line between pointA and pointB
      pointB - the second point determining the line between pointA and pointB
      Returns:
      the orthogonal distance to the line from pointA to pointB in meter or null if the orthogonal distance cannot be calculated
    • calculateAngle

      Double calculateAngle(NavigationPosition other)
      Calculate the angle in degree between this and the other position.
      Parameters:
      other - the other position
      Returns:
      the angle in degree between this and the other position or null if the angle cannot be calculated
    • calculateElevation

      Double calculateElevation(NavigationPosition other)
      Calculate the elevation in meter between this and the other position.
      Parameters:
      other - the other position
      Returns:
      the elevation in meter between this and the other position or null if the elevation cannot be calculated
    • calculateTime

      Long calculateTime(NavigationPosition other)
      Calculate the time in milliseconds between this and the other position.
      Parameters:
      other - the other position
      Returns:
      the time in milliseconds between this and the other position or null if the time cannot be calculated
    • calculateSpeed

      Double calculateSpeed(NavigationPosition other)
      Calculate the average speed in kilometers per hour between this and the other position.
      Parameters:
      other - the other position
      Returns:
      the speed in kilometers per hour between this and the other position or null if time or distance cannot be calculated