A comprehensive computational framework for aerospace medicine, occupational health, and human performance assessment in extreme environments.
Aerospace Medicine Specialist
Universidad Nacional de Colombia ๐จ๐ด
Expert in operational physiology, extreme environment medicine, and human performance optimization
This suite provides research-grade computational tools for aerospace medicine professionals, occupational health specialists, and researchers working in extreme environments. The platform integrates 29+ referenced formulas/models with modern visualization capabilities and interactive dashboards.
- ๐ฌ Scientifically Validated: All formulas based on peer-reviewed research
- ๐ Aerospace Medicine Focus: Specialized tools for aviation and space medicine
- ๐ Interactive Dashboards: Real-time calculations with professional visualizations
- ๐งช Simulation Studio: Forward trajectories + next-step forecasting for time-steppable models
- ๐ก๏ธ Environmental Stress Assessment: Heat, cold, altitude, decompression, and hydration models
- ๐ป Reproducible: Deterministic implementations with explicit assumptions and units
- ๐ฑ Cross-Platform: Web-based interface accessible from any device
- ๐ก๏ธ Windows Compatible: Enhanced Windows support with automated troubleshooting tools
- End-to-end workflows: Atmospheric physiology โ stress indices โ exposure/risk reporting in one interface (no spreadsheet glue).
- Transparent methods: Units, assumptions, and model limits are explicit in code and surfaced in-app.
- Publication-ready outputs: High-quality interactive plots with export (PNG/SVG/PDF/HTML) for figures and supplements.
- Aerospace-specific exposure tooling: TLVยฎ/BEI-style workflows, mixed exposure indexing, and report generation aligned to occupational practice.
- ISO 7933 Predicted Heat Strain (PHS) calculator delivers core-temperature, sweat-rate, and hydration guardrails aligned with the Phase 1 roadmap.
- Universal Thermal Climate Index (UTCI) calculator adds outdoor thermal โfeels-likeโ assessment with standardized stress categories.
- Bรผhlmann ZHโL16 (Gradient Factors) decompression planner is now live, with a unit-tested reference schedule and neutral UI outputs.
- AGSM effectiveness model (+Gz) is now live, with parameter defaults anchored to a published configuration comparison study (and all assumptions exposed in-app).
- Spatial Disorientation (SD) risk assessment is now live with explicit physiology anchors (leans threshold, canal entrainment window, Coriolis threshold, somatogravic tilt physics) and in-app citations.
- NVG / EO target acquisition (Johnson/ACQUIRE cycles-on-target) is now live as a resolution-based feasibility check with a public cycle-criteria reference (SAND2015-6368).
- Whole-body vibration exposure (ISO 2631-1 style A(8) / VDV) is now live as a frequency-weighted exposure scaler with literature-anchored HGCZ thresholds and in-app citations.
- Motion sickness susceptibility (MSSQ-short) is now live as a questionnaire-based susceptibility screen (raw score + quartile band against an open pre-test sample; limitations explicit).
- Visual acuity at altitude (Dynamic Visual Acuity, LogMAR) is now live using an empirical chamber-study anchor (Wang et al., 2024), surfaced in-app with citations.
- Crew duty time limits (FAA Part 117 + EASA ORO.FTL) are now live, including FAA table lookups (Table A/Table B + cumulative limits) and a scoped EASA subset (ORO.FTL.205 basic max daily FDP + ORO.FTL.210 cumulative duty/flight-time caps), with transparent scope notes.
- Aโa gradient and oxygen delivery (CaOโ/DOโ/DOโI) calculators are now live for clinical/altitude physiology workflows, with explicit equations and citations.
- Wells scores (DVT/PE) are now live in Clinical Calculators for structured VTE risk stratification (decision support only; citations included).
- SAFTE effectiveness forecasting (patent-derived) is now live for multi-day fatigue prediction, with equations sourced from the published patent and SAFTEr open implementation (limitations explicitly stated).
- Simulation Studio adds forward trajectories (PHS + circadian envelopes) with modern stacked plots, guardrail shading, and a โwhat happens nextโ next-step forecast.
- Neutral โcrystal / liquid glassโ UI for cards/boxes (dark-mode safe) plus an in-app Roadmap view and โcoming soonโ previews for Phase 1 items.
- Thermal stress studio refresh with interactive plots that visualize core temperature trajectories and highlight the most restrictive limit (core temperature vs. dehydration).
Ensure you have the following installed:
- Python 3.8+ ๐
- Git
- 4GB RAM minimum (8GB recommended)
- Modern web browser (Chrome, Firefox, Safari, Edge)
git clone https://github.com/strikerdlm/HumanPerformanceCalcs.git
cd HumanPerformanceCalcsOption A: Using Conda (Recommended)
# Create conda environment from environment.yml
conda env create -f environment.yml
conda activate textappv2Option B: Using Virtual Environment
# Create virtual environment
python -m venv textappv2Activate the environment:
On Windows:
# For venv:
textappv2\Scripts\activate
# For conda:
conda activate textappv2On macOS/Linux:
# For venv:
source textappv2/bin/activate
# For conda:
conda activate textappv2If using conda environment (from Step 3A):
# Dependencies are automatically installed via environment.yml
# No additional steps neededIf using virtual environment (from Step 3B):
pip install -r requirements.txtโ Installation Verified: See INSTALLATION_VERIFICATION.md for a complete verification report confirming all requirements are met and the application works correctly.
On Windows (Recommended):
# Use the administrator batch file for best compatibility
# Right-click run_streamlit_admin.bat โ "Run as administrator"
# OR manually with specific address binding:
streamlit run streamlit_app.py --server.address 0.0.0.0 --server.port 8507On macOS/Linux:
streamlit run streamlit_app.py --server.port 9876 --server.address 127.0.0.1Open your web browser and navigate to:
Windows (using address 0.0.0.0):
http://localhost:8507
macOS/Linux:
http://127.0.0.1:9876
Note: If these ports are unavailable, try alternative ports like 8502, 8503, 8505, or 9877. The application will display the correct URL when it starts.
If you encounter PermissionError: [WinError 10013] when running Streamlit on Windows, this is a common Windows network security restriction. We've provided multiple solutions:
Use the provided batch file that handles everything automatically:
- Right-click on
run_streamlit_admin.bat - Select "Run as administrator"
- Click "Yes" on the UAC (User Account Control) prompt
- The script will automatically activate the environment and start Streamlit
Run the security diagnostic script to identify specific issues:
powershell -ExecutionPolicy Bypass -File check_security_settings.ps1This script checks:
- Administrator privileges
- Windows Defender status
- Firewall configurations
- Port availability
- Network adapter status
- Press Windows + X โ Select "PowerShell (Admin)" or "Terminal (Admin)"
- Click "Yes" on the UAC prompt
- Navigate and run:
cd "C:\Users\[YourUsername]\[PathToProject]\HumanPerformanceCalcs"
conda activate textappv2
streamlit run streamlit_app.pyIf Streamlit continues to have permission issues, use the Flask-based alternative:
conda activate textappv2
python flask_alternative.pyThis provides a simpler web interface with the core calculators and doesn't require administrator privileges.
For environments where web interfaces are restricted, use the CLI version:
conda activate textappv2
python run_calculator.py- ๐ก๏ธ Administrator methods: 95% success rate
- ๐ Flask alternative: 85% success rate
- ๐ป CLI interface: 100% success rate
- Windows 10/11 Enterprise security policies
- Windows Defender real-time protection
- Corporate firewall restrictions
- Network socket binding permission requirements
๐ก Tip: The administrator batch file (
run_streamlit_admin.bat) is usually the fastest and most reliable solution.
Docker packaging is not included in this repository snapshot. If you need a Dockerfile, add one with pinned dependencies and a reproducible base image before using this in production/scientific deployments.
For production environments, consider using:
- Streamlit Cloud: Direct deployment from GitHub
- Heroku: Web application hosting
- AWS/GCP/Azure: Cloud infrastructure deployment
All calculators in this suite are based on peer-reviewed scientific literature and established standards. Each calculator includes its specific reference source:
- Reference: ISO. (1975). International Standard Atmosphere. ISO Standard 2533:1975. International Organization for Standardization.
- Application: Calculates atmospheric properties (pressure, temperature, density) at various altitudes
- Reference: West, J. B. (2011). Respiratory Physiology: The Essentials (9th ed.). Lippincott Williams & Wilkins.
- Application: Determines alveolar oxygen partial pressure using the alveolar gas equation
- Reference: West, J. B., & Schoene, R. B. (2001). High Altitude Medicine and Physiology (3rd ed.). Arnold.
- Application: Predicts oxygen saturation levels at altitude for different acclimatization states
- Reference: Roach, R. C., Bartsch, P., Hackett, P. H., & Oelz, O. (1993). The Lake Louise acute mountain sickness scoring system. In Sutton, J. R., Coates, G., & Houston, C. S. (Eds.), Hypoxia and Molecular Medicine (pp. 272โ274). Queen City Printers.
- Application: Estimates probability of developing AMS based on altitude exposure
- Reference: Ernsting, J., & Nicholson, A. N. (2016). Aviation Medicine (4th ed.). CRC Press.
- Application: Predicts the remaining time to effectively correct hypoxia by donning an oxygen mask after a rapid decompression event
- Disclaimer: This was calculated during hypobaric chamber training and not during a real event
- Reference: Whinnery, J. E., & Forster, E. M. (2006). G-induced loss of consciousness: definition, history, current status. Aviation, Space, and Environmental Medicine, 77(6), 603โ612.
- Application: Estimates G-force tolerance and G-LOC onset times
- Reference: Friedberg, W., Copeland, K., Duke, F. E., O'Brien, K., & Darden, E. B. Jr. (1992). Radiation exposure of air carrier crewmembers II. Radiation Protection Dosimetry, 45(1-4), 145โ148.
- Application: Calculates cosmic radiation exposure for aviation personnel
- Reference: Budd, G. M. (2008). Wet-bulb globe temperature (WBGT)โits history and its limitations. Journal of Science and Medicine in Sport, 11(1), 20โ32.
- Application: Assesses heat stress risk in indoor and outdoor environments
- Reference: Belding, H. S., & Hatch, T. F. (1955). Index for evaluating heat stress in terms of resulting physiological strains. Heating, Piping and Air Conditioning, 27(8), 129โ136.
- Application: Evaluates heat stress based on metabolic rate and environmental conditions
- References:
- ISO 7933:2023. Ergonomics of the thermal environment โ Analytical determination and interpretation of heat stress using calculation of the predicted heat strain.
- Malchaire, J., et al. (2001). Development and validation of the predicted heat strain model. Annals of Occupational Hygiene, 45(2), 123โ135.
- Application: Provides core temperature, sweat rate, and dehydration guardrails for work/rest planning in extreme heat.
- References:
- National Institute for Occupational Safety and Health (NIOSH). (1998). Criteria for a Recommended Standard: Occupational Noise Exposure (DHHS Publication No. 98โ126).
- Occupational Safety and Health Administration (OSHA). (2008). Occupational Noise Exposure: Standard 29 CFR 1910.95.
- Application: Calculates noise dose and permissible exposure times per OSHA/NIOSH standards
- Reference: Mallis, M. M., et al. (2004). Summary of the key features of seven biomathematical models of human fatigue and performance. Aviation, Space, and Environmental Medicine, 75(3), A4-A14.
- Application: Predicts performance degradation based on circadian rhythms and sleep debt
- Reference: Hursh, S. R., et al. (2004). Fatigue models for applied research in warfighting. Aviation, Space, and Environmental Medicine, 75(3), A44-A53.
- Application: Models homeostatic and circadian components of sleep-wake regulation
- Reference: ACGIH. (2023). TLVs and BEIs: Threshold Limit Values for Chemical Substances and Physical Agents. American Conference of Governmental Industrial Hygienists.
- Application: Evaluates chemical exposure risks using current ACGIH standards
from calculators import standard_atmosphere, spo2_unacclimatized
# Calculate atmospheric conditions at flight altitude (inputs in meters)
altitude_ft = 35000
altitude_m = altitude_ft * 0.3048
isa = standard_atmosphere(altitude_m)
pressure_pa = isa["pressure_Pa"]
temp_c = isa["temperature_C"]
density = isa["density_kg_m3"]
# Assess oxygen saturation for unacclimatized individual (inputs in meters)
spo2 = spo2_unacclimatized(altitude_m)
print(f"SpO2 at {altitude_ft} ft: {spo2:.1f}%")from calculators import wbgt_outdoor, heat_stress_index, predicted_heat_strain
# Calculate WBGT for outdoor work environment
dry_bulb = 35.0 # ยฐC
wet_bulb = 28.0 # ยฐC
globe_temp = 45.0 # ยฐC
wbgt = wbgt_outdoor(T_nwb=wet_bulb, T_g=globe_temp, T_db=dry_bulb)
print(f"WBGT: {wbgt:.1f}ยฐC")
# Predict heat strain per ISO 7933 guidance
phs = predicted_heat_strain(
metabolic_rate_w_m2=420.0,
air_temperature_C=32.0,
mean_radiant_temperature_C=38.0,
relative_humidity_percent=55.0,
air_velocity_m_s=0.6,
clothing_insulation_clo=0.9,
exposure_minutes=90.0,
)
print(
f"Core temp: {phs.predicted_core_temperature_C:.2f}ยฐC | "
f"Sweat req: {phs.required_sweat_rate_L_per_h:.2f} L/h | "
f"Safe exposure: {phs.allowable_exposure_minutes:.0f} min ({phs.limiting_factor})"
)from calculators import standard_atmosphere, tissue_ratio, interpret_tr
# Assess decompression stress using Tissue Ratio (TR = Ptissue_N2 / Pambient).
# Here we assume tissues are saturated at sea level N2 prior to ascent.
altitude_ft = 25000
altitude_m = altitude_ft * 0.3048
p_ambient_mmhg = standard_atmosphere(altitude_m)["pressure_Pa"] / 133.322
ptissue_n2_sea_level_mmhg = 0.78 * (101325 / 133.322)
tr = tissue_ratio(ptissue_n2_sea_level_mmhg, p_ambient_mmhg)
risk_assessment = interpret_tr(tr)
print(f"Tissue Ratio: {tr:.3f} - {risk_assessment}")- Standard Atmosphere Properties
- Alveolar Oxygen Pressure
- Altitude & Hypoxia Predictions
- Acute Mountain Sickness Risk
- Oxygen Cascade Analysis
- Decompression Tissue Ratio (TR)
- Time of Useful Consciousness
- G-Force Tolerance
- Cosmic Radiation Dose
- Chemical Exposure Assessment
- Time-Weighted Average Calculator
- Mixed Chemical Exposure
- Unusual Work Schedule TLV
- Biological Exposure Index
- Comprehensive Exposure Report
- Heat Stress Index (WBGT)
- Heat Stress Index (HSI)
- Predicted Heat Strain (ISO 7933 inspired)
- Cold Exposure: Peak Shivering
- Noise Exposure Assessment
- Circadian Performance (Mitler)
- Two-Process Model (S & C)
- Jet Lag Recovery
- Interactive 2D/3D plotting
- Multiple visualization themes
- Export capabilities (PNG, SVG, PDF, HTML)
- Real-time parameter adjustment
- Forward simulators for time-steppable models (deterministic sampling, bounded loops)
- PHS trajectories (core temperature, dehydration, sweat-rate limits) + next-step forecast
- Mitler circadian performance envelope forecasting
- โ
Unit Tests: Pytest suite included (run with
python -m pytest) - โ Deterministic methods: Stable results for identical inputs
- โ Cross-platform: Windows, macOS, Linux
- ๐ Literature traceability: Key calculators include citations and documented assumptions
- ๐ฏ Scope clarity: Where models are simplified, limitations are explicitly stated
We welcome contributions from the aerospace medicine and sports science communities!
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-calculator) - Commit your changes (
git commit -am 'Add new calculator') - Push to the branch (
git push origin feature/new-calculator) - Create a Pull Request
- Include unit tests for new calculators
- Follow PEP 8 style guidelines
- Provide scientific references for new formulas
- Update documentation for new features
If you use this software in your research or professional work, please cite:
@software{malpica2024aerospace,
author = {Malpica, Diego},
title = {Aerospace Medicine \& Human Performance Calculator Suite},
year = {2024},
institution = {Universidad Nacional de Colombia},
url = {https://github.com/strikerdlm/HumanPerformanceCalcs},
note = {Computational framework for aerospace medicine and human performance assessment}
}APA Style: Malpica, D. (2024). Aerospace Medicine & Human Performance Calculator Suite [Computer software]. Universidad Nacional de Colombia. https://github.com/strikerdlm/HumanPerformanceCalcs
Dr. Diego Malpica
๐ง Email: dlmalpicah@unal.edu.co
๐๏ธ Universidad Nacional de Colombia
๐ฌ Department of Aerospace Medicine
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Documentation: See
docs/and in-app โScientific rationaleโ expanders
We maintain a comprehensive development roadmap based on scientific literature research. The roadmap outlines planned enhancements across multiple phases:
- Predicted Heat Strain (PHS) Model โ ISO 7933:2023 standard
- Simulation Studio โ interactive forward trajectories and scientific โwhat happens nextโ forecasting for time-steppable calculators (see
Docs/Manual.md) - Universal Thermal Climate Index (UTCI) โ Outdoor thermal comfort
- Cold Water Immersion Survival Time โ Cold-water immersion survival guidance (hypothermia-limited; see notes in-app)
- Bรผhlmann ZH-L16 Decompression Algorithm โ Industry-standard DCS prediction
- Anti-G Straining Maneuver (AGSM) Effectiveness โ G-tolerance enhancement
- Spatial Disorientation Risk Assessment โ Vestibular conflict modeling
- SAFTE/FAST fatigue prediction model
- Night Vision Goggle (NVG) performance calculator
- Whole-body vibration exposure (ISO 2631)
- Crew duty time limit calculators (FAA/EASA)
- Visual acuity at altitude prediction
- Complete space medicine module
- Motion sickness integration (MSSQ)
- Psychomotor vigilance task (PVT) prediction
- Clinical scoring systems (Wells, qSOFA)
๐ Simulation Studio manual: Docs/Manual.md
๐ Full suite roadmap: docs/ROADMAP.md
This project is licensed under the Academic Use License - see the LICENSE file for details.
Academic Use: Free for educational and research purposes
Commercial Use: Contact the author for licensing terms
Attribution: Required in all uses
- Universidad Nacional de Colombia - Institutional support and resources
- Aerospace Medical Association - Scientific consultation
- Open Source Community - Development tools and libraries
Development Metrics:
- ๐งฎ Calculators: 29+ referenced formulas/models
- ๐ Visualizations: Interactive Plotly/ECharts visual lab with export
- ๐งช Tests: Pytest suite included
- ๐ Documentation: References + model notes in
docs/and in-app explainers - ๐ ๏ธ Windows Compatibility Tools: 3 helper scripts
- ๐ Platform Support: Windows, macOS, Linux