Documentation
¶
Overview ¶
Package chargertestbench provides the measurement maths behind charger and power bank bench testing: converting raw meter samples into the figures worth publishing, and rejecting runs that are not valid.
A single wattage reading proves very little. What matters is sustained output after thermal soak, ripple under load, and whether the test conditions were controlled enough for the number to mean anything.
Index ¶
Constants ¶
const ThermalSoakSeconds = 600
ThermalSoakSeconds is how long a charger must run before its output is considered settled. Measurements before this reflect a cold unit and overstate sustained capability.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Run ¶
type Run struct {
RatedWatts float64
Samples []Sample
// AmbientCelsius is the room temperature the run was conducted at.
AmbientCelsius float64
}
Run is a complete bench test.
func (Run) MeetsRating ¶
MeetsRating reports whether sustained output is within tolerance of the rating.
func (Run) SustainedWatts ¶
SustainedWatts is the median power after thermal soak — the figure that actually describes what a charger delivers in use.
func (Run) ThrottlePercent ¶
ThrottlePercent is how much output falls from peak to sustained. A large gap means the charger cannot hold its rating once warm.
func (Run) Valid ¶
Valid reports whether the run is long enough and controlled enough to publish. Runs that never reached thermal soak, or that lack an ambient reference, produce numbers that cannot be compared against anything.
func (Run) VoltageRipplePercent ¶
VoltageRipplePercent is peak-to-peak voltage variation after soak, relative to mean voltage. High ripple stresses a device's own regulator.