Skip to content

Add angular feedforward to the flywheel calculator#2065

Draft
Eeshwar-Krishnan wants to merge 1 commit intotervay:mainfrom
Eeshwar-Krishnan:change_flywheel_feedforward_units
Draft

Add angular feedforward to the flywheel calculator#2065
Eeshwar-Krishnan wants to merge 1 commit intotervay:mainfrom
Eeshwar-Krishnan:change_flywheel_feedforward_units

Conversation

@Eeshwar-Krishnan
Copy link
Copy Markdown
Contributor

Reference implementation/closing #2064

Minimal change, added a seperate kV (angular) and kA (angular). I considered adding them to the dropdown, but this would require additional changes to Measurements which is probably overscoped for a minimal change to the flywheel system.

@tervay
Copy link
Copy Markdown
Owner

tervay commented Feb 21, 2026

Deploy preview for recalc ready!

✅ Preview
https://recalc-lhgi9mpyb-tervays-projects.vercel.app

Built with commit efd06cf.
This pull request is being automatically deployed with vercel-action

Copy link
Copy Markdown
Owner

@tervay tervay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple minor things, otherwise lgtm

kA: Measurement;
distanceType: "linear" | "angular";
kG?: Measurement;
kVAlt?: Measurement;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just name these kvAngular and kaAngular rather than 'alt'


// kA = V_nominal * I / tau_stall
// Units: V * kg*m^2 / (N*m) = V * s^2
const kAInSec = nominalVoltage.mul(moiInSI).div(stallTorqueAtShooter);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a division by zero guard above this

if stallTorqueAtShooter == 0
  return new Measurement(0, "...")

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.

2 participants