mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-26 04:47:35 +00:00
chore: refine project documentation
This commit is contained in:
+5
-7
@@ -419,7 +419,7 @@ function BoardSupportsSupplyCurrent(BoardType: Integer): Boolean;
|
||||
|
||||
// Convert raw ADC value to supply current in Amps (Board 5 / Orion MkII only)
|
||||
// Uses UserADC1 (bytes 55-56). Returns -1 for unsupported boards.
|
||||
// VoffMV/SensMVA — калибровка датчика (Thetis AmpVoff/AmpSens, ACS712-style).
|
||||
// VoffMV/SensMVA — смещение нуля и чувствительность датчика тока.
|
||||
function ADCToSupplyCurrent(RawADC: Word; BoardType: Integer;
|
||||
VoffMV: Double = 360.0; SensMVA: Double = 120.0): Double;
|
||||
|
||||
@@ -429,8 +429,7 @@ function ADCToWatts100(RawADC: Word): Double;
|
||||
// Convert raw ADC value to RF power in Watts (ANAN-10)
|
||||
function ADCToWatts10(RawADC: Word): Double;
|
||||
|
||||
// Alex bridge FWD/REV detector → Watts, константы Thetis computeAlexFwdPower/
|
||||
// computeRefPower по модели трансивера:
|
||||
// Alex bridge FWD/REV detector → Watts; параметры зависят от модели трансивера:
|
||||
// 0 = ANAN-10/100/100B/100D (Vref 3.3V)
|
||||
// 1 = ANAN-200D / Orion (Vref 5.0V)
|
||||
// 2 = ANAN-7000DLE / Anvelina Pro 3 / G2 / Red Pitaya
|
||||
@@ -482,7 +481,7 @@ end;
|
||||
function ADCToSupplyVolts(RawADC: Word; BoardType: Integer): Double;
|
||||
begin
|
||||
// Protocol Appendix A gives the ADC reference voltage only.
|
||||
// The PCB voltage divider (from Thetis source) must also be applied.
|
||||
// The PCB voltage divider must also be applied.
|
||||
// Board 0 (Atlas): no supply voltage measurement.
|
||||
// Boards 1,2,3 (Hermes/Angelia): Vref=3.3V, PCB divider R1=4.7kΩ/R2=0.82kΩ.
|
||||
// Board 4 (Orion): protocol reports supply voltage with a 5.0V constant.
|
||||
@@ -511,8 +510,8 @@ function ADCToSupplyCurrent(RawADC: Word; BoardType: Integer;
|
||||
VoffMV: Double; SensMVA: Double): Double;
|
||||
begin
|
||||
// Board 5 (Orion MkII): UserADC1, Vref=5V → mV = adc/4095*5000.
|
||||
// Formula: amps = (mV - Voff) / Sens. Дефолты Voff=360мВ, Sens=120мВ/А
|
||||
// (Thetis, ACS712-style); переопределяются калибровкой.
|
||||
// Formula: amps = (mV - Voff) / Sens. Defaults: Voff=360 mV,
|
||||
// Sens=120 mV/A; both values can be overridden by calibration.
|
||||
if (BoardType = 5) and (SensMVA > 0) then
|
||||
begin
|
||||
Result := ((RawADC / 4095.0) * 5000.0 - VoffMV) / SensMVA;
|
||||
@@ -545,7 +544,6 @@ var
|
||||
Bridge, Vref, V: Double;
|
||||
CalOff: Integer;
|
||||
begin
|
||||
// Константы из Thetis (console.cs computeAlexFwdPower / computeRefPower).
|
||||
// W = ((ADC - CalOff)/4095 * Vref)^2 / Bridge.
|
||||
case DetModel of
|
||||
1: begin // ANAN-200D / Orion
|
||||
|
||||
Reference in New Issue
Block a user