Skip to content

Main content

Movement Cycle Anchor Gap Tool

Calculate movement cycle anchor gap from explicit caller-supplied inputs.

Loading tool…

Description

Wrap an integer event sample into a supplied cycle and report its shortest signed sample gap from an anchor.

Movement research distinguishes elapsed time, active time, cycle phase, measured force, and assessment-score conventions. Normalizing or remapping these quantities can help compare records when their units and definitions agree. A local arithmetic term does not by itself validate a functional assessment or an exercise program.

Wrap an integer event sample into a supplied cycle and report its shortest signed sample gap from an anchor.

When to use this tool

Use Movement Cycle Anchor Gap when you need this motion, timing, force, annotation, or score-mapping component for supplied research records.

How to use the tool and how it works

  1. Enter eventSample, cycleStartSample, samplesPerCycle, suppliedAnchorPhase. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read phase, signedAnchorGap. Use the output convention below.

For positive integer samplesPerCycle and a valid suppliedAnchorPhase use exact integer subtraction and modulo to wrap eventSample-cycleStartSample into phase. Return signedAnchorGap as the nearest signed displacement from the anchor, wrapping gaps beyond half a cycle.1

Input fieldMeaning and unitsAccepted input
eventSampleEvent SampleRequired. Safe integer.
cycleStartSampleCycle Start SampleRequired. Safe integer.
samplesPerCycleSamples Per CycleRequired. Safe integer; minimum 1.
suppliedAnchorPhaseSupplied Anchor PhaseRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
phasePhaseRequired. Safe integer.
signedAnchorGapNearest signed sample displacement; exact half-cycle retains its original sign.Required. Safe integer.
json
{
  "input": {
    "eventSample": 12,
    "cycleStartSample": 3,
    "samplesPerCycle": 10,
    "suppliedAnchorPhase": 1
  },
  "output": {
    "phase": 9,
    "signedAnchorGap": -2
  }
}

Limitations and assumptions

  • Sample coordinates are integer indices, not seconds. Exact half-cycle ties retain the original displacement sign; the calculation does not detect cycles or establish a clinical movement event.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.

Alternative or Complementary methods

Use the intended assessment or motion-analysis protocol with verified timing, units, and event annotations. A complete interpretation needs the relevant measurement properties and task context beyond this local calculation.

References

  1. Calculation and input contract: physiotherapy/movement-cycle-anchor-gap — tool.io

Similar or alternative tools

  • Motion Repetition Phase Gap

    Compare supplied research cycle phases with a positive half-cycle tie convention.

  • Cycle Phase Relative Time

    For positive cycleLength wrap eventAt-origin into a nonnegative phase below cycleLength and return fraction=phase/cycleLength.