Skip to content

[Feature] Support Industry Standard Formats (dBi/Degrees) for XML Antenna Patterns #183

@davidbits

Description

@davidbits

The current XML antenna pattern import is unintuitive and prone to crashes because it requires non-standard data formats. It currently expects:

  1. Linear Gain (non-negative) instead of the industry-standard dBi.
  2. Radians instead of Degrees.
  3. Absolute angles (assuming symmetry) instead of the full -π to π range.

The Problem

  • Crashes: Because the code expects linear gain, users providing dBi values (which are often negative) trigger division-by-zero errors or floating-point exceptions during the normalization process in XmlAntenna::loadAntennaDescription.
  • Usability: Users must manually convert their antenna data from standard datasheets (dBi/degrees) to the internal format (linear/radians), which is tedious and error-prone.
  • Flexibility: The assumption of symmetry prevents the modeling of asymmetrical antenna patterns.

Proposed Solution

  1. Update XML Schema: Allow optional attributes on <azimuth> and <elevation> tags to specify units (e.g., unit="deg", format="dBi").
  2. Internal Conversion: Update XmlAntenna::loadAntennaDescription to handle these conversions internally if the attributes are present, maintaining backward compatibility if they are missing.
  3. Support Asymmetry: Remove the std::abs() call in XmlAntenna::getGain to allow for full-range (-π to π) asymmetrical pattern definitions.

This would significantly improve the user experience and prevent common import crashes.

Metadata

Metadata

Assignees

Labels

scope: core-simulatorRelated to the C++ core engine (fers).scope: schemaRelated to the XML schema definition.scope: uiRelated to the Tauri/React UI (fers-ui).type: enhancementA new feature or a request for an improvement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions