package com.mogo.v2x.data

import androidx.annotation.Keep
import java.io.Serializable

/**
 * 预警目标物数据模型
 */
@Keep
class V2XWarningTarget: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 事件类型
     * 行人-1
     * 自行车-2
     * 摩托车-4
     * 骑行车辆-11
     */
    var type = 0

    /**
     * 目标物纬度
     */
    var lat = 0.0

    /**
     * 目标物经度
     */
    var lon = 0.0

    /**
     * 目标物颜色
     */
    var targetColor: String? = null

    /**
     * 目标物距自车距离
     */
    var distance = 0.0

    /**
     * 预测碰撞点位置-纬度
     */
    var collisionLat = 0.0

    /**
     * 预测碰撞点位置-经度
     */
    var collisionLon = 0.0

    /**
     * 目标物行驶朝向
     */
    var angle = 0.0

    /**
     * 目标物方位
     * 方位：前 后 左 右
     */
    var direction = 0

    /**
     * 目标物速度
     */
    var speed = 0f

    /**
     * 停止线经纬度
     */
    var stopLines: List<V2XLocation>? = null

    /**
     * 自车到停止线距离
     */
    var stopLineDistance = 0.0

    /**
     * 道路唯一标识
     */
    var roadId: String? = null

    /**
     *   车道唯一标识
     */
    var laneId: String? = null

    /**
     * 识别物体唯一标识
     */
    var uuid: String? = null

    /**
     * 红绿灯颜色
     */
    var color: String? = null

    /**
     * 车ID 暂不使用
     */
    var carId: String? = null

    /**
     * 预警文案
     */
    var warningContent: String? = null

    /**
     * 车头朝向
     */
    var heading = 0.0

    /**
     * 系统时间 暂时没用
     */
    var systemTime: Long = 0

    /**
     * 定位卫星时间 暂时没用
     */
    var satelliteTime: Long = 0

    /**
     * 预警蒙层等展示时长
     */
    var showTime: Long = 0

    /**
     * 设计划线宽度与道路同宽
     */
    var roadwidth = 0f

    /**
     * 自组字段, tts播报
     */
    var tts: String? = null

    /**
     * 自车位置
     */
    var carLocation: V2XLocation? = null

    override fun toString(): String {
        return "V2XWarningEntity{" +
                "type=" + type +
                ", lat=" + lat +
                ", lon=" + lon +
                ", targetColor='" + targetColor + '\'' +
                ", distance=" + distance +
                ", collisionLat=" + collisionLat +
                ", collisionLon=" + collisionLon +
                ", angle=" + angle +
                ", direction=" + direction +
                ", speed=" + speed +
                ", stopLines=" + stopLines +
                ", stopLineDistance=" + stopLineDistance +
                ", roadId='" + roadId + '\'' +
                ", laneId='" + laneId + '\'' +
                ", uuid='" + uuid + '\'' +
                ", color='" + color + '\'' +
                ", carId='" + carId + '\'' +
                ", warningContent='" + warningContent + '\'' +
                ", heading=" + heading +
                ", systemTime=" + systemTime +
                ", satelliteTime=" + satelliteTime +
                ", showTime=" + showTime +
                ", roadwidth=" + roadwidth +
                ", tts='" + tts + '\'' +
                ", carLocation=" + carLocation +
                '}'
    }
}