Skip to content

Commit c73f85f

Browse files
committed
修改GPX的速度平滑窗口大小由暂无UI的参数控制并将窗口大小从19改为3
1 parent ac71864 commit c73f85f

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

MapBoard.Core/Parameters.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public static class Parameters
5252
/// </summary>
5353
public static TimeSpan LoadTimeout { get; set; } = TimeSpan.FromSeconds(5);
5454

55+
public static int GpxSpeedSmoothWindow { get; set; } = 3;
56+
5557
public static AppType AppType { get; set; }
5658
}
5759
}

MapBoard.Core/Util/GpxUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ await Task.Run(() =>
9292
public static async Task LoadColoredGpxAsync(GpxTrack gpxTrack, GraphicCollection graphics)
9393
{
9494
var points = gpxTrack.Points;
95-
var speeds = await GetMeanFilteredSpeedsAsync(points, 19, false);
95+
var speeds = await GetMeanFilteredSpeedsAsync(points, Parameters.GpxSpeedSmoothWindow, false);
9696
var orderedSpeeds = speeds.OrderBy(p => p).ToList();
9797
int speedsCount = speeds.Count;
9898
int maxIndex = 0;

MapBoard.UI/App.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ private async void Application_Startup(object sender, StartupEventArgs e)
108108
//设置日期时间格式
109109
Model.FeatureAttribute.DateFormat = Parameters.DateFormat;
110110
Model.FeatureAttribute.DateTimeFormat = Parameters.TimeFormat;
111+
Parameters.GpxSpeedSmoothWindow = Config.Instance.GpxSpeedSmoothWindow;
111112

112113
//设置属性
113114
Config.Instance.ThemeChanged += (p1, p2) =>

MapBoard.UI/Config.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ public static Config Instance
103103
/// </summary>
104104
public bool EnableBasemapCache { get; set; } = true;
105105

106+
/// <summary>
107+
/// GPX速度相关平滑的窗口大小
108+
/// </summary>
109+
public int GpxSpeedSmoothWindow { get; set; } = 5;
110+
106111
/// <summary>
107112
/// GPX工具箱中,是否自动平滑
108113
/// </summary>
@@ -111,7 +116,7 @@ public static Config Instance
111116
/// <summary>
112117
/// GPX工具箱中,自动平滑的等级(窗口大小)
113118
/// </summary>
114-
public int Gpx_AutoSmoothLevel { get; set; } = 5;
119+
public int Gpx_AutoSmoothLevel { get; set; } = 3;
115120

116121
/// <summary>
117122
/// GPX工具箱中,是否仅自动平滑高程

日志.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,4 +2117,8 @@ Url DataGrid修改为ListBox+文本框,方便修改
21172117

21182118
【地图画板】新增支持在已打开软件的情况下,双击外部GPX文件可以在已有窗口中打开
21192119

2120-
【地图画板】修复了框选功能失效的BUG
2120+
【地图画板】修复了框选功能失效的BUG
2121+
2122+
## 20231228
2123+
2124+
【地图画板】修改GPX的速度平滑窗口大小由暂无UI的参数控制并将窗口大小从19改为3

0 commit comments

Comments
 (0)