This document provides comprehensive technical documentation for the FGCom-mumble system, including architecture, implementation details, and technical specifications.
- System Architecture
- Work Unit Distribution
- Security Implementation
- GPU Acceleration
- Threading Architecture
- Antenna Pattern Generation
- Propagation Physics
- Vehicle Dynamics
- Frequency Analysis
- API Implementation
The FGCom-mumble system consists of several key components:
- Server: Central coordination and management
- Work Unit Distributor: Distributes computational tasks
- Security Manager: Handles authentication and authorization
- GPU Accelerator: Hardware acceleration for complex calculations
- Client Coordinators: Client-side processing and coordination
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Client 1 │ │ Client 2 │ │ Client N │
│ │ │ │ │ │
│ ┌─────────────┐ │ │ ┌─────────────┐ │ │ ┌─────────────┐ │
│ │ Work Unit │ │ │ │ Work Unit │ │ │ │ Work Unit │ │
│ │ Processor │ │ │ │ Processor │ │ │ │ Processor │ │
│ └─────────────┘ │ │ └─────────────┘ │ │ └─────────────┘ │
│ ┌─────────────┐ │ │ ┌─────────────┐ │ │ ┌─────────────┐ │
│ │ Security │ │ │ │ Security │ │ │ │ Security │ │
│ │ Coordinator │ │ │ │ Coordinator │ │ │ │ Coordinator │ │
│ └─────────────┘ │ │ └─────────────┘ │ │ └─────────────┘ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ Server │
│ │
│ ┌─────────────┐ │
│ │ Work Unit │ │
│ │ Distributor │ │
│ └─────────────┘ │
│ ┌─────────────┐ │
│ │ Security │ │
│ │ Manager │ │
│ └─────────────┘ │
│ ┌─────────────┐ │
│ │ GPU │ │
│ │ Accelerator │ │
│ └─────────────┘ │
└─────────────────┘
The system supports several types of work units:
- PROPAGATION_GRID: Grid-based propagation calculations
- ANTENNA_PATTERN: Antenna pattern calculations
- FREQUENCY_OFFSET: Frequency offset processing
- AUDIO_PROCESSING: Audio signal processing
- BATCH_QSO: Batch QSO calculations
- SOLAR_EFFECTS: Solar effects processing
- LIGHTNING_EFFECTS: Lightning effects processing
The work unit distribution system uses a weighted round-robin algorithm:
- Client Capability Assessment: Evaluate client capabilities
- Load Balancing: Distribute work based on client capacity
- Priority Handling: Process high-priority work units first
- Retry Logic: Handle failed work units with exponential backoff
- Result Aggregation: Combine results from multiple clients
Clients report their capabilities to the server:
struct ClientWorkUnitCapability {
std::string client_id;
std::vector<WorkUnitType> supported_types;
std::map<WorkUnitType, int> max_concurrent_units;
std::map<WorkUnitType, double> processing_speed_multiplier;
int max_memory_mb;
bool supports_gpu;
bool supports_double_precision;
double network_bandwidth_mbps;
double processing_latency_ms;
bool is_online;
};The system supports multiple authentication methods:
- API Key Authentication: Simple key-based authentication
- Client Certificate Authentication: X.509 certificate-based authentication
- JWT Token Authentication: JSON Web Token-based authentication
- OAuth2 Authentication: OAuth2 flow for enterprise integration
- LOW: Basic security for development environments
- MEDIUM: Standard security for production environments
- HIGH: Enhanced security for sensitive environments
- CRITICAL: Maximum security for military/government environments
- End-to-End Encryption: AES-256 encryption for sensitive data
- Digital Signatures: RSA-2048+ signatures for work unit integrity
- Key Management: Automated key rotation and management
- Certificate Validation: X.509 certificate chain validation
The system includes comprehensive threat detection:
- Authentication Monitoring: Track failed authentication attempts
- Rate Limiting: Prevent abuse with configurable rate limits
- Anomaly Detection: Detect unusual patterns in client behavior
- Automated Responses: Automatic blocking and alerting for threats
- CUDA: NVIDIA GPU acceleration
- OpenCL: Cross-platform GPU acceleration
- Metal: Apple GPU acceleration
struct GPUConfiguration {
bool cuda_enabled;
bool opencl_enabled;
bool metal_enabled;
int max_memory_mb;
double utilization_threshold;
double temperature_threshold;
std::vector<std::string> supported_frameworks;
};- Memory Management: Efficient GPU memory allocation
- Kernel Optimization: Optimized CUDA/OpenCL kernels
- Load Balancing: Distribute work across multiple GPUs
- Thermal Management: Monitor and manage GPU temperature
The system uses a thread pool for efficient resource management:
class ThreadPool {
private:
std::vector<std::thread> workers;
std::queue<std::function<void()>> tasks;
std::mutex queue_mutex;
std::condition_variable condition;
bool stop;
};- Mutex Protection: Protect shared resources with mutexes
- Condition Variables: Coordinate thread execution
- Atomic Operations: Use atomic operations for counters
- Lock-Free Data Structures: Minimize lock contention
- Work Stealing: Distribute work across threads
- Priority Queues: Process high-priority tasks first
- Dynamic Scaling: Adjust thread count based on load
- Resource Monitoring: Monitor thread utilization
- Yagi Antennas: 6m, 10m, 15m, 20m, 30m, 40m, 2m, 70cm
- Dipole Antennas: Various frequencies
- Loop Antennas: 80m loop and variations
- Vertical Antennas: Ground-based vertical antennas
- Custom Antennas: User-defined antenna patterns
- NEC File Processing: Parse NEC2 input files
- Frequency Analysis: Extract frequency information
- Pattern Calculation: Generate radiation patterns
- Attitude Variations: Apply pitch and roll variations
- Output Generation: Create pattern files
- Spherical Coordinates: Azimuth and elevation angles
- Cartesian Coordinates: X, Y, Z coordinates
- Antenna Coordinates: Antenna-specific coordinate system
- Global Coordinates: Earth-centered coordinate system
- Free Space Path Loss: Basic propagation model
- ITU-R Models: International Telecommunication Union models
- Tropospheric Scattering: Atmospheric scattering effects
- Ionospheric Reflection: Skywave propagation
- Ground Wave: Surface wave propagation
- Solar Activity: Sunspot cycle effects
- Ionospheric Conditions: F-layer and E-layer effects
- Tropospheric Conditions: Weather and atmospheric effects
- Geomagnetic Activity: Magnetic storm effects
- HF Bands: 3-30 MHz skywave propagation
- VHF Bands: 30-300 MHz line-of-sight propagation
- UHF Bands: 300-3000 MHz line-of-sight propagation
- Microwave Bands: 3-30 GHz line-of-sight propagation
- Aircraft: Fixed-wing and rotary-wing aircraft
- Ground Vehicles: Cars, trucks, and other ground vehicles
- Marine Vessels: Ships and boats
- Ground Stations: Fixed installations
- Position: Latitude, longitude, altitude
- Orientation: Pitch, roll, yaw angles
- Velocity: Linear and angular velocities
- Acceleration: Linear and angular accelerations
- Fixed Mounting: Antennas fixed to vehicle structure
- Gimbal Mounting: Antennas with independent orientation
- Steerable Antennas: Antennas that can be pointed
- Omnidirectional Antennas: Antennas with 360-degree coverage
- HF Bands: 3-30 MHz amateur and commercial bands
- VHF Bands: 30-300 MHz amateur and commercial bands
- UHF Bands: 300-3000 MHz amateur and commercial bands
- Microwave Bands: 3-30 GHz amateur and commercial bands
- Carrier Frequency: Base frequency of transmission
- Modulation Offset: Frequency offset for modulation
- Doppler Shift: Frequency shift due to motion
- Atmospheric Effects: Frequency-dependent atmospheric effects
- Amateur Bands: International amateur radio bands
- Commercial Bands: Commercial and military bands
- Emergency Bands: Emergency and disaster communication bands
- Experimental Bands: Experimental and research bands
The system implements a RESTful API with the following principles:
- Resource-Based URLs: URLs represent resources
- HTTP Methods: Use appropriate HTTP methods (GET, POST, PUT, DELETE)
- Status Codes: Return appropriate HTTP status codes
- Content Types: Use JSON for data exchange
GET /health- Server health statusGET /api/info- API informationGET /api/v1/config- Server configuration
GET /api/v1/work-units/status- Distributor statusGET /api/v1/work-units/queue- Queue stateGET /api/v1/work-units/clients- Client informationGET /api/v1/work-units/statistics- Processing statisticsGET /api/v1/work-units/config- Distribution configuration
GET /api/v1/security/status- Security statusGET /api/v1/security/events- Security eventsPOST /api/v1/security/authenticate- Client authenticationPOST /api/v1/security/register- Client registration
POST /api/v1/propagation- Single calculationPOST /api/v1/propagation/batch- Batch calculations
GET /api/v1/antennas- List antennasGET /api/v1/antennas/{name}- Get antenna pattern
GET /api/v1/ground- List ground systemsGET /api/v1/ground/{name}- Get ground system
The API implements comprehensive error handling:
- HTTP Status Codes: Appropriate status codes for different error types
- Error Messages: Descriptive error messages
- Error Codes: Numeric error codes for programmatic handling
- Retry Logic: Automatic retry for transient errors
- Request Limits: Configurable requests per minute
- Burst Handling: Allow burst requests within limits
- Client-Specific Limits: Different limits for different client types
- Penalty System: Progressive penalties for violations
- Result Caching: Cache frequently requested results
- Pattern Caching: Cache antenna patterns
- Configuration Caching: Cache server configuration
- Client Caching: Cache client capabilities
- Memory Pools: Pre-allocate memory for work units
- Garbage Collection: Automatic cleanup of unused resources
- Memory Monitoring: Track memory usage and leaks
- Resource Limits: Enforce memory limits per client
- Connection Pooling: Reuse HTTP connections
- Compression: Compress large responses
- Batch Processing: Process multiple requests together
- Async Processing: Non-blocking request processing
- Performance Metrics: CPU, memory, and network usage
- Work Unit Metrics: Processing times and success rates
- Client Metrics: Client performance and reliability
- Security Metrics: Security events and violations
- Structured Logging: JSON-formatted log entries
- Log Levels: DEBUG, INFO, WARN, ERROR, CRITICAL
- Log Rotation: Automatic log file rotation
- Log Aggregation: Centralized log collection
- Threshold Alerts: Alerts when metrics exceed thresholds
- Security Alerts: Alerts for security violations
- Performance Alerts: Alerts for performance degradation
- System Alerts: Alerts for system failures
This technical documentation provides a comprehensive overview of the FGCom-mumble system architecture and implementation. The system is designed for scalability, security, and performance in distributed radio propagation calculations.