This commit is contained in:
walker 2023-10-07 14:37:22 +08:00
commit 26dd2c9127
2 changed files with 4 additions and 6 deletions

@ -1 +1 @@
Subproject commit 200352eb58f1704a741d367e3c8afd02ae492b58 Subproject commit 7ce0d9aa7bf6cbbf045ef3aa57ec14d43a742906

View File

@ -1,8 +1,6 @@
package repository package repository
import ( import (
"errors"
"fmt"
"joylink.club/rtsssimulation/repository/model/proto" "joylink.club/rtsssimulation/repository/model/proto"
) )
@ -33,9 +31,9 @@ func convertKilometer(repo *Repository, km *proto.Kilometer, cs string) (*proto.
} else { } else {
value = targetCsKm.Value - offset value = targetCsKm.Value - offset
} }
if value < 0 { //if value < 0 {
return nil, errors.New(fmt.Sprintf("公里标[%s]转换为坐标系[%s]的公里标的值[%d]小于0", km, cs, value)) // return nil, errors.New(fmt.Sprintf("公里标[%s]转换为坐标系[%s]的公里标的值[%d]小于0", km, cs, value))
} //}
return &proto.Kilometer{ return &proto.Kilometer{
Value: value, Value: value,
CoordinateSystem: cs, CoordinateSystem: cs,