abstract-math 0.0.0.35__py3-none-any.whl → 0.0.0.36__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of abstract-math might be problematic. Click here for more details.

@@ -14,23 +14,23 @@ def get_h_cap(r_m: float, h_m: float, theta: Optional[float] = None) -> float:
14
14
  theta = get_central_angle(r_m, h_m)
15
15
  return mul(r_m, sub(1.0, math.cos(theta)))
16
16
 
17
- def spherical_cap_area(observer_altitude: float, units: str = 'meters'):
17
+ def spherical_cap_area(observer_altitude: float, dist_unit: str = 'meters'):
18
18
  """
19
19
  Visible spherical cap area from altitude (same units as input returned in unit^2).
20
20
  """
21
21
  r_m = earth_radius('meters')
22
- h_m = convert(observer_altitude, units, 'meters')
22
+ h_m = convert(observer_altitude, dist_unit, 'meters')
23
23
 
24
24
  theta = get_central_angle(r_m, h_m)
25
25
  h_cap_m = get_h_cap(r_m, h_m, theta)
26
26
  area_m2 = mul(2 * pi() * r_m, h_cap_m) # 2π R h
27
27
  # return in requested units^2
28
- area_u2 = mul(area_m2, exp(_factor('meters', units), 2))
29
- return area_u2, convert(h_cap_m, 'meters', units), theta
28
+ area_u2 = mul(area_m2, exp(_factor('meters', dist_unit), 2))
29
+ return area_u2, convert(h_cap_m, 'meters', dist_unit), theta
30
30
 
31
- def percent_visible(observer_altitude: float, units: str = 'meters') -> float:
32
- cap_area_u2, _, _ = spherical_cap_area(observer_altitude, units)
33
- full_area_u2 = full_earth_surface_area(units)
31
+ def percent_visible(observer_altitude: float, dist_unit: str = 'meters') -> float:
32
+ cap_area_u2, _, _ = spherical_cap_area(observer_altitude, dist_unit)
33
+ full_area_u2 = full_earth_surface_area(dist_unit)
34
34
  return mul(div(cap_area_u2, full_area_u2), 100.0)
35
35
 
36
36
  # --- Camera/FOV flat-projection helper (approximate) ---
@@ -70,9 +70,9 @@ def get_triangle_heights(a: float, b: float, c: float, area: float):
70
70
  hc = mul(2.0, div(area, c))
71
71
  return {"ha": ha, "hb": hb, "hc": hc}
72
72
 
73
- def compute_fov_triangle(altitude: float, fov_angle_deg: float, units: str = 'meters'):
73
+ def compute_fov_triangle(altitude: float, fov_angle_deg: float, dist_unit: str = 'meters'):
74
74
  """Simple isosceles triangle model for a camera at altitude."""
75
- a = convert(altitude, units, 'meters')
75
+ a = dconvert(altitude, dist_unit, 'meters')
76
76
  fov_angle_rad = math.radians(fov_angle_deg)
77
77
  base = 2.0 * a * math.tan(fov_angle_rad / 2.0)
78
78
  b = c = a
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_math
3
- Version: 0.0.0.35
3
+ Version: 0.0.0.36
4
4
  Author: putkoff
5
5
  Author-email: partners@abstractendeavors.com
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -15,9 +15,9 @@ abstract_math/solar_math/src/constants/planet_constants.py,sha256=tc5Woh3Gqme66u
15
15
  abstract_math/solar_math/src/constants/time_constants.py,sha256=9_7gCR3swAjyUwFNLja1keRxTYx4kzF39TB9Vwav_PM,1960
16
16
  abstract_math/solar_math/src/utils/__init__.py,sha256=Vb2bfx1p9YSmhnbqXBjGVPt1OQZ9I7PG_fMQdFqj-3k,91
17
17
  abstract_math/solar_math/src/utils/escape_velocity.py,sha256=rZkwf6gaBpciCmxUKnzLGXfI5P9JRkFSLyCvXNcsLtk,5245
18
- abstract_math/solar_math/src/utils/geometry_utils.py,sha256=Ij4mASNFp2-CWy425fxMTEuMPuAZHs-E0qvi3BjaNkk,4169
18
+ abstract_math/solar_math/src/utils/geometry_utils.py,sha256=RDIdcMgxSBI8XqTp7Q_co_xjHsRztTx4op7D-tgOCWM,4206
19
19
  abstract_math/solar_math/src/utils/velocity_utils.py,sha256=se1RiyLN3uhJwXy42_6JFidbDECWB_sVzt8F6HXK0x0,2211
20
- abstract_math-0.0.0.35.dist-info/METADATA,sha256=8Lm7dMCk7VPw_6Gr7Iq1K6-Ei0d_mpXD1W75QCq9hgM,3081
21
- abstract_math-0.0.0.35.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
22
- abstract_math-0.0.0.35.dist-info/top_level.txt,sha256=b7jOgD9c0U-CGH-l7yxhMPukzD40kMEQkQRV_sGyVfE,14
23
- abstract_math-0.0.0.35.dist-info/RECORD,,
20
+ abstract_math-0.0.0.36.dist-info/METADATA,sha256=UfsY2XahmYw84k1dy1T1e-EA2nOwn4pQl7i1PcC3F6k,3081
21
+ abstract_math-0.0.0.36.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
22
+ abstract_math-0.0.0.36.dist-info/top_level.txt,sha256=b7jOgD9c0U-CGH-l7yxhMPukzD40kMEQkQRV_sGyVfE,14
23
+ abstract_math-0.0.0.36.dist-info/RECORD,,