Package slash.navigation.common
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 Summary
Modifier and TypeMethodDescriptioncalculateAngle(NavigationPosition other) Calculate the angle in degree between this and the other position.Calculate the distance in meters between this and the other position.Calculate the elevation in meter between this and the other position.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.calculateSpeed(NavigationPosition other) Calculate the average speed in kilometers per hour between this and the other position.calculateTime(NavigationPosition other) Calculate the time in milliseconds between this and the other position.Return the elevation in meters above sea levelReturn the latitude in the WGS84 coordinate systemReturn the longitude in the WGS84 coordinate systemgetSpeed()Return the speed in kilometers per hourgetTime()Return the date and time in UTC time zonebooleanbooleanhasTime()default booleanReturn whether this position starts a new track segment, i.e. the GPS recorded no positions between the previous position and this onevoidsetDescription(String description) voidsetElevation(Double elevation) voidsetLatitude(Double latitude) voidsetLongitude(Double longitude) voidvoidsetStartDate(CompactCalendar startDate) Set the day/month/year-offset for date-less, time-only positionsvoidsetTime(CompactCalendar time)
-
Method Details
-
getLongitude
Double getLongitude()Return the longitude in the WGS84 coordinate system- Returns:
- the longitude in the WGS84 coordinate system
-
setLongitude
-
getLatitude
Double getLatitude()Return the latitude in the WGS84 coordinate system- Returns:
- the latitude in the WGS84 coordinate system
-
setLatitude
-
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
-
getTime
CompactCalendar getTime()Return the date and time in UTC time zone- Returns:
- the date and time in UTC time zone
-
setTime
-
hasTime
boolean hasTime() -
getSpeed
Double getSpeed()Return the speed in kilometers per hour- Returns:
- the speed in kilometers per hour
-
setSpeed
-
getDescription
String getDescription() -
setDescription
-
setStartDate
Set the day/month/year-offset for date-less, time-only positions- Parameters:
startDate- the day/month/year-offset
-