From 901107d5df97c63287754bcefdb393c337074193 Mon Sep 17 00:00:00 2001 From: petersalemink95 Date: Tue, 31 Dec 2024 09:53:30 +0100 Subject: [PATCH] i angle sigma without division Signed-off-by: petersalemink95 --- .../include/power_grid_model/component/current_sensor.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/component/current_sensor.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/component/current_sensor.hpp index 33c65b213..489303e84 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/component/current_sensor.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/component/current_sensor.hpp @@ -80,7 +80,9 @@ template class CurrentSensor : public Ge template using OutputType = CurrentSensorOutput; explicit CurrentSensor(CurrentSensorInput const& current_sensor_input, double u_rated) - : GenericCurrentSensor{current_sensor_input}, i_angle_measured_{current_sensor_input.i_angle_measured} { + : GenericCurrentSensor{current_sensor_input}, + i_angle_measured_{current_sensor_input.i_angle_measured}, + i_angle_sigma_{current_sensor_input.i_angle_sigma} { // TODO i_angle_sigma is optional set_current(current_sensor_input, u_rated); }; @@ -102,9 +104,9 @@ template class CurrentSensor : public Ge double i_angle_sigma_{}; void set_current(CurrentSensorInput const& input, double const& u_rated) { - double base_current = base_power_3p / u_rated / sqrt3 double scalar = convert_direction() / base_current; + double base_current = base_power_3p / u_rated / sqrt3; + double scalar = convert_direction() / base_current; i_sigma_ = input.i_sigma / base_current; - i_angle_sigma_ = input.i_angle_sigma / base_current; // TODO i_angle_sigma is optional i_measured_ = input.i_measured / base_current; }