交警调度 将调度坐标转换为wgs84
This commit is contained in:
@@ -12,6 +12,7 @@ import androidx.lifecycle.LifecycleObserver;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||
@@ -177,12 +178,14 @@ public class NoticeTrafficDialog extends BaseFloatDialog implements LifecycleObs
|
||||
AutopilotControlParameters parameters = new AutopilotControlParameters();
|
||||
parameters.isSpeakVoice = false;
|
||||
parameters.vehicleType = 10;
|
||||
//云平台使用的是火星坐标,自动驾驶需要wgs84
|
||||
double[] gcj02 = CoordinateUtils.transformGcj02toWgs84(mTrafficStyleInfo.getLat(),mTrafficStyleInfo.getLon());
|
||||
AutopilotControlParameters.AutoPilotLonLat startLocation = new AutopilotControlParameters.AutoPilotLonLat
|
||||
(MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLon(),
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().getLastLat());
|
||||
parameters.startLatLon = startLocation;
|
||||
AutopilotControlParameters.AutoPilotLonLat endLocation = new AutopilotControlParameters.AutoPilotLonLat
|
||||
(mTrafficStyleInfo.getLon(), mTrafficStyleInfo.getLat());
|
||||
(gcj02[0],gcj02[1]);
|
||||
parameters.endLatLon = endLocation;
|
||||
CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user