18 lines
509 B
Kotlin
18 lines
509 B
Kotlin
package com.danilafe.fencelessgrazing.model
|
|
|
|
import android.os.Parcelable
|
|
import kotlinx.android.parcel.Parcelize
|
|
import org.osmdroid.util.GeoPoint
|
|
|
|
/**
|
|
* GPS coordinate returned by many of the project's API endpoints.
|
|
*
|
|
* @param longitude the longitude of the GPS point.
|
|
* @param latitude the latitude of the GPS point.
|
|
*/
|
|
@Parcelize
|
|
data class CollarPos(val longitude: String, val latitude: String) : Parcelable {
|
|
fun toGeoPoint(): GeoPoint = GeoPoint(latitude.toDouble(), longitude.toDouble())
|
|
}
|
|
|