feiyu02
2024-07-02 bf3bf9ff25ac106b556b2427cc382c8fcca63bff
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
/**
 * 实时监测数据基类
@@ -148,7 +151,7 @@
}
fun List<BaseRealTimeData>.avg(): RealTimeDataGridMin {
fun List<BaseRealTimeData>.avg(): BaseRealTimeData {
    //风向采用单位矢量法求取均值
    var u = .0//东西方位分量总和
    var v = .0//南北方位分量总和