Skip to content

Commit e968e14

Browse files
committed
Merge branch 'physics/basic_orbital_capture' of https://github.com/FatAnorexic/Python into physics/basic_orbital_capture
2 parents 3444fbd + 3b6df75 commit e968e14

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

physics/basic_orbital_capture.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,29 @@
1616
"""
1717

1818

19-
2019
def capture_radii(
21-
target_body_radius: float, target_body_mass: float,
22-
projectile_velocity: float
23-
)->float:
20+
target_body_radius: float, target_body_mass: float, projectile_velocity: float
21+
) -> float:
22+
# Gravitational constant to four signifigant figures as of 7/8/2023|
23+
# Source google: gravitational constant
24+
g = 6.6743e-11 # SI units (N*m**2)/kg**2
2425

26+
<<<<<<< HEAD
2527
#Gravitational constant to four significant figures as of 7/8/2023|
2628
#Source google: gravitational constant
2729
g=6.6743e-11 #SI units (N*m**2)/kg**2
30+
=======
31+
escape_velocity_squared = (2 * g * target_body_mass) / target_body_radius
32+
>>>>>>> 3b6df7598ead9eeffd0f53ad6bf8ae27039469c0
2833

29-
escape_velocity_squared=(2*g*target_body_mass)/target_body_radius
30-
31-
capture_radius=target_body_radius*math.sqrt(
32-
1+escape_velocity_squared/math.pow(projectile_velocity,2)
33-
)
34+
capture_radius = target_body_radius * math.sqrt(
35+
1 + escape_velocity_squared / math.pow(projectile_velocity, 2)
36+
)
3437
return capture_radius
3538

3639

37-
def capture_area(capture_radius: float)->float:
38-
sigma=math.pi*math.pow(capture_radius,2)
40+
def capture_area(capture_radius: float) -> float:
41+
sigma = math.pi * math.pow(capture_radius, 2)
3942
return sigma
4043

4144

0 commit comments

Comments
 (0)