Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
eagleEye
/
eagleEye-flink_kafka
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4ba81497
authored
Jun 27, 2025
by
魏建枢
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
无用备注调整
parent
0918db11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
eagleEye-flink_kafka/src/main/java/com/flink/achieve/doris/VectorAngleCalculationAchi.java
eagleEye-flink_kafka/src/main/java/com/flink/processor/function/KeyPointSelector.java
eagleEye-flink_kafka/src/main/java/com/flink/achieve/doris/VectorAngleCalculationAchi.java
View file @
4ba81497
...
...
@@ -405,7 +405,7 @@ public class VectorAngleCalculationAchi extends MultipleSourceCommonBase impleme
}
private
List
<
Point
>
getReferenceVector
(
String
id
)
{
//
示例:
根据ID生成线性路径
//根据ID生成线性路径
List
<
Point
>
refPoints
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
refPoints
.
add
(
new
Point
(
i
*
10
,
i
*
10
));
// 生成点(0,0),(10,10)...
...
...
eagleEye-flink_kafka/src/main/java/com/flink/processor/function/KeyPointSelector.java
View file @
4ba81497
...
...
@@ -72,7 +72,7 @@ public class KeyPointSelector extends KeyedProcessFunction<Tuple2<String, Long>,
}
allPoints
.
sort
(
Comparator
.
comparingLong
(
p
->
p
.
rowNum
));
// 2. 执行关键点选择算法
(Python逻辑)
// 2. 执行关键点选择算法
List
<
ResultRecord
>
keyPoints
=
selectKeyPoints
(
allPoints
);
// 3. 生成坐标数组字符串
...
...
@@ -117,7 +117,7 @@ public class KeyPointSelector extends KeyedProcessFunction<Tuple2<String, Long>,
// 5. 计算角度(弧度转角度)
double
angle
=
Math
.
abs
(
Math
.
atan2
(
dy
,
dx
)
*
180
/
Math
.
PI
);
// 6. 阈值检查
(与Python逻辑一致)
// 6. 阈值检查
if
(
distance
>
DISTANCE_THRESHOLD
&&
angle
>
ANGLE_THRESHOLD
)
{
keyPoints
.
add
(
candidate
);
currentKeyPoint
=
candidate
;
// 更新当前关键点
...
...
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