Software Tools & Computational Methods (軟體工具與計算方法)
The historical barrier to QZSY practice was computational: calculating planetary positions from first principles required mastery of complex astronomical tables and procedures that few practitioners possessed. Modern software — particularly the Swiss Ephemeris — has eliminated this barrier entirely, enabling precise QZSY chart computation in milliseconds. This module covers the computational infrastructure behind QZSY software tools.
The Swiss Ephemeris
The Swiss Ephemeris (瑞士星曆), developed by Astrodienst (Zurich, 1997), is the computational backbone of virtually all modern astrological software. Based on NASA's JPL DE431 development ephemeris, it calculates planetary positions with sub-arcsecond precision across a span of over 10,000 years. For QZSY purposes, it provides:
- Ecliptic longitude, latitude, and distance for all Seven Governors
- True and Mean lunar node positions (for Rahu/Ketu calculation)
- Lunar apogee position (for Moon's Apogee/月孛)
- Sidereal position conversion with configurable ayanamsa
- House cusp calculation for Ascendant determination
Sidereal Coordinate Conversion
QZSY uses a sidereal (star-fixed) coordinate system. The Swiss Ephemeris natively calculates tropical (equinox-based) coordinates. Converting from tropical to sidereal requires subtracting the ayanamsa — the current angular offset between the two systems, approximately 24 degrees in the current era. The platform supports multiple ayanamsa options including Lahiri (most common in Vedic practice), Raman, Fagan-Bradley, and a Chinese-specific value.
API Integration
The platform's QZSY computation flows through the following architecture:
- Client request: User enters birth data (date, time, location) in the QZSY calculator interface.
- Next.js API route:
/api/calculators/qzsyreceives the request, validates input, and proxies to the Flask microservice. - Flask computation: The
apps/calc-enginePython service usespyswisseph(the Python wrapper for Swiss Ephemeris) to compute all planetary positions, house cusps, and derived values. - Response: JSON containing all eleven body positions, house cusps, dignity assessments, aspect table, and Da Xian/Xiao Xian timeline.
- Client rendering: The React frontend renders the QZSY chart visualization and interpretation panels.
Computation Accuracy
The Swiss Ephemeris provides planetary positions accurate to better than 0.001 arcsecond for dates within several millennia of the present. This precision far exceeds any practical interpretive need — the main source of chart variation is not computation error but the choice of ayanamsa, which shifts all positions by the same amount. Practitioners should understand that the 'correct' ayanamsa is an unresolved technical debate, and different choices can place planets in different mansions or Ci divisions.
Additional Software Capabilities
Beyond basic chart computation, the platform's QZSY module supports: aspect table generation with configurable orbs, dignity auto-assessment, configuration pattern matching against the classical catalogue, Da Xian/Xiao Xian timeline calculation, Liu Nian transit overlay, and chart comparison (synastry) between two natal charts.