Commit Graph

15 Commits

Author SHA1 Message Date
38183f5282 Calculator: size cables for ampacity and drop budget
recommendedCrossSection now satisfies two criteria and takes whichever
demands more copper: the voltage-drop budget, and an ampacity at least
as high as the fuse protecting the circuit (ABYC E-11: the OCP rating
must not exceed the conductor's ampacity). Ampacity comes from ABYC
E-11 Table 6A for AWG and ISO 13297 Table A1 for mm², both 105 °C.

Before this, a 40 A load over 0.5 m was sized 1.5 mm² / AWG 16 next to
a 50 A fuse: a cable the fuse can never protect. Long runs stay
voltage-drop driven and unchanged.

The drop budget is now stored per system (3 / 5 / 10 %) and editable in
the system editor, with a global default in Settings that the
standalone calculator uses and new systems inherit.

Cross-sections are derived, never entered by the user, so LoadCableSync
re-derives them when a system opens and when its budget changes.
Library loads are computed instead of being stored as a 1.0 mm²
placeholder. LoadConfigurationStatus therefore reports only what the
user can actually fix: missing length or current.

Also removes the dead cable.pro.* strings and folds three copies of the
mm²-to-AWG conversion into ElectricalCalculations.nearestAWG.
2026-08-18 10:59:16 +02:00
ea3b60d75c Fix AWG notation, add alternator type, migrate to String(localized:)
- Fix AWG 0/00/000/0000 bug (all resolved to 0 in Swift) using negative
  int convention (-1 through -4) with formatAWG() for 1/0–4/0 display
- Add 7.5A fuse size and change fuse type from Int to Double
- Add alternator power source type with distinct bolt.car.fill icon
- Migrate all NSLocalizedString calls to String(localized:defaultValue:)
- Update translations for runtime subtitle (ES/FR/NL: current→maximum),
  usable capacity footer text, and NL override wording
- Store length always in meters, convert at display time in CalculatorView
- Add preview-friendly inits for ComponentLibraryView and LoadsView
- Expand test coverage for calculations, fuses, AWG, and edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:37:53 +01:00
Stefan Lange-Hegermann
03878b9507 Add analytics tracking, overview PDF export, and charger updates
Add first launch event, share tracking for overview PDF and diagram
exports. Add SystemOverviewPDFExporter for A4 PDF generation. Update
charger model with new configuration fields and localization for all
5 languages. Refresh app icon assets and CLAUDE.md build instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:45:54 +01:00
Stefan Lange-Hegermann
34e8c0f74b Add duty cycle/utilization fields, wheel picker for goals, and updated screenshots
- Add dutyCyclePercent and defaultUtilizationFactorPercent to ComponentLibraryItem
  with normalization logic and backend field fetching
- Change default dailyUsageHours from 1h to 24h
- Replace goal editor stepper with day/hour/minute wheel pickers
- Update app icon colors and remove duplicate icon assets
- Move SavedBattery.swift into Batteries/ directory, remove Pods group
- Add iPad-only flag and start frame support to screenshot framing scripts
- Rework localized App Store screenshot titles across all languages
- Add runtime goals and BOM completed items to sample data
- Bump version to 1.5.1 (build 41)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:49:21 +01:00
Stefan Lange-Hegermann
8da6987f32 better overview design in dark mode 2025-11-07 21:11:59 +01:00
Stefan Lange-Hegermann
b11d627fdb PDF BOM export 2025-11-07 11:18:03 +01:00
Stefan Lange-Hegermann
ced06f9eb6 ads tracking 2025-11-05 11:13:54 +01:00
Stefan Lange-Hegermann
5fcc33529a beautiful glass design 2025-10-29 15:23:13 +01:00
Stefan Lange-Hegermann
97a9d3903c much better system overview 2025-10-29 12:55:47 +01:00
Stefan Lange-Hegermann
45a462295d system overview is cleaner now 2025-10-29 10:22:54 +01:00
Stefan Lange-Hegermann
46664625b4 some advanced settings 2025-10-28 13:31:51 +01:00
Stefan Lange-Hegermann
0989c68aa7 well designed system overview 2025-10-23 17:23:38 +02:00
Stefan Lange-Hegermann
51d85cc352 chargers in overview 2025-10-23 15:27:22 +02:00
Stefan Lange-Hegermann
0720529821 adds chargers 2025-10-23 14:09:16 +02:00
Stefan Lange-Hegermann
6258a6a66f more consitancy 2025-10-22 22:43:03 +02:00