Skip to content

[BUG]: exerciseEngine plank hipSplineDeviation hardcoded to 0 — hip sagging/hyperextension permanently undetectable#997

Open
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/942-exerciseengine-plank-hp-deviation
Open

[BUG]: exerciseEngine plank hipSplineDeviation hardcoded to 0 — hip sagging/hyperextension permanently undetectable#997
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/942-exerciseengine-plank-hp-deviation

Conversation

@vipul674

Copy link
Copy Markdown

Description

hipSplineDeviation was assigned the literal 0, making hipSagging and hipHyperextension always false regardless of actual posture. The original spline regression code was deleted in a previous refactor.

Fix

Re-implemented computeHipSplineDeviation() function that:

  • Computes shoulder, hip, and knee midpoints (averaging left/right landmarks)
  • Projects the expected hip Y along the shoulder→knee line
  • Returns the difference between actual and expected hip Y
  • Returns 0 if landmarks are missing or insufficient

Changes

  • src/services/exerciseEngine.ts: Added computeHipSplineDeviation function, restored live deviation calculation

Closes #942

hipSplineDeviation was hardcoded to 0, making plank sagging and
hyperextension permanently undetectable. Re-implemented using
shoulder/hip/knee landmark midpoints to compute actual deviation.

Closes Somil450#942
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@vipul674 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vipul674

Copy link
Copy Markdown
Author

@Somil450 Please review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: exerciseEngine plank hipSplineDeviation hardcoded to 0 — hip sagging/hyperextension permanently undetectable

1 participant