feiyu02
2024-08-27 9ed0b1847912221197697791d69e01ccae17f5b9
src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
@@ -1,7 +1,7 @@
package com.flightfeather.uav.domain.entity
import com.flightfeather.uav.common.utils.DateUtil
import com.flightfeather.uav.biz.dataprocess.AvgPair
import com.flightfeather.uav.common.utils.DateUtil
import com.flightfeather.uav.lightshare.bean.DataVo
import com.flightfeather.uav.socket.bean.AirData
import com.flightfeather.uav.socket.eunm.FactorType
@@ -11,7 +11,10 @@
import java.util.*
import javax.persistence.Column
import javax.persistence.Id
import kotlin.math.*
import kotlin.math.atan
import kotlin.math.cos
import kotlin.math.round
import kotlin.math.sin
/**
 * 实时监测数据基类
@@ -65,6 +68,9 @@
    @Column(name = "NOI")
    var noi: Float? = null
    @Column(name = "NO")
    var no: Float? = null
    var velocity: Float? = null
@@ -148,7 +154,7 @@
}
fun List<BaseRealTimeData>.avg(): RealTimeDataGridMin {
fun List<BaseRealTimeData>.avg(): BaseRealTimeData {
    //风向采用单位矢量法求取均值
    var u = .0//东西方位分量总和
    var v = .0//南北方位分量总和