Files
BQP/srcs/RobotNet10/Commons/RobotNet10.NavigationTune/Execution/LocalizationAdapter.cs
2026-07-13 09:25:40 +07:00

17 lines
613 B
C#

namespace RobotNet10.NavigationTune.Execution;
/// <summary>
/// Adapter to wrap ILocalization from RobotApp
/// This will be implemented in the application layer that has access to RobotApp
/// </summary>
public class LocalizationAdapter(Func<double> getX, Func<double> getY, Func<double> getTheta) : ILocalizationProvider
{
private readonly Func<double> _getX = getX;
private readonly Func<double> _getY = getY;
private readonly Func<double> _getTheta = getTheta;
public double X => _getX();
public double Y => _getY();
public double Theta => _getTheta(); // radians
}