Skip to content

Instantly share code, notes, and snippets.

@n7275
Created January 10, 2023 20:35
Show Gist options
  • Save n7275/845dafa245c4cf73762842943e1a7c5e to your computer and use it in GitHub Desktop.
Save n7275/845dafa245c4cf73762842943e1a7c5e to your computer and use it in GitHub Desktop.
AgZn Battery Discharge Voltage
function [V] = BatVoltage(ChargeLevel,MaxChargeVoltage)
## ChargeLevel = 0.0 -- 1.0
## MaxChargeVoltage, voltage when ChargeLevel == 1.0
V = (1.007921192669853 - 0.009537198357788667./(ChargeLevel+0.09727407714017093).^2).*MaxChargeVoltage;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment