Blame view
src/main/kotlin/application/model/Message.kt
1.25 KB
b350f9dfe import vessels an... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
package application.model import java.time.LocalDateTime class Message(split: List<String>) { val mmsi: Int? = split[0].toIntOrNull() val time: LocalDateTime = LocalDateTime.parse(split[1]) val latitude: Double? = split[2].toDoubleOrNull() val longitude: Double? = split[3].toDoubleOrNull() val speedOverGround: Double? = split[4].toDoubleOrNull() val courseOverGround: Double? = split[5].toDoubleOrNull() val heading: Int? = split[6].toIntOrNull() val vesselName: String? = split[7] val imo: String? = split[8] val callSign: String? = split[9] val vesselType: Int? = split[10].toIntOrNull() val status: String? = split[11] val length: Double? = split[12].toDoubleOrNull() val width: Double? = split[13].toDoubleOrNull() val draft: Double? = split[14].toDoubleOrNull() val cargo: Int? = split[15].toIntOrNull() |
79b001037 heat map |
22 |
fun getHexColorStroke(): String{ |
52321443a different color f... |
23 24 25 26 27 28 |
var hex = Integer.toHexString(this.mmsi!!) if (hex.length > 6){ hex = hex.substring(hex.length - 6) } return hex } |
79b001037 heat map |
29 30 31 32 33 34 35 36 |
fun getHexColorFill(): String{ var hex = Integer.toHexString(this.mmsi!! - 50) if (hex.length > 6){ hex = hex.substring(hex.length - 6) } return hex } |
b350f9dfe import vessels an... |
37 |
} |