airport-qingdao-vue3/README.md
2025-07-15 11:49:27 +08:00

81 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 前端运行
```bash
# 克隆项目
git clone https://github.com/yangzongzhuan/RuoYi-Vue3.git
# 进入项目目录
cd RuoYi-Vue3
# 安装依赖
yarn --registry=https://registry.npmmirror.com
# 启动服务
yarn dev
# 构建测试环境 yarn build:stage
# 构建生产环境 yarn build:prod
# 前端访问地址 http://localhost:80
```
未完成任务:
1.左侧菜单栏:刷新状态不保存
2.左侧二级菜单选中的时候 一级菜单无背景色
超图地图开发使用基础
1、前期准备工作熟悉超图地图服务以及基本的操作。
2、熟悉Openlayers以及Leaflet相关操作
当前项目用于青岛机场正式版
20250711关键改进说明
1. 平滑动画核心系统
​​动画循环引擎​​:使用 requestAnimationFrame 创建流畅的60FPS动画循环
​​运动预测算法​​:
记录车辆移动历史轨迹最多3个点
计算运动方向向量用于预测后续位置
​​物理引擎​​:
基于真实速度计算每帧最大移动距离
方向插值时考虑车速影响(车速越高转向越慢)
2. 新数据结构
vehicleAnimations存储所有平滑动画所需数据
当前位置和方向
目标位置和方向
最后更新时间
预测向量
vehicleMotionHistory存储最近位置点用于轨迹预测
3. 增强的位置更新逻辑
收到新位置时记录历史点
计算历史点间的移动向量
设置目标位置时包含预测偏移量
当超过300ms没有新数据时使用预测向量继续移动
4. 性能优化
距离阈值检查0.1米)避免不必要的计算
角度归一化处理0-360度边界情况
使用缓动函数使运动曲线更自然
5. 暴露控制接口
通过defineExpose提供了三个新方法
startVehicleSmoothing():启动平滑动画
stopVehicleSmoothing():停止平滑动画
resetVehicleAnimations():重置所有动画数据
使用建议
将此组件整合到现有项目中
调用startVehicleSmoothing()启动平滑效果
处理WebSocket消息时继续调用updateVehiclePosition()
当组件隐藏时调用stopVehicleSmoothing()节省资源
### 运行方向分析:
地图上方(heading=72)
|
|
地图左侧(heading=342) --+-- 地图右侧(heading=162)
|
|
地图下方(heading=252)