1
0

3 Revīzijas e5b7c493a4 ... befd1ea9da

Autors SHA1 Ziņojums Datums
  Lukas Goldschmidt befd1ea9da debug: add logging for house_system param 1 mēnesi atpakaļ
  Lukas Goldschmidt 8b1e8e3f70 fix: house_system param encoding for swe.houses() 1 mēnesi atpakaļ
  Lukas Goldschmidt 63ea366d3e feat: add house_system param to get_sky_state 1 mēnesi atpakaļ
1 mainītis faili ar 14 papildinājumiem un 14 dzēšanām
  1. 14 14
      src/ephemeris_mcp/server.py

+ 14 - 14
src/ephemeris_mcp/server.py

@@ -387,9 +387,9 @@ def get_sky_state(
     """
     Return a consolidated raw sky-state snapshot for downstream chart engines.
 
-    This stays purely descriptive: it combines the core astronomical outputs
-    already exposed elsewhere in the server without adding signs, houses, or
-    interpretation.
+    Combines planetary positions, lunar state, sidereal time, and solar events
+    into a single response. Optionally includes house cusps and angles when
+    a house system is specified.
 
     Args:
         datetime: ISO 8601 datetime (UTC). Defaults to now.
@@ -397,16 +397,15 @@ def get_sky_state(
         lon: Observer longitude in decimal degrees.
         elevation: Observer elevation in meters.
         geocentric: If True, return geocentric positions instead of topocentric.
-        house_system: Optional house system code. When provided, includes house
-            cusps and angles in the response. Supported codes:
-            'P' = Placidus, 'K' = Koch, 'E' = Equal, 'W' = Whole Sign,
-            'A' = Alcabitius, 'C' = Campanus, 'M' = Morinus, 'R' = Porphyry,
-            'T' = Polich/Page, 'U' = Krusinski-Pisa, 'V' = Vehlow Equal,
-            'X' = Meridian, 'Y' = Horizontal, 'H' = Azimuthal, 'B' = Alcabitius,
-            'O' = Equal/MC, 'F' = Carter poli-eq, 'D' = Equal from 15° Aries,
-            'G' = Gauquelin sectors, 'I' = Sunshine, 'J' = Sunshine alt,
-            'L' = Pullen SD, 'N' = Equal/1, 'Q' = Pullen SR, 'S' = Sripati,
-            'Z' = APC houses.
+        house_system: Optional house system code (single uppercase letter).
+            When provided, includes 'houses' key with cusps and angles.
+            Supported: P=Placidus, K=Koch, E=Equal, W=Whole Sign,
+            A=Alcabitius, C=Campanus, M=Morinus, R=Porphyry,
+            T=Polich/Page, U=Krusinski-Pisa, V=Vehlow Equal,
+            X=Meridian, Y=Horizontal, H=Azimuthal, O=Equal/MC,
+            F=Carter poli-eq, D=Equal from 15° Aries, G=Gauquelin sectors,
+            I=Sunshine, J=Sunshine alt, L=Pullen SD, N=Equal/1,
+            Q=Pullen SR, S=Sripati, Z=APC houses.
     """
     lat, lon = _default_location(lat, lon)
     date = _utc_date_from_datetime(datetime)
@@ -469,7 +468,8 @@ def get_sky_state(
 
     # Compute house cusps when requested
     if house_system is not None:
-        hs_code = house_system.upper().encode()
+        hs_code = house_system.upper().encode()[:1]
+        logger.info(f"house_system={house_system!r} hs_code={hs_code!r} type={type(hs_code)}")
         try:
             cusps, ascmc = swe.houses(jd, lat, lon, hs_code)
             houses = []