Files
FootwearTest-20260602/Footwear Test methodsfor wholeshoe Slipresistanceperformance/Models/SlipDeviceSnapshot.cs
2026-06-22 10:16:43 +08:00

27 lines
1008 B
C#
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.
using System;
namespace Footwear_Test_methodsfor_wholeshoe_Slipresistanceperformance.Models
{
public sealed record SlipDeviceSnapshot(
DateTime Timestamp,
double VerticalLoadN,
double HorizontalFrictionN,
double DisplacementMm,
bool IsTestRunning,
bool IsResetting,
bool IsConnected,
string LastError)
{
// 低载荷段(加载/抬升阶段垂直力很小H/V 会放大成无意义尖峰(现场曲线冲到 1.4)。
// GB/T 3903.6 初始压力为 50N载荷低于该量级时摩擦系数无意义置零以保证曲线干净。
public const double MinimumLoadForCoefficientN = 30.0;
public double FrictionCoefficient => Math.Abs(VerticalLoadN) >= MinimumLoadForCoefficientN
? HorizontalFrictionN / VerticalLoadN
: 0;
public static SlipDeviceSnapshot Offline(string error = "") =>
new(DateTime.Now, 0, 0, 0, false, false, false, error);
}
}