Trying to import RightAscension to my stars but need help with insert hours, min and sec

I am doing an app of constellations using csv data and stuffs. Now I could insert the data with code in the inspector and display it with prefabs. Now, the thing is I want to be able to insert the RA of the data (hours, min, seconds)
in the code that implement the data I wrote first the statement of it as public float at least to be able to see it
[System.Serializable]
public class StarData
{

public float RightAscension;

}

I run the scene and I can see the float perfectly in the inspector. I have another script where I call this other scrip with strings and all of that but the thing that I just want is to be able to set three different variables for hour, min and second to the public float RightAscension.

I want to insert something like this but I dont know how to grab it.
public float RightAscensionToDegree(int hour, int min = 0, float sec = 0.0f)
{
var h = 360.0f / 24.0f;
var m = h / 60.0f;
var s = m / 60.0f;

return (h * hour + m * min + s * sec) * -1.0f;
}

and then in the other script calling it with this line of code

RightAscension = RightAscensionToDegree(int.Parse(values[1]), int.Parse(values[2]), float.Parse(values[3]) );

Can someone please tell a simple way to do so? It will be very helpful. Thanks!

Please use code tags.

Your description is very confusing (you have another script that calls this other script with stings and all that - what is it you want to tell us with this? what are These other scripts doing, and are they important? if so, what are they doing? if not, why mention them at all?). You want to help us with you “doing so”, but I’m not sure what that means.

So perhaps help us understand what you are trying to do. It seems you are looking for some conversion method from a float that contains a RightAscension value to a string or set of strings that contain the equivalent in hours, minutes and seconds. But then you seem to look for the opposite, a routine that converts HMS into RA?

So what is it that you are looking for, what do you have already, and at what point are you stuck?