




from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

UpperCamelCase__         =      6378137.0
UpperCamelCase__         =      6356752.314245
UpperCamelCase__         =      6378137







def      _a				(						SCREAMING_SNAKE_CASE_							:    float				,				SCREAMING_SNAKE_CASE_							:    float				,				SCREAMING_SNAKE_CASE_							:    float				,				SCREAMING_SNAKE_CASE_							:    float					):
					__lowerCAmelCase           =	(AXIS_A - AXIS_B) / AXIS_A
					# Parametric latitudes
					# https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
					__lowerCAmelCase           =	atan((1 - flattening) * tan(radians(SCREAMING_SNAKE_CASE_					)					)					)
					__lowerCAmelCase           =	atan((1 - flattening) * tan(radians(SCREAMING_SNAKE_CASE_					)					)					)

					# Compute central angle between two points
					# using haversine theta. sigma =  haversine_distance / equatorial radius
					__lowerCAmelCase           =	haversine_distance(SCREAMING_SNAKE_CASE_				,				SCREAMING_SNAKE_CASE_				,				SCREAMING_SNAKE_CASE_				,				SCREAMING_SNAKE_CASE_					) / EQUATORIAL_RADIUS

					# Intermediate P and Q values
					__lowerCAmelCase           =	(b_lata + b_lata) / 2
					__lowerCAmelCase           =	(b_lata - b_lata) / 2

					# Intermediate X value
					# X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
					__lowerCAmelCase           =	(sin(SCREAMING_SNAKE_CASE_					) ** 2) * (cos(SCREAMING_SNAKE_CASE_					) ** 2)
					__lowerCAmelCase           =	cos(sigma / 2					) ** 2
					__lowerCAmelCase           =	(sigma - sin(SCREAMING_SNAKE_CASE_					)) * (x_numerator / x_demonimator)

					# Intermediate Y value
					# Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
					__lowerCAmelCase           =	(cos(SCREAMING_SNAKE_CASE_					) ** 2) * (sin(SCREAMING_SNAKE_CASE_					) ** 2)
					__lowerCAmelCase           =	sin(sigma / 2					) ** 2
					__lowerCAmelCase           =	(sigma + sin(SCREAMING_SNAKE_CASE_					)) * (y_numerator / y_denominator)

					return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
					import doctest

					doctest.testmod()










import enum
import shutil
import sys


UpperCamelCase__      ,     UpperCamelCase__         =      shutil.get_terminal_size()

UpperCamelCase__         =      {"""UP""": """A""", """DOWN""": """B""", """RIGHT""": """C""", """LEFT""": """D"""}
class       a__   ( enum.Enum				):
						_a							:   Any =   0
						_a							:   Dict =   1







def      _a				(						SCREAMING_SNAKE_CASE_							:    Tuple				,				SCREAMING_SNAKE_CASE_							:    Dict=""					):
					sys.stdout.write(str(SCREAMING_SNAKE_CASE_					) + end					)
					sys.stdout.flush()







def      _a				(						SCREAMING_SNAKE_CASE_							:    Any				,				SCREAMING_SNAKE_CASE_							:    Union[str, Any]				,				SCREAMING_SNAKE_CASE_							:    str=""					):
					forceWrite(F"""\u001b[{color}m{content}\u001b[0m"""				,				SCREAMING_SNAKE_CASE_					)







def      _a				(						):
					forceWrite("\r"					)







def      _a				(						SCREAMING_SNAKE_CASE_							:    int				,				SCREAMING_SNAKE_CASE_							:    str					):
					forceWrite(F"""\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}"""					)







def      _a				(						):
					forceWrite(" " * TERMINAL_WIDTH					)
					reset_cursor()







def      _a				(						):
					reset_cursor()
					forceWrite("-" * TERMINAL_WIDTH					)




