@@ -63,20 +63,16 @@ def to_tle(self) -> str:
6363 )
6464 first_line += str (calculate_checksum (first_line ))
6565 second_line += str (calculate_checksum (second_line ))
66- #print("hi!")
67- #print(f"{first_line}\n{second_line}")
6866 return f"{ first_line } \n { second_line } "
6967
7068 def format_epoch_to_date (self , epoch_year : int , epoch_day : float ) -> str :
7169 """
72- Convert epoch year and day-of-year to a calendar date (YYYY-MM-DD).
70+ Convert epoch year and day-of-year to a calendar date (YYYY-MM-DD).
7371
74- Arguments:
75- epoch_year (int): Last two digits of the epoch year.
76- epoch_day (float): Day of the year, including fraction.
72+ :param epoch_year (int): Last two digits of the epoch year.
73+ :param epoch_day (float): Day of the year, including fraction.
7774
78- Returns:
79- str: Formatted date string in YYYY-MM-DD format.
75+ :return: Returns formatted date string in YYYY-MM-DD format as a string.
8076 """
8177 full_year = 2000 + epoch_year if epoch_year < 57 else 1900 + epoch_year
8278 base_date = datetime (full_year , 1 , 1 ) + timedelta (days = epoch_day - 1 )
@@ -90,7 +86,13 @@ def convert_epoch_values_to_jd(self) -> float:
9086
9187
9288def calculate_checksum (line : str ) -> int :
93- """Calculate the checksum for a line of TLE data."""
89+ """
90+ Calculate the checksum for a line of TLE data.
91+
92+ :param line(str): The single line of TLE data to calculate the checksum for
93+ :return: Returns the checksum integer
94+
95+ """
9496 output = 0
9597 for i in line [:68 ]:
9698 if i .isdigit ():
@@ -101,7 +103,12 @@ def calculate_checksum(line: str) -> int:
101103
102104
103105def convert_decimal_point_assumed (value : str ) -> float :
104- """Convert a string to a float, assuming a decimal point before the last digit."""
106+ """
107+ Convert a string to a float, assuming a decimal point before the last digit.
108+
109+ :param value(str): the string to convert
110+ :returns: data from string converted into float
111+ """
105112 return float (f"{ value [0 ]} .{ value [1 :6 ]} e{ value [6 :]} " )
106113
107114
0 commit comments