[V2X]将AI道路施工事件坐标由WGS84改成火星坐标

This commit is contained in:
renwj
2022-06-30 17:15:38 +08:00
parent 9c033855af
commit fcc9433759

View File

@@ -8,6 +8,7 @@ import android.os.Looper
import android.provider.Settings.System
import android.util.*
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.mogo.cloud.commons.utils.*
import com.mogo.cloud.passport.IMoGoTokenCallback
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
@@ -464,8 +465,9 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
l3.poiType = this.roadwork?.poiType?.toString()
l3.generateTime = this.roadwork?.detectTime ?: 0L
l3.location = V2XMarkerLocation().also { l4 ->
l4.lat = this.roadwork?.center?.point?.lat ?: 0.0
l4.lon = this.roadwork?.center?.point?.lon ?: 0.0
val p = CoordinateUtils.transformWgsToGcj(this.roadwork?.center?.point?.lat ?: 0.0, this.roadwork?.center?.point?.lon ?: 0.0)
l4.lon = p[0]
l4.lat = p[1]
l4.angle = this.roadwork?.center?.road?.bearing?.toDouble() ?: 0.0
}
})