These files define constants (for example,
nominal voltage or frequency, or sample rates), preprocessor macros for feature enablement
(for example, HARMONICS_SUPPORT and NEUTRAL_MONITOR_SUPPORT), and the critical
data structures that hold all information related to metrology.
- metrologyData: The top-level
global structure, an instance of which holds all data for all phases, neutral, totals, and
system status.
- phaseMetrology or
neutralMetrology: Structures within metrologyData containing parameters
(params) and readings (readings) for each phase and the neutral line.
- params: Stores configuration,
intermediate accumulations from background (like dotProd arrays), calibration-derived
values, and state variables (for example, for PLL, and sag and swell).
- readings: Stores the final
calculated metrology values (RMS, power, PF, and so forth).
- calibrationData
(metrology_nv_structs.h): Holds the calibration coefficients.