Blame view

src/main/kotlin/application/model/Message.kt 879 Bytes
b350f9dfe   lsagona   import vessels an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  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()
  
  }