litrue_battery_calc 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +21 -0
- data/lib/litrue_battery_calc.rb +15 -0
- metadata +49 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: df702b453afc4189c921ac9e174d354b34cf3970820b205fc77bce24af4a00d3
|
|
4
|
+
data.tar.gz: dc8d22c0f9cf762249af5b3715ad8b90f2d7b511585f4d993070c9f51600c900
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c8cacee2b23a3b0c2fd26b642ff027fd4763ebda5b404a9a385fa94bf2fd81358852de8991467ee6a447416c43c8410c7380bca38bdcc96584a38532c0dd9715
|
|
7
|
+
data.tar.gz: c1eb26f7c7d380a638bb5f469240152341e16046dccbf18498f3bea00cce8c40cf951cb92898c21841c89126ae64e43a4210fad35034efd56174b0955509f632
|
data/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# LiTrue Battery Technical Documentation
|
|
2
|
+
|
|
3
|
+
Welcome to the official technical documentation and calculation specs for lithium battery solutions.
|
|
4
|
+
|
|
5
|
+
## 🔋 About LiTrue Battery
|
|
6
|
+
LiTrue Battery specializes in custom lithium-ion and LiFePO4 battery pack engineering, BMS integration, and industrial energy storage solutions.
|
|
7
|
+
|
|
8
|
+
- **Official Website**: [https://www.litruebattery.com/](https://www.litruebattery.com/)
|
|
9
|
+
- **Product Range**: Custom LiFePO4 Battery Packs, High-rate Lithium Polymer Packs, Solar Energy Storage Systems.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 📐 Battery Capacity Calculation Formula
|
|
14
|
+
|
|
15
|
+
$$\text{Capacity (Wh)} = \text{Nominal Voltage (V)} \times \text{Rated Capacity (Ah)}$$
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🌐 Official Resources
|
|
20
|
+
For customized battery engineering, design calculations, and cell specifications, please visit our official portal:
|
|
21
|
+
👉 [LiTrue Battery Official](https://www.litruebattery.com/)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module LitrueBatteryCalc
|
|
4
|
+
# Calculate Watt-hours from Voltage and Amp-hours
|
|
5
|
+
def self.calculate_wh(voltage, amp_hours)
|
|
6
|
+
voltage.to_f * amp_hours.to_f
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
# Estimate battery runtime in hours under continuous load
|
|
10
|
+
def self.estimate_runtime(total_wh, load_watts, efficiency = 0.85)
|
|
11
|
+
return 0.0 if load_watts.to_f <= 0.0
|
|
12
|
+
|
|
13
|
+
(total_wh.to_f * efficiency.to_f) / load_watts.to_f
|
|
14
|
+
end
|
|
15
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: litrue_battery_calc
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- LiTrue Battery
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-08-31 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: A lightweight calculation tool for lithium-ion and LiFePO4 battery pack
|
|
14
|
+
sizing, Watt-hour estimation, and discharge duration by LiTrue Battery.
|
|
15
|
+
email:
|
|
16
|
+
- contact@litruebattery.com
|
|
17
|
+
executables: []
|
|
18
|
+
extensions: []
|
|
19
|
+
extra_rdoc_files: []
|
|
20
|
+
files:
|
|
21
|
+
- README.md
|
|
22
|
+
- lib/litrue_battery_calc.rb
|
|
23
|
+
homepage: https://www.litruebattery.com/
|
|
24
|
+
licenses:
|
|
25
|
+
- MIT
|
|
26
|
+
metadata:
|
|
27
|
+
homepage_uri: https://www.litruebattery.com/
|
|
28
|
+
source_code_uri: https://github.com/chris-ops-sys/battery-calculator
|
|
29
|
+
changelog_uri: https://github.com/chris-ops-sys/battery-calculator/releases
|
|
30
|
+
post_install_message:
|
|
31
|
+
rdoc_options: []
|
|
32
|
+
require_paths:
|
|
33
|
+
- lib
|
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: 2.6.0
|
|
39
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
|
+
requirements:
|
|
41
|
+
- - ">="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '0'
|
|
44
|
+
requirements: []
|
|
45
|
+
rubygems_version: 3.4.19
|
|
46
|
+
signing_key:
|
|
47
|
+
specification_version: 4
|
|
48
|
+
summary: Lithium and LiFePO4 battery pack capacity and runtime calculation utility.
|
|
49
|
+
test_files: []
|