2.8 KiB
2.8 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-17T16:03:17.838159+00:00 | zai-org/GLM-5-FP8 | 1 | f8b0959de0ed6cde |
DTS.Common.Calculations
Purpose
This module provides mathematical calculation utilities for signal processing and injury analysis. It supports integration of time-series data, generation of resultant vectors from multi-axis inputs, and computation of the Head Injury Criterion (HIC) used in impact analysis. The module is designed to work with filtered engineering unit data from sensor channels.
Public Interface
ChannelData
string Units { get; }- Engineering units of the data (read-only, set via constructor).double[] FilteredEU { get; set; }- Pre-filtered engineering unit data array.ChannelData(string units)- Constructor accepting engineering units string.
Integral (static class)
static double DefiniteIntegral(double[] input, int start, int end, double SPS)- Computes definite integral using trapezoidal summation. Parameters: input data array, start index (inclusive), end index (inclusive), samples per second. Returns integrated value.
Resultant (static class)
static ChannelData GenerateResultantChannel(List<ChannelData> channels)- Generates a resultant vector channel from input channels using sum-of-squares method. Returns newChannelDatawith sqrt(Σxi²) values. Asserts all channels have same length and units.
HeadInjuryCriterion
static HICResult GetHeadInjuryCriterion(ChannelData resultant, double SPS, int clipLengthMS)- Calculates maximum HIC over the input data for the specified clip length. ReturnsHICResultwith max HIC value and sample indices.- HICResult (nested class)
int StartSample { get; }- Start sample index of max HIC window.int EndSample { get; }- End sample index of max HIC window.int HicLengthMS { get; }- HIC window length in milliseconds.double HIC { get; }- The HIC value.HICResult(double hic, int hicLength, int startSample, int endSample)- Constructor.
Invariants
DefiniteIntegralassumes input data is tightly time-aligned (uniform sampling interval).GenerateResultantChannelasserts all input channels have identicalFilteredEU.Lengthand identicalUnits.GetHeadInjuryCriterionrequiresSPS > 0andclipLengthMS > 0(asserted).GetHeadInjuryCriterionasserts data length is at leastclipLengthMSworth of samples.- HIC calculation uses the formula:
hic = clipInSeconds * (integral / clipInSeconds)^2.5
Dependencies
- Depends on:
System,System.Collections.Generic,System.Linq - Depended on by: Unc