Why does Mathf.LerpAngle do it yourself?

I am creating an air speedometer. I would like to receive the speed value from the external script and control the rotation with that value. But there is a problem. This is because the rotation values are different within the scale displayed on the speedometer and within Unity. 40 kn speed 40 If you need to stop on the grid, inside Unity inside this angle will not fit from 30. So I used Mathf.LerpAngle in search, but I do not have the desired result value. I want to match the scale based on the received value. I would be pleased if you could help. I am writing a translation with a Korean who can not speak English well. I am sorry in advance. Thank you very much. Here is my incorrect script.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AirplaneController : MonoBehaviour
{
    public GameObject ownShip;
    public float kn;
    public float km;
    public float ms;

    private Rigidbody rb;

    public float sp;

    private void Start()
    {
        rb = ownShip.GetComponent<Rigidbody>();
    }

    void Update ()
    {
        float translation = Input.GetAxis("Vertical") * sp;

        rb.AddForce(ownShip.transform.forward * Time.deltaTime * translation * 3.5f);    

        ms = rb.velocity.magnitude;

        kn = rb.velocity.magnitude * 1.943844f;   
    }

    void OnGUI()
    {
        GUI.Box(new Rect(10, 10, 150, 90), "Measurements");

        GUI.Label(new Rect(20, 40, 120, 20), "kn       " + kn);

        GUI.Label(new Rect(20, 60, 120, 20), "km/h   " + km);

        GUI.Label(new Rect(20, 80, 120, 20), "m/s     " + ms);
    }
}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Airspeed : MonoBehaviour {

    public GameObject ownShip;

    public GameObject PIN;
    public Vector3 target40 = new Vector3(0f, 0f, 30f);
    public Vector3 target60 = new Vector3(0f, 0f, 70f);
    public Vector3 target80 = new Vector3(0f, 0f, 115f);
    public Vector3 target100 = new Vector3(0f, 0f, 165f);
    public Vector3 target120 = new Vector3(0f, 0f, 205f);
    public Vector3 target140 = new Vector3(0f, 0f, 235f);
    public Vector3 target160 = new Vector3(0f, 0f, 265f);
    public Vector3 target180 = new Vector3(0f, 0f, 290f);
    public Vector3 target200 = new Vector3(0f, 0f, 320f);

void Start ()
    {

    }

void Update ()
    {
        float velocityZ = ownShip.GetComponent<AirplaneController>().kn;

        velocityZ = Mathf.Clamp(velocityZ, 0f, 200f);

        if (velocityZ >= 0.1f && velocityZ <= 40)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target40.z, Time.deltaTime));
        }
        if (velocityZ >= 40 && velocityZ <= 60)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target60.z, Time.deltaTime));
        }
        if (velocityZ >= 60 && velocityZ <= 80)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target80.z, Time.deltaTime));
        }
        if (velocityZ >= 80 && velocityZ <= 100)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target100.z, Time.deltaTime));
        }
        if (velocityZ >= 100 && velocityZ <= 120)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target120.z, Time.deltaTime));
        }
        if (velocityZ >= 120 && velocityZ <= 140)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target140.z, Time.deltaTime));
        }
        if (velocityZ >= 140 && velocityZ <= 160)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target160.z, Time.deltaTime));
        }
        if (velocityZ >= 160 && velocityZ <= 180)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target180.z, Time.deltaTime));
        }
        if (velocityZ >= 180 && velocityZ <= 200)
        {
            PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target200.z, Time.deltaTime));
        }
    }
}

Personally I would go for a different approach, since the speed to angle conversion is not linear. But first of all some suggestions:
Try avoid duplicate code PIN.transform.localEulerAngles = new Vector3(0f, 0f, Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target200.z, Time.deltaTime)); can be converted to a method which will be:

/// <summary>
///		Apply the angle in degrees to the pin
/// </summary>
void ApplyAngle(float angle)
{
	angle = Mathf.LerpAngle(PIN.transform.localEulerAngles.z, target200.z, Time.deltaTime);
	PIN.transform.localEulerAngles = new Vector3(0f, 0f, angle);
}

Also you have a if sequence of if (velocityZ >= 0.1f && velocityZ <= 40)... if (velocityZ >= 40 && velocityZ <= 60)..., when the velocityZ is exactly 40 it will pass both statements. instead you could do: if (velocityZ > 180)... else if (velocityZ > 160)...

But I recommended you to use a different approach, so here it is:

using UnityEngine;

/// <summary>
///		Unfortunatly Unity does not expose interfaces
/// </summary>
public abstract class MovableBehaviour : MonoBehaviour
{
	/// <summary>
	///		I don't know what this represents kilo Newton?
	/// </summary>
	public float KN { get; protected set; }

	/// <summary>
	///		Get the speed in meters per second
	/// </summary>
	public float Speed { get; protected set; }
}


using UnityEngine;

[RequireComponent(typeof(Rigidbody))]
public class Airplane : MovableBehaviour
{
	[SerializeField] float _acceleration = 3.5f;
	Rigidbody _rigidbody;
	
	/// <summary>
	///		Construct
	/// </summary>
	void Awake()
	{
		_rigidbody = gameObject.GetComponent<Rigidbody>();
	}

	/// <summary>
	///		Initialize
	/// </summary>
	void Start()
	{
		UpdateMovable();
	}

	/// <summary>
	///		Called at a fixed time step
	/// </summary>
	void FixedUpdate()
	{
		// Add force
		var force = transform.forward;

		// Scale the force according to the user input and time step
		force *= GetInputForce() * Time.fixedDeltaTime;

		// Apply
		_rigidbody.AddForce(force);

		// Recalculate speed
		UpdateMovable();
	}
	
	/// <summary>
	///		Get the user applied force
	/// </summary>
	float GetInputForce()
	{
		// Get input value
		var force = Input.GetAxis("Vertical");

		// Apply stats
		force *= _acceleration;
		
		return force;
	}

	/// <summary>
	///		Update the values for the interface
	/// </summary>
	void UpdateMovable()
	{
		// Get speed
		var velocity = _rigidbody.velocity;
		var speed = velocity.magnitude;

		// Apply speed
		Speed = speed;
		
		// No idea what the meaning of this is
		const float knMultiplier = 1.943844f;
		KN = speed * knMultiplier;
	}
}


using UnityEngine;

/// <summary>
///		Unfortunatly Unity does not expose interfaces
/// </summary>
public abstract class SpeedometerBehaviour : MonoBehaviour
{
	/// <summary>
	///		Converts speed to angle
	/// </summary>
	public abstract float Speed2Angle(MovableBehaviour movable);
}


using UnityEngine;

public class Speedometer : SpeedometerBehaviour
{
	public SpeedometerBehaviour Meter;
	public MovableBehaviour Movable;

	[SerializeField] Transform _indicator;
	[SerializeField] float _angleSmoothTime = 0.3f;
	float _angleVelocity;
	float _angle;

	/// <summary>
	///		Constructor
	/// </summary>
	void Awake()
	{
		// Set to negative infinity first to make sure angle is initialized correctly
		_angle = Mathf.NegativeInfinity;
		_angle = Meter.Speed2Angle(Movable);
	}

	/// <summary>
	///		Called at the end of every frame
	/// </summary>
	void LateUpdate()
	{
		// If meter is not assign, use default one (itself)
		if (Meter == null)
			Meter = this;

		// Get angle
		_angle = Meter.Speed2Angle(Movable);
		
		// Apply
		_indicator.localEulerAngles = new Vector3(0.0f, 0.0f, _angle);
	}

	/// <inheritdoc />
	public override float Speed2Angle(MovableBehaviour speed)
	{
		/*
		 * Plot this data in a spreadsheet app
		 * In this case I used Google Spreadsheets
		 * Insert this data
		 * 40	30
		 * 60	70
		 * 80	115
		 * 100	165
		 * 120	205
		 * 140	235
		 * 160	265
		 * 180	290
		 * 200	320
		 * 
		 * Select the data, click on insert chart
		 * Select line chart
		 * Go to the Customise tab, then Series
		 * Toggle Trend line on.
		 * Set the label to Use equation
		 * Set the type to the one with the best result
		 * In this case Polynomial.
		 * 
		 * Now you see the required equation
		 * 
		 */

		// Apply the required equation
		var x = speed.KN;
		var y = -82.095f + 2.877f * x + -0.004f * x * x;
		
		// Clamp its value so it is safe
		y = Mathf.Clamp(y, 0.0f, 320.0f);

		// Fast up
		if (y > _angle)
		{
			_angleVelocity = 0.0f;
			return y;
		}

		// Smooth down
		return Mathf.SmoothDamp(_angle, y, ref _angleVelocity, _angleSmoothTime);
	}
}

If you have any questions about the code, architecture or anything else, don’t hesitate to ask them.