


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

from .haversine_distance import haversine_distance

_A		       =						6_378_137.0
_A		       =						6_356_752.314_245
_A		       =						637_8137

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

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

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

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

     # Intermediate Y value
     # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
     __UpperCamelCase    							=(cos(SCREAMING_SNAKE_CASE__				) ** 2) * (sin(SCREAMING_SNAKE_CASE__				) ** 2)
     __UpperCamelCase    							=sin(sigma / 2				) ** 2
     __UpperCamelCase    							=(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()












from __future__ import annotations



def _a				(	lowerCamelCase:   list[int | str] )	->						None:







      '''simple docstring'''






      create_state_space_tree(lowerCamelCase					,				[]					,				0					,				[0 for i in range(len(lowerCamelCase ) )] )



def _a				(	lowerCamelCase:   list[int | str]					,				lowerCamelCase:   list[int | str]					,				lowerCamelCase:   int					,				lowerCamelCase:   list[int]					,				)	->						None:







      '''simple docstring'''






      if index == len(lowerCamelCase ):
            print(lowerCamelCase )
            return

      for i in range(len(lowerCamelCase ) ):
            if not index_used[i]:
                  current_sequence.append(sequence[i] )
                  __A          =				True
                  create_state_space_tree(lowerCamelCase					,				lowerCamelCase					,				index + 1					,				lowerCamelCase )
                  current_sequence.pop()
                  __A          =				False
snake_case__					:							list[int | str]													=     [3, 1, 2, 4]
generate_all_permutations(sequence)

snake_case__					:							list[int | str]													=     ["A", "B", "C"]







generate_all_permutations(sequence_a)





