Skip to content

rpbgit/adif-qso-analyzer

Repository files navigation

ADIF QSO Analyzer

A Python tool for analyzing ADIF (Amateur Data Interchange Format) files from ham radio contests.

Features

  • S&P Percentage Calculation: Determines Search & Pounce vs. CQ operations
  • QSO Rate Metrics: Calculate average and peak QSO rates per operator
  • Operator Statistics: QSO counts and performance metrics per operator
  • Run vs S&P Analysis: Individual operator percentages for Run vs Search & Pounce
  • Contribution Analysis: Each operator's percentage contribution to total QSO count
  • Log Duration Analysis: Total contest time and overall QSO rate
  • Silent Period Detection: Identifies gaps >15 minutes without activity
  • Comprehensive Reports: Detailed analysis output with exportable results

Project Structure

python_proj1/
├── main.py              # Main entry point
├── requirements.txt     # Project dependencies
├── src/                 # Source code directory
│   ├── __init__.py      # Package initialization
│   ├── adif_parser.py   # ADIF file parsing
│   └── metrics_analyzer.py  # QSO metrics calculation
├── tests/               # Test files
│   ├── __init__.py      # Test package initialization
│   ├── test_main.py     # ADIF parser tests
│   └── test_metrics.py  # Metrics analyzer tests
├── data/                # Sample data files
├── .vscode/             # VS Code configuration
│   └── tasks.json       # Build and run tasks
├── .github/             # GitHub configuration
│   └── copilot-instructions.md  # Copilot customization
└── README.md            # This file

Getting Started

Prerequisites

  • Python 3.7 or higher
  • VS Code with Python extension

Installation

  1. Clone or download this project
  2. Create a virtual environment:
    python -m venv .venv
  3. Activate the virtual environment:
    • Windows: .venv\Scripts\activate
    • macOS/Linux: source .venv/bin/activate
  4. Install dependencies:
    pip install -r requirements.txt

Running the Project

Basic Usage

python main.py [path_to_adif_file]

Examples

# Use default file location
python main.py

# Specify custom file
python main.py contest_log.adi

# With full path
python main.py "C:\Logs\FieldDay2025.adi"

Output

The tool generates:

  • Console output with summary statistics
  • Text file report saved as [filename]_analysis.txt

Sample Output

QSO ANALYSIS SUMMARY REPORT
============================================================
Total QSOs: 713
S&P Percentage: 43.7%

LOG STATISTICS:
----------------------------------------
Total Log Duration: 22.9 hours
Overall QSO Rate: 31.1 QSOs/hour
Silent Periods (>15 min): 8
  Gap 1: 21 minutes (01:36 - 01:57)
  Gap 2: 42 minutes (03:08 - 03:50)
  Gap 3: 57 minutes (05:07 - 06:04)
  Gap 4: 18 minutes (06:51 - 07:09)
  Gap 5: 25 minutes (08:14 - 08:39)
  ... and 3 more gaps

OPERATOR STATISTICS:
----------------------------------------
Operator: 9ZV
  QSO Count: 278 (39.0% of total)
  Average Rate: 16.2 QSOs/hour
  Peak Rate: 62 QSOs/hour
  Run: 45.3% | S&P: 54.7%

Operator: UGX
  QSO Count: 289 (40.5% of total)
  Average Rate: 12.6 QSOs/hour
  Peak Rate: 52 QSOs/hour
  Run: 78.7% | S&P: 21.3%

Operator: VGO
  QSO Count: 146 (20.5% of total)
  Average Rate: 27.0 QSOs/hour
  Peak Rate: 40 QSOs/hour
  Run: 34.5% | S&P: 65.5%

Testing

Run tests with pytest:

pytest tests/ -v

Building Executable

Create standalone executable:

pyinstaller --onefile --name "ADIF_SP_Calculator" main.py

Contributing

  1. Fork the project
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

About

A Python tool for analyzing ADIF files from ham radio

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages