Waypoint

data class Waypoint(val id: Double, val lat: Double, val lng: Double, val elv: Double?, val time: String?, var trackId: Int)

Domain model representing a single waypoint (GPS point) in a track.

Constructors

Link copied to clipboard
constructor(id: Double, lat: Double, lng: Double, elv: Double?, time: String?, trackId: Int)

Properties

Link copied to clipboard
val elv: Double?

Elevation of the waypoint, can be null (so we can interpolate later)

Link copied to clipboard
val id: Double

Unique identifier for the waypoint (Double is unusual, usually Int or Long is used).

Link copied to clipboard
val lat: Double

Latitude coordinate of the waypoint.

Link copied to clipboard
val lng: Double

Longitude coordinate of the waypoint.

Link copied to clipboard
val time: String?
Link copied to clipboard

Foreign key reference to the track this waypoint belongs to.

Functions

Link copied to clipboard

Converts a domain Waypoint object into a database WaypointEntity.