[dev_arch_opt_3.0]
[Change] [ 1、彻底解决地图跳变问题,原因是因为位置转变GCJ02时候将经纬度设置回去了,从而引起位置异常 ] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -29,7 +29,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
|
||||
@@ -272,7 +272,7 @@ public class BusPassengerModel {
|
||||
IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
@@ -284,7 +284,7 @@ public class BusPassengerModel {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.unregisterLifecycleListener(10010);
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.amap.api.maps.model.Polyline;
|
||||
import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.bus.passenger.R;
|
||||
import com.mogo.och.bus.passenger.callback.IBusPassengerMapViewCallback;
|
||||
@@ -103,14 +103,14 @@ public class BusPassengerMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
@@ -151,7 +151,7 @@ public class BusOrderModel {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -331,7 +331,7 @@ public class BusOrderModel {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -36,7 +36,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
|
||||
fun init(context: Context) {
|
||||
mContext = context.applicationContext
|
||||
// 达到起始站围栏监听
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun hasInit(): Boolean {
|
||||
@@ -65,7 +65,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
|
||||
mContext = null
|
||||
iTaxiLoginCallback = null
|
||||
// 注销到达起始站围栏监听
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
@@ -123,7 +123,7 @@ public class SweeperOrderModel {
|
||||
public void init() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
@@ -248,7 +248,7 @@ public class SweeperOrderModel {
|
||||
startOrStopOrderLoop(false);
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
//自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener;
|
||||
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
|
||||
@@ -241,7 +241,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
IntentManager.getInstance().registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
// 定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
|
||||
@@ -261,7 +261,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
MogoAiCloudSocketManager.getInstance(mContext)
|
||||
.unregisterLifecycleListener(10010);
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.passenger.R;
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerMapViewCallback;
|
||||
@@ -104,14 +104,14 @@ public class TaxiPassengerMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
@@ -223,7 +223,7 @@ public class TaxiModel {
|
||||
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
//定位监听, 传false是高德坐标系
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
|
||||
|
||||
//2021.11.1 自动驾驶路线规划接口
|
||||
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
|
||||
@@ -262,7 +262,7 @@ public class TaxiModel {
|
||||
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
|
||||
|
||||
// 注销地图监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
|
||||
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.amap.api.maps.model.PolylineOptions;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.och.taxi.R;
|
||||
import com.mogo.och.taxi.utils.TaxiMapAssetStyleUtil;
|
||||
@@ -98,14 +98,14 @@ public class TaxiMapDirectionView
|
||||
initAMapView();
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
|
||||
}
|
||||
|
||||
private void initAMapView() {
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.utils.RetryWithDelay
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.data.camera.ReqLiveCarBean
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -90,7 +90,7 @@ class CronTaskManager {
|
||||
* 请求路口一定范围内的设备信息(包含:摄像头、灯)
|
||||
*/
|
||||
private fun requestDeviceList() {
|
||||
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.let { location ->
|
||||
disposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
|
||||
.create(ICameraListServices::class.java)
|
||||
.getDeviceList(location.longitude, location.latitude, 500)
|
||||
@@ -124,7 +124,7 @@ class CronTaskManager {
|
||||
}
|
||||
|
||||
private fun requestCarCameraList() {
|
||||
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.let { location ->
|
||||
carDisposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
|
||||
.create(ICameraListServices::class.java)
|
||||
.getCarCameraList(ReqLiveCarBean(location.longitude, location.latitude))
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.mogo.eagle.core.data.trafficlight.TrafficLightStatusHelper.getCurrent
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.v2x.IMoGoVipSetListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
@@ -84,7 +84,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
|
||||
fun listenTrafficLight() {
|
||||
CallerTrafficLightListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
CallVipSetListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
|
||||
fun onDestroy() {
|
||||
CallVipSetListenerManager.removeListener(TAG)
|
||||
CallerTrafficLightListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.os.Looper
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -41,7 +41,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
fun initServer(context: Context) {
|
||||
mContext = context
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
mThreadHandler =
|
||||
TrafficLightThreadHandler(Looper.getMainLooper(), {
|
||||
//第一次查询路口时,如果红绿灯显示,则隐藏掉
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_DEFAULT
|
||||
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VEHICLE_TEAM
|
||||
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VOICE
|
||||
import com.mogo.eagle.core.function.api.chat.biz.IMType.*
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.chat.facade.analytics.ChatAnalyticsFacade
|
||||
import com.mogo.eagle.core.function.chat.facade.audio.AudioFocusFacade
|
||||
import com.mogo.eagle.core.function.chat.facade.bridge.BridgeApi
|
||||
@@ -581,7 +581,7 @@ object MoGoChatFacade: IMoGoChatFacade {
|
||||
}
|
||||
//告之服务器给发送方下发接收通话消息
|
||||
try {
|
||||
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val response = serverApi.requestConnectStatus(ConnectStatusParam(MoGoAiCloudClientConfig.getInstance().sn, sn, roomId, PUSH_MSG_AGREE_ENTER, CALL_TYPE_VOICE.type).also {
|
||||
it.nickName = mySelf.get().name
|
||||
it.headImgUrl = mySelf.get().icon
|
||||
@@ -812,7 +812,7 @@ object MoGoChatFacade: IMoGoChatFacade {
|
||||
}
|
||||
val response = serverApi.inviteJoinVehicleTeam(CallRequestParam().also {
|
||||
val user = mySelf.get()
|
||||
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
it.snSender = mySn
|
||||
it.snReceiver = sn
|
||||
it.nickName = user.name
|
||||
@@ -958,7 +958,7 @@ object MoGoChatFacade: IMoGoChatFacade {
|
||||
}
|
||||
//告之服务器给发送方下发接收通话消息
|
||||
try {
|
||||
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val response = serverApi.requestConnectStatus(ConnectStatusParam(MoGoAiCloudClientConfig.getInstance().sn, sn, roomId, PUSH_MSG_AGREE_ENTER, CALL_TYPE_VEHICLE_TEAM.type).also {
|
||||
it.nickName = mySelf.get().name
|
||||
it.headImgUrl = mySelf.get().icon
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.mogo.eagle.core.data.BaseResponse
|
||||
import com.mogo.eagle.core.data.chat.UserInfo
|
||||
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts
|
||||
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VOICE
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.chat.facade.net.bean.*
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
@@ -69,7 +69,7 @@ internal class ChatServiceModel {
|
||||
val map = hashMapOf<String, String>()
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
|
||||
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
if (location != null) {
|
||||
params.lon = location.longitude
|
||||
params.lat = location.latitude
|
||||
@@ -103,7 +103,7 @@ internal class ChatServiceModel {
|
||||
|
||||
suspend fun requestRoomInfo(param: CallRequestParam): BaseResponse<RoomInfo> {
|
||||
val map = hashMapOf<String, String>()
|
||||
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
if (location != null) {
|
||||
param.lat = location.latitude
|
||||
param.lon = location.longitude
|
||||
|
||||
@@ -12,11 +12,12 @@ import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGnssListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.support.obu.model.MogoObuHvBasicsData
|
||||
@@ -106,6 +107,7 @@ object MoGoLocationDispatcher :
|
||||
lastGnssLocation.errorCode = it.errorCode
|
||||
lastGnssLocation.errorInfo = it.errorInfo
|
||||
}
|
||||
//FileUtils.writeToFile("/sdcard/Download/", "location_wgs84.txt", "${gnssInfo.longitude},${gnssInfo.latitude}\n")
|
||||
if (1 == FunctionBuildConfig.gpsProvider) {
|
||||
// WGS84坐标系高精度位置信息
|
||||
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
|
||||
@@ -113,7 +115,7 @@ object MoGoLocationDispatcher :
|
||||
DataSourceType.TELEMATIC
|
||||
)
|
||||
// GCJ02高德坐标系位置信息
|
||||
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
|
||||
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(
|
||||
lastGnssLocation,
|
||||
DataSourceType.TELEMATIC
|
||||
)
|
||||
@@ -205,7 +207,7 @@ object MoGoLocationDispatcher :
|
||||
DataSourceType.MAP
|
||||
)
|
||||
// GCJ02高德坐标系位置信息
|
||||
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
|
||||
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(
|
||||
lastGaoDeLocation,
|
||||
DataSourceType.MAP
|
||||
)
|
||||
@@ -252,7 +254,7 @@ object MoGoLocationDispatcher :
|
||||
DataSourceType.OBU
|
||||
)
|
||||
// GCJ02高德坐标系位置信息
|
||||
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
|
||||
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(
|
||||
lastOBULocation,
|
||||
DataSourceType.OBU
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.os.Process
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.EnvConfig
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
|
||||
@@ -34,7 +34,7 @@ object EnvChangeManager {
|
||||
fun getCityName(): String {
|
||||
val cache = getConfig()
|
||||
return if (cache == null) {
|
||||
when(CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
|
||||
when(CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
|
||||
"010" -> "北京"
|
||||
"0734" -> "衡阳"
|
||||
else -> "未知"
|
||||
|
||||
@@ -52,7 +52,6 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManage
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerSmpManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
@@ -233,7 +232,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
// 移除 ADAS车辆状态&定位 监听
|
||||
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
|
||||
// 移除 地图样式改变 监听
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
// 移除 域控制器感知数据 监听
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
// 移除 规划路径相关回调 监听
|
||||
|
||||
@@ -7,7 +7,7 @@ import android.view.Gravity
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -55,7 +55,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
// 注册位置回调
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
// 开启定时查询速度
|
||||
timerTask?.cancel()
|
||||
val task = object : TimerTask() {
|
||||
@@ -86,7 +86,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 解除注册
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
try {
|
||||
timerTask?.cancel()
|
||||
} catch (e: Exception) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import androidx.annotation.Nullable;
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
@@ -65,7 +65,7 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener
|
||||
}
|
||||
|
||||
public void start() {
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
Timer mTimer = new Timer();
|
||||
mTimer.schedule(new SpeedTimerTask(), 3000, 1000);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
|
||||
import com.zhidaoauto.map.operational.open.GatherApi
|
||||
@@ -52,7 +52,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
|
||||
override fun init(context: Context?) {
|
||||
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotRecordListenerManager.addListener(TAG, this)
|
||||
|
||||
executor.set(context?.let {
|
||||
@@ -77,7 +77,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerLogger.d("$M_MAP$TAG", "--------- onDestroy --------")
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
CallerAutopilotRecordListenerManager.removeListener(TAG)
|
||||
executor.get()?.setOnTaskListener(null)
|
||||
listeners.clear()
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningTrajectoryListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -43,7 +43,7 @@ public class MogoRouteOverlayManager implements
|
||||
public void init() {
|
||||
CallerPlanningTrajectoryListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
public static MogoRouteOverlayManager getInstance() {
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.getGlobalPath
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.view.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -44,7 +44,7 @@ class SmallMapView @JvmOverloads constructor(
|
||||
private var mCarMarker: Marker? = null
|
||||
private var mStartMarker: Marker? = null
|
||||
private var mEndMarker: Marker? = null
|
||||
private val zoomLevel = 15
|
||||
private val zoomLevel = 16
|
||||
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
|
||||
private var mPolyline: Polyline? = null
|
||||
private var mCameraUpdate: CameraUpdate? = null
|
||||
@@ -155,7 +155,7 @@ class SmallMapView @JvmOverloads constructor(
|
||||
initAMapView()
|
||||
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, 10,this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 10, this)
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, this)
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
}
|
||||
@@ -343,7 +343,7 @@ class SmallMapView @JvmOverloads constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
CallerPlanningRottingListenerManager.removeListener(TAG)
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
|
||||
import com.mogo.eagle.core.function.api.v2x.IFuncBizProvider
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.getGlobalPath
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showVideoDialog
|
||||
@@ -146,7 +146,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
CallerPlanningRottingListenerManager.addListener(TAG, moGoAutopilotPlanningListener)
|
||||
initAMapView(context)
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
//设置全览模式
|
||||
overLayerView?.setOnClickListener { displayCustomOverView() }
|
||||
}
|
||||
@@ -372,7 +372,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 注册定位监听
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
CallerPlanningRottingListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LO
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
@@ -145,7 +145,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
return HttpDnsSimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon)
|
||||
}
|
||||
var mogoLocation: MogoLocation? = null
|
||||
val locationClient = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val locationClient = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
if (locationClient != null) {
|
||||
mogoLocation = locationClient
|
||||
}
|
||||
@@ -288,7 +288,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
context?.let {
|
||||
MogoLocationInfoServices.getInstance().init(it)
|
||||
MogoLocationInfoServices.getInstance().start()
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(
|
||||
TAG,
|
||||
object : IMoGoChassisLocationGCJ02Listener {
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
@@ -304,7 +304,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
private fun startSocketService() {
|
||||
CallerLogger.d(SceneConstant.M_MAIN + TAG, "startSocketService")
|
||||
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
// 关闭长链服务
|
||||
MogoAiCloudSocketManager.getInstance(context).destroy()
|
||||
MogoAiCloudSocketManager.getInstance(context)
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
@@ -114,12 +114,12 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
|
||||
|
||||
private fun registerListener() {
|
||||
V2XManager.addCallback(this)
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
private fun unRegisterListener() {
|
||||
V2XManager.removeCallback(this)
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
|
||||
mogoMarkersHandler.unregisterMarkerClickListener(CARD_TYPE_ROAD_CONDITION)
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
|
||||
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
|
||||
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
|
||||
@@ -55,7 +55,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
public CopyOnWriteArrayList<V2XRoadEventEntity> getV2XRoadEventEntityList() {
|
||||
CopyOnWriteArrayList<V2XRoadEventEntity> roadEventEntities = new CopyOnWriteArrayList<>();
|
||||
// 当前车辆数据
|
||||
MogoLocation currentLocation = CallerChassisLocationGCJ20ListenerManager.INSTANCE.getChassisLocationGCJ02();
|
||||
MogoLocation currentLocation = CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02();
|
||||
if (currentLocation != null) {
|
||||
// 重新计算距离
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : mV2XRoadEventEntityArrayList) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.os.HandlerThread
|
||||
import android.util.Log
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
|
||||
import com.mogo.map.marker.IMogoMarker
|
||||
@@ -90,7 +90,7 @@ object MarkerRemoveManager {
|
||||
if (carLoc.get() == null) {
|
||||
carLoc.set(if (marker.coordinateType == 0) {
|
||||
//高德坐标
|
||||
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
} else {
|
||||
//高精坐标
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
@@ -150,7 +150,7 @@ object MarkerRemoveManager {
|
||||
if (carLoc.get() == null) {
|
||||
carLoc.set(if (marker.coordinateType == 0) {
|
||||
//高德坐标
|
||||
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
} else {
|
||||
//高精坐标
|
||||
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
@@ -170,7 +170,7 @@ object MarkerRemoveManager {
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
} finally {
|
||||
val gcInfo = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val gcInfo = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
lastCarLocation.set((gcInfo?.longitude ?: 0.0) to (gcInfo?.latitude ?: 0.0))
|
||||
val wgsInfo = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
lastGpsLocation.set((wgsInfo?.longitude ?: 0.0) to (wgsInfo?.latitude ?: 0.0))
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
|
||||
/**
|
||||
@@ -13,7 +14,7 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
* @date 2021/9/30 5:48 下午
|
||||
* 车辆定位 WGS84 坐标系-高精度坐标系 数据 回调监听
|
||||
*/
|
||||
object CallerChassisLocationGCJ20ListenerManager : CallerBase<IMoGoChassisLocationGCJ02Listener>() {
|
||||
object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocationGCJ02Listener>() {
|
||||
|
||||
val TAG = "CallerChassisLocationGCJ20ListenerManager"
|
||||
|
||||
@@ -46,14 +47,14 @@ object CallerChassisLocationGCJ20ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
@Synchronized
|
||||
fun invokeChassisLocationGCJ02(gnssInfo: MogoLocation?, sourceType: DataSourceType) {
|
||||
gnssInfo?.let {
|
||||
// 克隆定位数据,防止原数据被篡改导致位置跳变
|
||||
mGnssInfo = gnssInfo.clone()
|
||||
// 转换 WGS84-->GCJ02 坐标
|
||||
val gcj20Location =
|
||||
CoordinateTransform.WGS84ToGCJ02(gnssInfo.longitude, gnssInfo.latitude)
|
||||
|
||||
gnssInfo.longitude = gcj20Location[0]
|
||||
gnssInfo.latitude = gcj20Location[1]
|
||||
|
||||
this.mGnssInfo = gnssInfo
|
||||
mGnssInfo!!.longitude = gcj20Location[0]
|
||||
mGnssInfo!!.latitude = gcj20Location[1]
|
||||
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
@@ -99,6 +100,11 @@ object CallerChassisLocationGCJ20ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
|
||||
val listener = it.value
|
||||
listener.onChassisLocationGCJ02(mogoLocation)
|
||||
FileUtils.writeToFile(
|
||||
"/sdcard/Download/",
|
||||
"location_gcj02.txt",
|
||||
"${mogoLocation.longitude},${mogoLocation.latitude},${sourceType}\n"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
|
||||
/**
|
||||
@@ -14,10 +15,10 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
object CallerChassisLocationWGS84ListenerManager : CallerBase<IMoGoChassisLocationWGS84Listener>() {
|
||||
|
||||
@Volatile
|
||||
private var gnssInfo: MogoLocation? = null
|
||||
private var mGnssInfo: MogoLocation? = null
|
||||
|
||||
fun getChassisLocationWGS84(): MogoLocation? {
|
||||
return gnssInfo
|
||||
return mGnssInfo
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +40,7 @@ object CallerChassisLocationWGS84ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeChassisLocationWGS84(gnssInfo: MogoLocation,sourceType: DataSourceType) {
|
||||
this.gnssInfo = gnssInfo
|
||||
this.mGnssInfo = gnssInfo.clone()
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
// 获取数据监听需要的HZ
|
||||
@@ -81,6 +82,7 @@ object CallerChassisLocationWGS84ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
M_LISTENERS_HZ_LAST_SEND_TIME[tag] = TimeUtils.getNowMills()
|
||||
val listener = it.value
|
||||
listener.onChassisLocationWGS84(mogoLocation)
|
||||
FileUtils.writeToFile("/sdcard/Download/", "location_wgs84.txt", "${mogoLocation.longitude},${mogoLocation.latitude},${sourceType}\n")
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ object CallerVisualAngleManager {
|
||||
override fun onRoadIdInfo(roadId: String) {
|
||||
this.roadId.set(roadId)
|
||||
Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.triggerRoadId.get()} -> curr: $roadId")
|
||||
val loc = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
|
||||
val loc = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
var triggerClose = false
|
||||
val distance = distanceOfCarToStopLine.get() + 5
|
||||
if (hasCrossRoad && distance > 0) {
|
||||
@@ -110,7 +110,7 @@ object CallerVisualAngleManager {
|
||||
hasCrossRoad = true
|
||||
triggerRoadId.set(this.roadId.get())
|
||||
distanceOfCarToStopLine.set(info.distanceOfCarToStopLine)
|
||||
triggerLocation.set(CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02())
|
||||
triggerLocation.set(CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02())
|
||||
changeVisualAngle(CrossRoad(true))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.data.map.MapRoadInfo;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager;
|
||||
@@ -198,7 +198,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void onStopLineInfo(@androidx.annotation.Nullable StopLine stopLine) {
|
||||
MogoLocation carLoc = CallerChassisLocationGCJ20ListenerManager.INSTANCE.getChassisLocationGCJ02();
|
||||
MogoLocation carLoc = CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02();
|
||||
if (stopLine != null && stopLine.road_id != null && !stopLine.road_id.isEmpty() && stopLine.points != null && stopLine.points.size() > 0) {
|
||||
ArrayList<LonLatPoint> points = stopLine.points;
|
||||
if (carLoc != null) {
|
||||
@@ -727,6 +727,10 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
initMapView();
|
||||
initMyLocation();
|
||||
loadPreVehicleModel();
|
||||
|
||||
if (mMapView.getLocationClient() != null) {
|
||||
mMapView.getLocationClient().setIsUseExtraGPSData(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ public class MogoMapView extends MogoBaseMapView implements ILifeCycle {
|
||||
}
|
||||
|
||||
public void setExtraGPSData(MogoLocation gnssInfo) {
|
||||
|
||||
getMap().getUIController().setExtraGPSData(gnssInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user