diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/calculation_parameters.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/calculation_parameters.hpp index 8c92a6cdc..8e70e3f11 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/calculation_parameters.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/calculation_parameters.hpp @@ -110,7 +110,6 @@ template struct PowerSensorCalcParam { // current sensor calculation parameters for state estimation // The value is the complex current -// * for appliances, it is always in injection direction // * for branches, the direction is node -> branch template struct CurrentSensorCalcParam { using sym = sym_type; @@ -119,8 +118,8 @@ template struct CurrentSensorCalcParam { AngleMeasurementType angle_measurement_type{}; ComplexValue value{}; - double i_variance{}; // variance (sigma^2) of the error range of the current, in p.u. - double i_angle_variance{}; // variance (sigma^2) of the error range of the current angle, in p.u. + double i_real_variance{}; // variance (sigma^2) of the error range of real part of the current, in p.u. + double i_imag_variance{}; // variance (sigma^2) of the error range of imaginary part of the current, in p.u. }; template diff --git a/tests/cpp_unit_tests/test_current_sensor.cpp b/tests/cpp_unit_tests/test_current_sensor.cpp index a48d0a8cc..d5f0e1920 100644 --- a/tests/cpp_unit_tests/test_current_sensor.cpp +++ b/tests/cpp_unit_tests/test_current_sensor.cpp @@ -59,8 +59,8 @@ TEST_CASE("Test current sensor") { // Check symmetric sensor output for symmetric parameters CHECK(sym_sensor_param.angle_measurement_type == AngleMeasurementType::local); - CHECK(sym_sensor_param.i_variance == doctest::Approx(0.0)); - CHECK(sym_sensor_param.i_angle_variance == doctest::Approx(0.0)); + CHECK(sym_sensor_param.i_real_variance == doctest::Approx(0.0)); + CHECK(sym_sensor_param.i_imag_variance == doctest::Approx(0.0)); CHECK(real(sym_sensor_param.value) == doctest::Approx(0.0)); CHECK(imag(sym_sensor_param.value) == doctest::Approx(0.0)); @@ -70,8 +70,8 @@ TEST_CASE("Test current sensor") { CHECK(is_nan(sym_sensor_output.i_angle_residual)); // Check symmetric sensor output for asymmetric parameters - CHECK(asym_sensor_param.i_variance == doctest::Approx(0.0)); - CHECK(asym_sensor_param.i_angle_variance == doctest::Approx(0.0)); + CHECK(asym_sensor_param.i_real_variance == doctest::Approx(0.0)); + CHECK(asym_sensor_param.i_imag_variance == doctest::Approx(0.0)); CHECK(real(asym_sensor_param.value[0]) == doctest::Approx(0.0)); CHECK(imag(asym_sensor_param.value[1]) == doctest::Approx(0.0));