 public class AnglesHelper
    {
        private IOptionsMonitor<AppSettings> _appMonitor;

        private Dictionary<InclPlaceType, InclinometerTelemetryInfo<double>> _inclinometers = new(4);
        public InclinometerTelemetryInfo<double> Bucket => _inclinometers.GetValueOrDefault(InclPlaceType.Bucket);
        public InclinometerTelemetryInfo<double> Arm => _inclinometers.GetValueOrDefault(InclPlaceType.Arm);
        public InclinometerTelemetryInfo<double> Boom => _inclinometers.GetValueOrDefault(InclPlaceType.Boom);
        public InclinometerTelemetryInfo<double> Body => _inclinometers.GetValueOrDefault(InclPlaceType.Body);

        public AnglesShovel ShovelAngles =>
            Arm is not null && Boom is not null && Bucket is not null && Body is not null
            ? new AnglesShovel
            {
                Arm = new() { Pitch = Arm.Pitch, Roll = Arm.Roll },
                Boom = new() { Pitch = Boom.Pitch, Roll = Boom.Roll },
                Bucket = new() { Pitch = Bucket.Pitch, Roll = Bucket.Roll },
                Body = new() { Pitch = Body.Pitch, Roll = Body.Roll }

            } : null;

        public AnglesHelper(IOptionsMonitor<AppSettings> appMonitor)
        {
            _appMonitor = appMonitor;
        }

        internal void OnAngleChanged(AnglesData<EulerAngles> args)
        {
            CorrectAnglesArgs(args);
            Logger.Information($"[{args.Address}]Pitch: {args.Value.Pitch}, roll: {args.Value.Roll}", LogType.Inclinometers);

            var device = _appMonitor.CurrentValue.Inclinometer.Devices.First(d => d.CanAddress == (int)args.Address);

            if (Body is not null && device.InclPlaceType != InclPlaceType.Body)
            {
                args.Value.Pitch -= Body.Pitch;
            }

            _inclinometers[device.InclPlaceType] = new InclinometerTelemetryInfo<double>
            {
                Address = args.Address,
                InclPlaceType = device.InclPlaceType,
                Pitch = args.Value.Pitch,
                Roll = args.Value.Roll,
                IsCorrect = args.IsCorrect.GetValueOrDefault(),
            };
        }

        private void CorrectAnglesArgs(AnglesData<EulerAngles> args)
        {
            if (args.IsCorrect.HasValue)
                if (!args.IsCorrect.Value)
                    Logger.Warning($"[{args.Address}] Incorrect positioning", LogType.Inclinometers);

            if (double.IsNaN(args.Value.Pitch))
            {
                Logger.Warning($"[{args.Address}] pitch is NaN -> convert to 0", LogType.Inclinometers);
                args.Value.Pitch = 0;
            }
            if (double.IsNaN(args.Value.Roll))
            {
                Logger.Warning($"[{args.Address}] roll is NaN -> convert to 0", LogType.Inclinometers);
                args.Value.Roll = 0;
            }

            args.Value.Pitch += _appMonitor.CurrentValue.Inclinometer.Devices.First(d => d.CanAddress == (int)args.Address).OffsetPitch;
            args.Value.Roll += _appMonitor.CurrentValue.Inclinometer.Devices.First(d => d.CanAddress == (int)args.Address).OffsetRoll;
        }
    }

How to optimize this code if OnAngleChanged invoke very often&