Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0

This commit is contained in:
wangmingjun
2023-05-24 12:07:30 +08:00
2 changed files with 17 additions and 2 deletions

View File

@@ -521,6 +521,11 @@ object CharterPassengerModel {
orderInfo = null
locusInfo = null
if (data.businessStatus == 2) {// 订单结束 没有还车
switchLine5minWait?.let {
if (!it.isDisposed) {
it.dispose()
}
}
setOrderStatus(OrderStatusEnum.NoOrderUse)
} else {
// 车辆空闲 订单结束已经还车

View File

@@ -135,7 +135,7 @@ public class CoordinateCalculateRouteUtil {
// region 当前位置和 对应轨迹点的坐标距离
// 需要加距离 和下一个轨迹点成钝角
if (currentRouteIndex + 1 < stationPointInRouteIndex) {
MogoLocation currentPointsNext = mRoutePoints.get(stationPointInRouteIndex + 1);
MogoLocation currentPointsNext = mRoutePoints.get(currentRouteIndex + 1);
double degree = getDegree(
location.getLongitude(),location.getLatitude(),
currentPoint.getLongitude(), currentPoint.getLatitude(),
@@ -147,7 +147,7 @@ public class CoordinateCalculateRouteUtil {
// 需要减距离 和上一个轨迹点成钝角
if (currentRouteIndex - 1 >= 0) {
MogoLocation lastPointsPre = mRoutePoints.get(stationPointInRouteIndex - 1);
MogoLocation lastPointsPre = mRoutePoints.get(currentRouteIndex - 1);
double degree = getDegree(
location.getLongitude(),location.getLatitude(),
currentPoint.getLongitude(), currentPoint.getLatitude(),
@@ -426,6 +426,16 @@ public class CoordinateCalculateRouteUtil {
return currentIndex;
}
/**
* https://blog.csdn.net/Jeanne_0523/article/details/106056255
* @param vertexPointX
* @param vertexPointY
* @param point0X 角
* @param point0Y 角
* @param point1X
* @param point1Y
* @return
*/
public static int getDegree(double vertexPointX, double vertexPointY, double point0X, double point0Y, double point1X, double point1Y) {
//向量的点乘
double vector = (point0X - vertexPointX) * (point1X - vertexPointX) + (point0Y - vertexPointY) * (point1Y - vertexPointY);