02.05.2017, 08:51
In the ade7878.go source, there are a bunch of constants defined per phase. It doesn't seem necessary to do this, as all of the values are the same per phase. It would greatly simplify things if we could eliminate the per-phase component.
Code:
CURRENT_RESISTOR_A float32 = 7.07107
CURRENT_RESISTOR_B float32 = 7.07107
CURRENT_RESISTOR_C float32 = 7.07107
CURRENT_RESISTOR_N float32 = 7.07107
CURRENT_CLAMP_FACTOR_A float32 = 0.05
CURRENT_CLAMP_FACTOR_B float32 = 0.05
CURRENT_CLAMP_FACTOR_C float32 = 0.05
CURRENT_CLAMP_FACTOR_N float32 = 0.05
OFFSET_CURRENT_A float32 = 0.97129167
OFFSET_CURRENT_B float32 = 0.97129167
OFFSET_CURRENT_C float32 = 0.97129167
OFFSET_CURRENT_N float32 = 0.97129167
OFFSET_VOLTAGE_A float32 = 1.0
OFFSET_VOLTAGE_B float32 = 1.0
OFFSET_VOLTAGE_C float32 = 1.0
POWER_CORRECTION_FACTOR_A float32 = 0.019413
POWER_CORRECTION_FACTOR_B float32 = 0.019413
POWER_CORRECTION_FACTOR_C float32 = 0.019413