package com.flightfeather.uav.model.underwaygrid
|
|
import com.flightfeather.uav.domain.entity.GridCell
|
import com.flightfeather.uav.domain.entity.GridDataDetail
|
import com.flightfeather.uav.model.BaseMData
|
import com.flightfeather.uav.socket.eunm.FactorType
|
import com.flightfeather.uav.socket.eunm.FactorType.*
|
|
/**
|
* 卫星网格坐标和监测数据
|
* @date 2025/3/21
|
* @author feiyu02
|
*/
|
class GridCellAndData(val gridCell: GridCell, val gridDataDetail: GridDataDetail): BaseMData() {
|
|
override fun getFactorData(type: FactorType): Double? {
|
return when (type) {
|
NO2 -> gridDataDetail.no2.toDouble()
|
CO -> gridDataDetail.co.toDouble()
|
H2S -> gridDataDetail.h2s.toDouble()
|
SO2 -> gridDataDetail.so2.toDouble()
|
O3 -> gridDataDetail.o3.toDouble()
|
PM25 -> gridDataDetail.pm25.toDouble()
|
PM10 -> gridDataDetail.pm10.toDouble()
|
TEMPERATURE -> gridDataDetail.temperature.toDouble()
|
HUMIDITY -> gridDataDetail.humidity.toDouble()
|
VOC -> gridDataDetail.voc.toDouble()
|
NOI -> gridDataDetail.noi.toDouble()
|
WIND_SPEED -> gridDataDetail.windSpeed.toDouble()
|
WIND_DIRECTION -> gridDataDetail.windDirection.toDouble()
|
NO -> gridDataDetail.no.toDouble()
|
else -> null
|
}
|
}
|
}
|