Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
earlywarning
Commits
4b522d9e
Commit
4b522d9e
authored
Jun 26, 2025
by
p x
Browse files
解决tbox 经度 -纬度 高程 航向角 车速解析问题
parent
ffaea1e9
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/cusc/adas/v2x/dto/PositionDto.java
View file @
4b522d9e
...
...
@@ -9,7 +9,15 @@ public class PositionDto {
//纬度
@Order
(
2
)
private
double
latitude
;
//高程
//高程
单位米
@Order
(
3
)
private
double
elevation
;
public
double
getLongitude
()
{
return
longitude
;
}
public
double
getLatitude
()
{
return
latitude
;
}
}
src/main/java/com/cusc/adas/v2x/dto/VehicleInfoDto.java
View file @
4b522d9e
...
...
@@ -119,4 +119,8 @@ public class VehicleInfoDto {
public
double
getHeading
()
{
return
heading
;
}
public
PositionDto
getPosition
()
{
return
position
;
}
}
src/main/java/com/cusc/adas/v2x/utils/Parse.java
View file @
4b522d9e
...
...
@@ -407,10 +407,10 @@ public class Parse {
if
(
len
<
minValidLength
)
{
int
subtract
=
minValidLength
-
len
;
double
f
=(
Long
)
o
*
Math
.
pow
(
10
,
subtract
)*
offset
;
tField
.
set
(
target
,
(
float
)
f
);
tField
.
set
(
target
,
(
double
)
f
);
}
else
{
double
f
=(
Long
)
o
*
offset
;
tField
.
set
(
target
,
(
float
)
f
);
tField
.
set
(
target
,
(
double
)
f
);
}
}
else
{
double
d
=(
Long
)
o
*
offset
;
...
...
src/main/java/com/cusc/adas/v2x/utils/SM4Utils.java
View file @
4b522d9e
...
...
@@ -20,9 +20,9 @@ public class SM4Utils {
}
/**
* 生成 SM
4
密钥
* @return
密
钥的 Base6
4
编码字符串
* @throws Exception
异
常
*
生成
SM4
密钥
* @return
密钥的
Base64
编码字符串
* @throws Exception
异常
*/
public
static
String
generateKey
()
throws
Exception
{
KeyGenerator
kg
=
KeyGenerator
.
getInstance
(
ALGORITHM_NAME
,
"BC"
);
...
...
@@ -32,11 +32,11 @@ public class SM4Utils {
}
/**
* SM4 加密
* @param plainText 明文
* @param key
密
钥的 Base6
4
编码字符串
* @return
密
文的 Base6
4
编码字符串
* @throws Exception
异
常
* SM4
加密
* @param plainText
明文
* @param key
密钥的
Base64
编码字符串
* @return
密文的
Base64
编码字符串
* @throws Exception
异常
*/
public
static
String
encrypt
(
String
plainText
,
String
key
)
throws
Exception
{
byte
[]
keyBytes
=
Base64
.
getDecoder
().
decode
(
key
);
...
...
@@ -48,11 +48,11 @@ public class SM4Utils {
}
/**
* SM4 解密
* @param cipherText
密
文的 Base6
4
编码字符串
* @param key
密
钥的 Base6
4
编码字符串
* @return 明文
* @throws Exception
异
常
* SM4
解密
* @param cipherText
密文的
Base64
编码字符串
* @param key
密钥的
Base64
编码字符串
* @return
明文
* @throws Exception
异常
*/
public
static
String
decrypt
(
String
cipherText
,
String
key
)
throws
Exception
{
byte
[]
keyBytes
=
Base64
.
getDecoder
().
decode
(
key
);
...
...
src/main/java/com/cusc/adas/v2x/vo/Position.java
View file @
4b522d9e
...
...
@@ -10,9 +10,9 @@ public class Position {
private
long
longitude
;
//纬度
@Order
(
2
)
@OffsetDef
(
value
=
0.0000001
,
minValidLength
=
9
)
@OffsetDef
(
value
=
0.000000
0
1
,
minValidLength
=
10
)
private
long
latitude
;
//高程
//高程
单位分米
@Order
(
3
)
@OffsetDef
(
value
=
0.1
)
private
long
elevation
;
...
...
src/main/java/com/cusc/adas/v2x/vo/Position2D.java
View file @
4b522d9e
...
...
@@ -10,6 +10,6 @@ public class Position2D {
private
long
longitude
;
//纬度
@Order
(
2
)
@OffsetDef
(
value
=
0.0000001
,
minValidLength
=
9
)
@OffsetDef
(
value
=
0.000000
0
1
,
minValidLength
=
10
)
private
long
latitude
;
}
src/main/java/com/cusc/adas/v2x/vo/VehicleInfo.java
View file @
4b522d9e
...
...
@@ -36,7 +36,7 @@ public class VehicleInfo {
/****[0..3600000],正北方向顺时针旋转至与车辆当前运动方向重合所转 过的角度,单位为 1e-4 ° , 不可缺省,0xFFFFFFFF 表示异常**/
@Order
(
6
)
@OffsetDef
(
value
=
0.0001
)
@OffsetDef
(
value
=
0.0001
,
minValidLength
=
7
)
private
long
heading
;
/**
...
...
@@ -105,7 +105,7 @@ public class VehicleInfo {
@Order
(
21
)
private
short
driveMode
;
//
目的地
位置
//
车辆当前驾驶任务的终点
位置
@Order
(
22
)
private
Position2D
destLocation
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment