Driver for the SX1280 RF Transceiver
Dependents: SX1280PingPong RangignMaster RangingSlave MSNV2-Terminal_V1-6 ... more
Revision 12:c4f110f3fe3e, committed 2018-11-08
- Comitter:
- mverdy
- Date:
- Thu Nov 08 10:08:44 2018 +0000
- Parent:
- 11:d60df50e108f
- Commit message:
- Synchronze driver on v1.3.1
Changed in this revision
diff -r d60df50e108f -r c4f110f3fe3e RangingCorrection.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RangingCorrection.cpp Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,121 @@ +#include "RangingCorrection.h" + +#include "rangingCorrection/rangingCorrectionSF5BW0400.h" +#include "rangingCorrection/rangingCorrectionSF6BW0400.h" +#include "rangingCorrection/rangingCorrectionSF7BW0400.h" +#include "rangingCorrection/rangingCorrectionSF8BW0400.h" +#include "rangingCorrection/rangingCorrectionSF9BW0400.h" +#include "rangingCorrection/rangingCorrectionSF10BW0400.h" +#include "rangingCorrection/rangingCorrectionSF5BW0800.h" +#include "rangingCorrection/rangingCorrectionSF6BW0800.h" +#include "rangingCorrection/rangingCorrectionSF7BW0800.h" +#include "rangingCorrection/rangingCorrectionSF8BW0800.h" +#include "rangingCorrection/rangingCorrectionSF9BW0800.h" +#include "rangingCorrection/rangingCorrectionSF10BW0800.h" +#include "rangingCorrection/rangingCorrectionSF5BW1600.h" +#include "rangingCorrection/rangingCorrectionSF6BW1600.h" +#include "rangingCorrection/rangingCorrectionSF7BW1600.h" +#include "rangingCorrection/rangingCorrectionSF8BW1600.h" +#include "rangingCorrection/rangingCorrectionSF9BW1600.h" +#include "rangingCorrection/rangingCorrectionSF10BW1600.h" + +const double* RangingCorrectionPerSfBwGain[6][3] = { + { &RangingCorrectionSF5BW0400[0], &RangingCorrectionSF5BW0800[0], &RangingCorrectionSF5BW1600[0] }, + { &RangingCorrectionSF6BW0400[0], &RangingCorrectionSF6BW0800[0], &RangingCorrectionSF6BW1600[0] }, + { &RangingCorrectionSF7BW0400[0], &RangingCorrectionSF7BW0800[0], &RangingCorrectionSF7BW1600[0] }, + { &RangingCorrectionSF8BW0400[0], &RangingCorrectionSF8BW0800[0], &RangingCorrectionSF8BW1600[0] }, + { &RangingCorrectionSF9BW0400[0], &RangingCorrectionSF9BW0800[0], &RangingCorrectionSF9BW1600[0] }, + { &RangingCorrectionSF10BW0400[0], &RangingCorrectionSF10BW0800[0], &RangingCorrectionSF10BW1600[0] }, +}; + +const RangingCorrectionPolynomes_t* RangingCorrectionPolynomesPerSfBw[6][3] = { + { &correctionRangingPolynomeSF5BW0400, &correctionRangingPolynomeSF5BW0800, &correctionRangingPolynomeSF5BW1600 }, + { &correctionRangingPolynomeSF6BW0400, &correctionRangingPolynomeSF6BW0800, &correctionRangingPolynomeSF6BW1600 }, + { &correctionRangingPolynomeSF7BW0400, &correctionRangingPolynomeSF7BW0800, &correctionRangingPolynomeSF7BW1600 }, + { &correctionRangingPolynomeSF8BW0400, &correctionRangingPolynomeSF8BW0800, &correctionRangingPolynomeSF8BW1600 }, + { &correctionRangingPolynomeSF9BW0400, &correctionRangingPolynomeSF9BW0800, &correctionRangingPolynomeSF9BW1600 }, + { &correctionRangingPolynomeSF10BW0400, &correctionRangingPolynomeSF10BW0800, &correctionRangingPolynomeSF10BW1600 }, +}; + +double Sx1280RangingCorrection::GetRangingCorrectionPerSfBwGain( const RadioLoRaSpreadingFactors_t sf, const RadioLoRaBandwidths_t bw, const int8_t gain){ + uint8_t sf_index, bw_index; + + switch(sf){ + case LORA_SF5: + sf_index = 0; + break; + case LORA_SF6: + sf_index = 1; + break; + case LORA_SF7: + sf_index = 2; + break; + case LORA_SF8: + sf_index = 3; + break; + case LORA_SF9: + sf_index = 4; + break; + case LORA_SF10: + sf_index = 5; + break; + } + switch(bw){ + case LORA_BW_0400: + bw_index = 0; + break; + case LORA_BW_0800: + bw_index = 1; + break; + case LORA_BW_1600: + bw_index = 2; + break; + } + + double correction = RangingCorrectionPerSfBwGain[sf_index][bw_index][gain]; + return correction; +} + +double Sx1280RangingCorrection::ComputeRangingCorrectionPolynome(const RadioLoRaSpreadingFactors_t sf, const RadioLoRaBandwidths_t bw, const double median){ + uint8_t sf_index, bw_index; + + switch(sf){ + case LORA_SF5: + sf_index = 0; + break; + case LORA_SF6: + sf_index = 1; + break; + case LORA_SF7: + sf_index = 2; + break; + case LORA_SF8: + sf_index = 3; + break; + case LORA_SF9: + sf_index = 4; + break; + case LORA_SF10: + sf_index = 5; + break; + } + switch(bw){ + case LORA_BW_0400: + bw_index = 0; + break; + case LORA_BW_0800: + bw_index = 1; + break; + case LORA_BW_1600: + bw_index = 2; + break; + } + const RangingCorrectionPolynomes_t *polynome = RangingCorrectionPolynomesPerSfBw[sf_index][bw_index]; + double correctedValue = 0.0; + double correctionCoeff = 0; + for(uint8_t order = 0; order < polynome->order; order++){ + correctionCoeff = polynome->coefficients[order] * pow(median, polynome->order - order - 1); + correctedValue += correctionCoeff; + } + return correctedValue; +}
diff -r d60df50e108f -r c4f110f3fe3e RangingCorrection.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RangingCorrection.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,12 @@ +#ifndef __SX1280_RANGING_CORRECTION_H__ +#define __SX1280_RANGING_CORRECTION_H__ + +#include "sx1280.h" + +namespace Sx1280RangingCorrection +{ +double GetRangingCorrectionPerSfBwGain( const RadioLoRaSpreadingFactors_t sf, const RadioLoRaBandwidths_t bw, const int8_t gain); +double ComputeRangingCorrectionPolynome(const RadioLoRaSpreadingFactors_t sf, const RadioLoRaBandwidths_t bw, const double median); +} + +#endif // __SX1280_RANGING_CORRECTION_H__
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF10BW0400.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF10BW0400.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,152 @@ +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF10BW0400[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -5.8767, // 0 + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -2.2375, + -1.6080, + -0.0631, + 0.9782, + 3.1984, + 3.3014, + 3.1927, + 3.4959, + 3.2842, + 3.2098, + 2.9237, + 2.9123, + 3.0038, + 2.9294, + 2.8722, + 2.7120, + 2.6033, + 2.6548, + 2.7292, + 2.5690, + 2.5575, + 2.6033, + 2.5861, + 2.5575, + 2.5232, + 2.5918, + 2.5804, + 2.4888, + 2.5232, + 2.5346, + 2.5575, + 2.5747, + 2.4774, + 2.9581, + 2.6491, + 2.6548, + 2.7177, + 2.8093, + 2.9924, + 4.2283, + 4.7204, + 4.7319, + 5.1439, + 4.9665, + 5.4557, + 5.9450, + 6.4599, + 6.9749, + 7.4899, + 7.3564, + 7.2229, + 7.0894, + 6.9559, + 6.8223, + 6.6888, + 6.5553, + 6.4218, + 6.2883, + 7.6787, + 7.9591, + 7.9019, + 7.9133, + 8.0736, + 7.9248, + 8.0221, + 8.0163, + 8.3711, + 8.3139, + 8.3597, + 8.5714, + 8.6801, + 9.0692, + 9.3553, + 9.0864, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF10BW0400 = { + .order = 1, + .coefficients = {1} +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF10BW0800.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF10BW0800.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF10BW0800[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -15.7301, + -6.5519, + 0.81806, + -0.18902, + 3.4731, + 6.4486, + 6.0823, + 5.2355, + 4.3886, + 4.1826, + 4.0682, + 3.3815, + 2.8322, + 3.1527, + 2.6033, + 3.1984, + 3.0153, + 2.878, + 2.0998, + 1.6649, + 2.1913, + 2.1913, + 2.0998, + 1.7336, + 1.6878, + 1.6878, + 1.8709, + 2.054, + 2.0082, + 1.6878, + 1.5963, + 1.5047, + 1.8251, + 1.7794, + 1.7794, + 1.9167, + 1.6878, + 1.7336, + 2.0082, + 2.2829, + 1.9625, + 1.8709, + 2.3745, + 2.054, + 3.5189, + 3.4731, + 3.1984, + 3.8393, + 4.3886, + 3.8393, + 4.1597, + 4.3886, + 4.6633, + 4.8006, + 4.5717, + 4.4802, + 4.709, + 4.709, + 4.709, + 4.6633, + 4.8922, + 6.0823, + 6.4486, + 6.4486, + 7.2725, + 7.1352, + 7.2725, + 7.2267, + 7.2725, + 6.9979, + 7.181, + 7.4556, + 7.9134, + 7.7761, + 7.7761, + 8.2338, + 7.9134, + 8.2338, + 8.0965, + 8.4169, + 8.9205, + 8.6916, + 8.6458, + 9.6071, + 9.1494, + 8.5085, + 8.1423, + 8.9205, + 8.9663, + 9.0578, + 9.424, + 9.2867, + 9.012, + 9.6529, + 9.9733, + 9.6529, + 9.6987, + 10.0191, + 9.5156, + 9.2409, + 9.836, + 9.5156, + 9.6529, + 10.248, + 9.9733, + 9.6529, + 10.2022, + 10.2022, + 10.1564, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + 7.3183, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF10BW0800 = { + .order = 7, + .coefficients = { + -2.5249e-10, + 4.1465e-08, + -2.1035e-07, + -0.00023649, + 0.012744, + 0.64066, + 0.84731, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF10BW1600.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF10BW1600.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF10BW1600[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 0.60062, + 1.4818, + 3.2328, + 2.6262, + 2.054, + 2.6262, + 1.5619, + 1.9281, + 2.2943, + 1.4132, + 1.4589, + 1.4475, + 1.9625, + 1.7565, + 1.5505, + 1.8709, + 1.9167, + 1.8709, + 1.6191, + 1.6649, + 1.6878, + 1.5963, + 1.7794, + 1.9052, + 1.8251, + 1.7336, + 1.5734, + 1.5047, + 1.7336, + 1.848, + 1.7107, + 1.642, + 1.7107, + 1.7565, + 1.5734, + 1.5963, + 1.5734, + 1.7794, + 1.7336, + 1.6878, + 1.6878, + 1.7107, + 1.8022, + 1.7336, + 2.4431, + 1.7565, + 1.7565, + 3.4044, + 3.6333, + 3.8622, + 3.5646, + 3.6104, + 3.5646, + 3.6333, + 3.5189, + 3.6791, + 3.7935, + 3.7249, + 3.7706, + 3.9537, + 3.8965, + 3.6562, + 3.7706, + 4.4115, + 5.4758, + 6.2654, + 6.5401, + 6.563, + 6.7003, + 6.8376, + 6.8148, + 6.8148, + 6.8148, + 7.0436, + 7.1352, + 7.3641, + 7.387, + 7.4785, + 7.6158, + 7.5701, + 7.593, + 7.5701, + 7.7303, + 7.9134, + 7.9134, + 7.9592, + 8.1194, + 8.3025, + 8.3712, + 8.5543, + 8.8976, + 8.8747, + 9.012, + 9.1036, + 9.0578, + 9.012, + 9.1494, + 9.1036, + 9.218, + 9.218, + 9.218, + 9.2638, + 9.1951, + 9.1265, + 9.3096, + 9.2638, + 9.2752, + 9.2638, + 9.2409, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + 8.9777, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF10BW1600 = { + .order = 7, + .coefficients = { + 4.9932e-11, + -5.5685e-08, + 1.0616e-05, + -0.00070018, + 0.017218, + 0.70178, + 0.65429, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF5BW0400.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF5BW0400.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,152 @@ +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF5BW0400[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -5.8767, // 0 + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -2.2375, + -1.6080, + -0.0631, + 0.9782, + 3.1984, + 3.3014, + 3.1927, + 3.4959, + 3.2842, + 3.2098, + 2.9237, + 2.9123, + 3.0038, + 2.9294, + 2.8722, + 2.7120, + 2.6033, + 2.6548, + 2.7292, + 2.5690, + 2.5575, + 2.6033, + 2.5861, + 2.5575, + 2.5232, + 2.5918, + 2.5804, + 2.4888, + 2.5232, + 2.5346, + 2.5575, + 2.5747, + 2.4774, + 2.9581, + 2.6491, + 2.6548, + 2.7177, + 2.8093, + 2.9924, + 4.2283, + 4.7204, + 4.7319, + 5.1439, + 4.9665, + 5.4557, + 5.9450, + 6.4599, + 6.9749, + 7.4899, + 7.3564, + 7.2229, + 7.0894, + 6.9559, + 6.8223, + 6.6888, + 6.5553, + 6.4218, + 6.2883, + 7.6787, + 7.9591, + 7.9019, + 7.9133, + 8.0736, + 7.9248, + 8.0221, + 8.0163, + 8.3711, + 8.3139, + 8.3597, + 8.5714, + 8.6801, + 9.0692, + 9.3553, + 9.0864, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF5BW0400 = { + .order = 1, + .coefficients = {1} +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF5BW0800.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF5BW0800.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF5BW0800[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + 629.5565, + -3.5078, + -7.8566, + -5.2244, + 1.7336, + 1.7565, + 1.7794, + 2.2829, + 1.7794, + 2.0998, + 1.5047, + 1.5047, + 1.6878, + 1.7336, + 1.1843, + 1.7794, + 0.95539, + 0.68073, + 0.40607, + 0.58918, + 0.31452, + 0.36029, + 0.22296, + 0.22296, + 0.22296, + -0.09747, + 0.085636, + 0.17719, + 0.13141, + -0.051693, + -0.14325, + -0.005917, + -0.051693, + 0.17719, + 0.085636, + -0.09747, + 0.085636, + 0.039859, + 0.039859, + 0.86383, + 1.1843, + 0.90961, + 0.40607, + 1.8251, + 2.5576, + 2.3287, + 2.878, + 2.6949, + 2.7407, + 3.4731, + 4.709, + 1.5505, + 3.3815, + 1.8709, + 3.1984, + 1.7107, + 3.8393, + 4.9379, + 5.3957, + 5.5559, + 4.6633, + 5.9221, + 5.4186, + 6.7232, + 6.3112, + 6.0366, + 6.2654, + 6.5859, + 5.945, + 6.1739, + 6.1739, + 6.6088, + 6.9063, + 6.1281, + 6.7232, + 6.0595, + 6.4028, + 6.8148, + 6.7232, + 7.3183, + 7.3412, + 7.4099, + 7.5472, + 7.9592, + 8.5085, + 8.4398, + 8.5543, + 8.7374, + 9.3325, + 6.7461, + 7.3641, + 9.9276, + 8.1423, + 7.6158, + 8.2338, + 8.0507, + 8.1881, + 8.1881, + 8.0049, + 7.9134, + 8.9205, + 8.5085, + 8.394, + 8.0278, + 8.0965, + 7.8218, + 7.4327, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + 7.1581, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF5BW0800 = { + .order = 7, + .coefficients = { + 1.2982e-09, + -4.2047e-07, + 4.7657e-05, + -0.002194, + 0.033782, + 0.94647, + 2.0949, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF5BW1600.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF5BW1600.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF5BW1600[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1406.2441, + 1117.441, + 183.2598, + 7.4327, + 3.7821, + 2.9238, + 2.9467, + 3.2671, + 3.0611, + 2.26, + 2.5461, + 2.1913, + 2.1913, + 2.1456, + 2.3745, + 2.3287, + 2.2371, + 2.1685, + 2.2371, + 2.1456, + 2.3058, + 2.054, + 2.157, + 2.2142, + 2.1685, + 2.2371, + 2.2371, + 2.26, + 2.2142, + 2.2371, + 2.3058, + 2.1913, + 2.054, + 2.0769, + 2.2829, + 1.9854, + 2.0998, + 2.1913, + 2.3058, + 2.8093, + 3.1069, + 3.9995, + 3.8851, + 4.6862, + 4.6061, + 4.2513, + 4.3199, + 4.8464, + 4.6175, + 4.7319, + 4.8235, + 4.7548, + 5.0066, + 5.4186, + 6.151, + 6.2197, + 6.6088, + 7.2039, + 7.4327, + 7.6158, + 7.9134, + 7.8218, + 7.6387, + 7.6845, + 7.284, + 7.4327, + 7.5472, + 7.593, + 7.4327, + 8.0965, + 7.9134, + 7.4556, + 7.7532, + 7.8905, + 8.2796, + 8.4169, + 8.4398, + 8.6, + 8.8289, + 8.9663, + 9.6529, + 9.7902, + 10.1793, + 9.6758, + 9.7902, + 9.6987, + 9.5842, + 9.5156, + 9.4927, + 9.4469, + 9.5842, + 9.5156, + 9.5385, + 9.5156, + 9.0349, + 9.0349, + 9.0349, + 9.3554, + 9.1951, + 9.5385, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + 8.7488, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF5BW1600 = { + .order = 7, + .coefficients = { + 5.2651e-10, + -2.2875e-07, + 3.4135e-05, + -0.00215, + 0.056288, + 0.307, + 0.86706, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF6BW0400.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF6BW0400.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,152 @@ +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF6BW0400[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -5.8767, // 0 + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -2.2375, + -1.6080, + -0.0631, + 0.9782, + 3.1984, + 3.3014, + 3.1927, + 3.4959, + 3.2842, + 3.2098, + 2.9237, + 2.9123, + 3.0038, + 2.9294, + 2.8722, + 2.7120, + 2.6033, + 2.6548, + 2.7292, + 2.5690, + 2.5575, + 2.6033, + 2.5861, + 2.5575, + 2.5232, + 2.5918, + 2.5804, + 2.4888, + 2.5232, + 2.5346, + 2.5575, + 2.5747, + 2.4774, + 2.9581, + 2.6491, + 2.6548, + 2.7177, + 2.8093, + 2.9924, + 4.2283, + 4.7204, + 4.7319, + 5.1439, + 4.9665, + 5.4557, + 5.9450, + 6.4599, + 6.9749, + 7.4899, + 7.3564, + 7.2229, + 7.0894, + 6.9559, + 6.8223, + 6.6888, + 6.5553, + 6.4218, + 6.2883, + 7.6787, + 7.9591, + 7.9019, + 7.9133, + 8.0736, + 7.9248, + 8.0221, + 8.0163, + 8.3711, + 8.3139, + 8.3597, + 8.5714, + 8.6801, + 9.0692, + 9.3553, + 9.0864, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF6BW0400 = { + .order = 1, + .coefficients = {1} +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF6BW0800.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF6BW0800.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF6BW0800[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -26.0984, + -7.8795, + 3.9309, + 1.8709, + 0.085636, + 1.7794, + 1.8938, + 2.0082, + 2.6033, + 2.3516, + 2.5576, + 2.6033, + 1.6878, + 1.5276, + 1.7336, + 1.5963, + 1.8709, + 2.054, + 1.642, + 1.23, + 1.0927, + 1.0927, + 1.23, + 1.0012, + 0.86383, + 0.86383, + 0.63495, + 0.7265, + 1.1614, + 1.1385, + 0.81806, + 0.70362, + 0.77228, + 1.0469, + 0.95539, + 1.0927, + 1.0469, + 1.0012, + 0.86383, + 1.0012, + 0.86383, + 1.1385, + 1.0012, + 1.3216, + 2.4202, + 2.9695, + 3.1984, + 3.29, + 3.0153, + 2.878, + 3.1984, + 3.0153, + 3.0382, + 3.1069, + 2.878, + 2.878, + 2.878, + 3.0153, + 3.8393, + 5.4872, + 5.8992, + 6.0823, + 6.0366, + 6.0366, + 6.0823, + 6.0366, + 6.4486, + 6.4028, + 6.2883, + 6.4028, + 6.357, + 6.9521, + 7.181, + 7.181, + 7.0894, + 7.2267, + 7.0894, + 7.181, + 7.6158, + 7.8676, + 7.7303, + 8.0049, + 7.9592, + 8.2796, + 8.4169, + 8.5085, + 8.5543, + 8.5543, + 9.2409, + 9.1494, + 8.7831, + 8.6458, + 8.6, + 8.6916, + 8.6458, + 8.7374, + 8.7374, + 8.6458, + 8.4627, + 8.4169, + 8.4398, + 8.3712, + 8.4627, + 8.3254, + 8.2338, + 8.0507, + 8.0049, + 7.8218, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + 5.327, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF6BW0800 = { + .order = 7, + .coefficients = { + 7.332e-10, + -2.6601e-07, + 3.3492e-05, + -0.0017251, + 0.0325, + 0.75862, + 0.76234, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF6BW1600.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF6BW1600.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF6BW1600[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 5.1897, + 3.4159, + 1.642, + 3.29, + 2.5232, + 2.3516, + 2.7178, + 2.2829, + 2.363, + 2.4202, + 2.6949, + 2.5576, + 2.5347, + 2.3516, + 2.1456, + 2.0769, + 2.0311, + 2.3058, + 2.0769, + 2.054, + 2.2142, + 2.1227, + 2.1913, + 2.0769, + 2.0998, + 2.0998, + 2.0998, + 2.1227, + 2.1227, + 2.054, + 2.0998, + 2.1456, + 2.1341, + 2.0998, + 2.1913, + 2.5118, + 2.5576, + 2.2829, + 2.1913, + 2.2371, + 2.3287, + 2.3516, + 3.7706, + 4.3199, + 4.2284, + 4.6633, + 3.8393, + 6.1968, + 4.0453, + 4.7319, + 5.4186, + 6.1052, + 6.8071, + 7.509, + 8.2109, + 9.7673, + 10.4311, + 8.4227, + 6.4142, + 6.1739, + 6.7919, + 7.0665, + 7.2725, + 7.4327, + 7.2954, + 7.4556, + 7.387, + 7.2954, + 7.387, + 7.8905, + 7.8218, + 7.799, + 7.9821, + 8.0965, + 8.5085, + 8.7145, + 9.4927, + 10.2709, + 10.3138, + 10.3567, + 10.3996, + 10.4425, + 10.4855, + 10.5284, + 10.5713, + 10.6142, + 9.0578, + 9.424, + 9.9047, + 9.2752, + 9.1951, + 9.1722, + 9.0578, + 9.1036, + 9.012, + 9.0807, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + 8.5772, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF6BW1600 = { + .order = 7, + .coefficients = { + -4.0868e-11, + -3.4304e-08, + 8.0824e-06, + -0.00046919, + 0.0041892, + 1.0182, + 0.63995, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF7BW0400.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF7BW0400.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,152 @@ +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF7BW0400[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -5.8767, // 0 + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -2.2375, + -1.6080, + -0.0631, + 0.9782, + 3.1984, + 3.3014, + 3.1927, + 3.4959, + 3.2842, + 3.2098, + 2.9237, + 2.9123, + 3.0038, + 2.9294, + 2.8722, + 2.7120, + 2.6033, + 2.6548, + 2.7292, + 2.5690, + 2.5575, + 2.6033, + 2.5861, + 2.5575, + 2.5232, + 2.5918, + 2.5804, + 2.4888, + 2.5232, + 2.5346, + 2.5575, + 2.5747, + 2.4774, + 2.9581, + 2.6491, + 2.6548, + 2.7177, + 2.8093, + 2.9924, + 4.2283, + 4.7204, + 4.7319, + 5.1439, + 4.9665, + 5.4557, + 5.9450, + 6.4599, + 6.9749, + 7.4899, + 7.3564, + 7.2229, + 7.0894, + 6.9559, + 6.8223, + 6.6888, + 6.5553, + 6.4218, + 6.2883, + 7.6787, + 7.9591, + 7.9019, + 7.9133, + 8.0736, + 7.9248, + 8.0221, + 8.0163, + 8.3711, + 8.3139, + 8.3597, + 8.5714, + 8.6801, + 9.0692, + 9.3553, + 9.0864, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF7BW0400 = { + .order = 1, + .coefficients = {1} +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF7BW0800.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF7BW0800.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF7BW0800[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + 0.81806, + -2.2261, + 1.8251, + 3.2442, + 2.5347, + 3.8851, + 3.4273, + 3.0268, + 2.6262, + 2.5118, + 3.4044, + 2.6949, + 2.7864, + 2.5118, + 2.7178, + 2.8322, + 2.8322, + 2.7864, + 3.5646, + 3.0153, + 3.1069, + 3.1069, + 2.9695, + 2.6949, + 2.7407, + 2.6033, + 2.5118, + 2.6033, + 2.1456, + 2.0082, + 2.3058, + 2.054, + 1.7336, + 1.8709, + 1.6878, + 1.6878, + 2.0082, + 2.1456, + 2.054, + 2.1913, + 2.1456, + 2.2371, + 2.0998, + 2.0082, + 2.0998, + 2.7864, + 4.0682, + 4.114, + 4.0682, + 3.9309, + 4.0224, + 3.702, + 3.7477, + 3.6562, + 3.6562, + 3.6104, + 3.702, + 3.5646, + 3.5189, + 4.1597, + 5.3728, + 5.8077, + 6.0366, + 5.8992, + 5.0753, + 6.6317, + 6.4943, + 6.3112, + 6.2654, + 6.6774, + 6.9979, + 7.0894, + 7.593, + 7.8218, + 7.6158, + 7.7303, + 7.2267, + 7.8218, + 7.4099, + 7.7303, + 7.9134, + 8.4627, + 8.7374, + 8.7831, + 8.6458, + 8.6916, + 8.8747, + 8.7374, + 8.6916, + 8.8747, + 9.2409, + 9.4698, + 9.6071, + 9.3325, + 9.218, + 9.424, + 9.2409, + 9.1036, + 9.2409, + 9.1951, + 8.9663, + 9.1494, + 9.0578, + 9.1494, + 9.1036, + 9.0578, + 9.1036, + 9.2409, + 9.1036, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + 10.2938, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF7BW0800 = { + .order = 7, + .coefficients = { + 1.1319e-09, + -4.0746e-07, + 5.2135e-05, + -0.002826, + 0.060466, + 0.47938, + 1.0562, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF7BW1600.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF7BW1600.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF7BW1600[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -1.7225, + -0.94433, + 0.016971, + 0.57773, + 1.1385, + 1.5047, + 1.6649, + 1.6535, + 1.5963, + 1.8022, + 1.5963, + 1.5161, + 1.5963, + 1.4818, + 1.5963, + 1.2529, + 1.4132, + 1.2987, + 1.3903, + 1.3788, + 1.3674, + 1.2987, + 1.4818, + 1.3903, + 1.4589, + 1.3903, + 1.4818, + 1.4475, + 1.5505, + 1.5505, + 1.436, + 1.4818, + 1.5505, + 1.6191, + 1.5276, + 1.6649, + 1.7336, + 1.5734, + 1.6191, + 1.7107, + 1.5734, + 1.7336, + 1.5963, + 1.642, + 2.2371, + 3.702, + 3.6791, + 3.4731, + 3.5418, + 3.4502, + 3.5189, + 3.5875, + 3.5646, + 3.5418, + 3.4273, + 3.4273, + 3.6562, + 3.599, + 3.6333, + 4.4802, + 5.2469, + 5.0981, + 4.8693, + 5.4415, + 6.1968, + 6.5859, + 6.6545, + 6.5172, + 6.5401, + 6.769, + 7.4327, + 7.0665, + 7.0894, + 7.2039, + 7.0208, + 7.3412, + 7.4556, + 7.387, + 7.6387, + 7.9592, + 8.0164, + 8.1423, + 7.8447, + 8.2796, + 8.4398, + 8.5543, + 8.4398, + 8.7145, + 8.9891, + 8.6458, + 8.6916, + 8.6687, + 8.6229, + 8.7603, + 8.8747, + 8.7374, + 8.6687, + 8.5772, + 8.5543, + 8.5543, + 8.4856, + 8.4627, + 8.7145, + 8.806, + 8.7603, + 7.3412, + 8.0965, + 4.2284, + 16.3248, + 16.5422, + 16.5422, + 15.9471, + 16.1989, + 15.8785, + 15.558, + 15.558, + 15.558, + 15.558, + 15.558, + 15.558, + 15.558, + 15.558, + 15.558, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF7BW1600 = { + .order = 7, + .coefficients = { + 2.8727e-10, + -1.3583e-07, + 1.9766e-05, + -0.0010869, + 0.019294, + 0.8705, + 0.64863, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF8BW0400.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF8BW0400.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,152 @@ +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF8BW0400[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -5.8767, // 0 + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -2.2375, + -1.6080, + -0.0631, + 0.9782, + 3.1984, + 3.3014, + 3.1927, + 3.4959, + 3.2842, + 3.2098, + 2.9237, + 2.9123, + 3.0038, + 2.9294, + 2.8722, + 2.7120, + 2.6033, + 2.6548, + 2.7292, + 2.5690, + 2.5575, + 2.6033, + 2.5861, + 2.5575, + 2.5232, + 2.5918, + 2.5804, + 2.4888, + 2.5232, + 2.5346, + 2.5575, + 2.5747, + 2.4774, + 2.9581, + 2.6491, + 2.6548, + 2.7177, + 2.8093, + 2.9924, + 4.2283, + 4.7204, + 4.7319, + 5.1439, + 4.9665, + 5.4557, + 5.9450, + 6.4599, + 6.9749, + 7.4899, + 7.3564, + 7.2229, + 7.0894, + 6.9559, + 6.8223, + 6.6888, + 6.5553, + 6.4218, + 6.2883, + 7.6787, + 7.9591, + 7.9019, + 7.9133, + 8.0736, + 7.9248, + 8.0221, + 8.0163, + 8.3711, + 8.3139, + 8.3597, + 8.5714, + 8.6801, + 9.0692, + 9.3553, + 9.0864, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF8BW0400 = { + .order = 1, + .coefficients = {1} +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF8BW0800.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF8BW0800.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF8BW0800[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 6.5401, + 9.0578, + 8.3254, + 8.7145, + 7.9134, + 5.8535, + 2.9238, + 3.3586, + 3.7935, + 4.5946, + 3.3358, + 3.3815, + 2.466, + 2.2829, + 2.26, + 2.6949, + 2.5576, + 2.6949, + 2.7407, + 1.9625, + 2.6491, + 2.6262, + 2.466, + 2.466, + 2.6491, + 2.5118, + 2.6949, + 2.6033, + 2.2371, + 2.0082, + 2.4202, + 2.3745, + 2.3287, + 1.2758, + 2.3745, + 2.1456, + 2.4202, + 2.2371, + 2.1913, + 2.1913, + 2.0998, + 1.9167, + 1.7336, + 1.9625, + 2.0082, + 3.1069, + 3.5646, + 3.2442, + 2.6033, + 2.3287, + 2.466, + 3.0153, + 3.1527, + 3.5189, + 3.6562, + 4.0682, + 4.3886, + 3.9309, + 4.1597, + 4.5259, + 4.0682, + 4.2971, + 4.4802, + 6.1739, + 4.9837, + 4.8006, + 5.1668, + 5.6246, + 6.5859, + 5.5788, + 6.357, + 6.8605, + 5.8077, + 5.533, + 7.0436, + 7.2267, + 7.0436, + 6.9979, + 7.6387, + 7.5014, + 7.181, + 7.2267, + 7.2725, + 7.0894, + 7.5014, + 7.4099, + 7.181, + 7.8676, + 7.8676, + 7.8218, + 8.1423, + 8.6458, + 8.2796, + 6.9063, + 8.1881, + 8.0049, + 7.9134, + 8.8289, + 9.1951, + 9.1951, + 8.8289, + 8.8289, + 8.6916, + 9.012, + 9.1951, + 9.2867, + 9.1494, + 9.1494, + 9.1494, + 9.3782, + 9.2867, + 8.9205, + 9.0578, + 9.6071, + 9.6071, + 9.4698, + 9.3325, + 9.1951, + 8.5543, + 9.0807, + 9.6071, + 8.9205, + 8.9205, + 8.9205, + 8.9205, + 8.9205, + 8.9205, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF8BW0800 = { + .order = 7, + .coefficients = { + 1.3734e-09, + -4.8827e-07, + 6.2307e-05, + -0.0034244, + 0.076932, + 0.31329, + 0.80983, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF8BW1600.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF8BW1600.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF8BW1600[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -14.2767, + -8.9895, + -3.7596, + -2.043, + -0.57812, + 2.7521, + 6.0823, + 7.0208, + 5.6017, + 5.7619, + 6.5859, + 6.5973, + 5.3156, + 3.4388, + 2.3859, + 3.8164, + 3.5189, + 3.4845, + 4.2971, + 3.7935, + 3.3815, + 3.4845, + 3.5189, + 3.5875, + 3.3815, + 3.1755, + 2.9581, + 3.0611, + 3.0153, + 2.9009, + 2.8093, + 3.5875, + 3.3815, + 2.7864, + 2.7407, + 2.672, + 2.7864, + 2.6949, + 2.7178, + 2.6949, + 2.7407, + 2.7864, + 2.7636, + 2.7864, + 2.8322, + 2.878, + 3.702, + 3.6562, + 3.3358, + 3.702, + 3.3815, + 3.6562, + 3.9309, + 3.8164, + 4.0911, + 4.4229, + 4.6862, + 4.6175, + 4.7548, + 4.9837, + 6.5401, + 6.0366, + 5.4644, + 5.9679, + 7.4671, + 5.6475, + 5.121, + 5.0295, + 5.9221, + 7.6845, + 7.3183, + 6.7003, + 7.9363, + 6.9979, + 6.8834, + 8.2338, + 8.1423, + 8.5085, + 8.1194, + 7.8676, + 8.0278, + 7.7761, + 8.4398, + 8.2567, + 8.2338, + 8.5543, + 8.6, + 8.5772, + 8.8175, + 9.1036, + 8.8976, + 8.8747, + 9.1722, + 9.1494, + 9.63, + 9.6071, + 9.836, + 10.0763, + 9.7673, + 9.8818, + 9.7788, + 9.7673, + 9.7444, + 9.8818, + 9.9504, + 9.9962, + 10.1107, + 10.042, + 10.042, + 10.2137, + 10.0878, + 9.9276, + 10.1107, + 9.5156, + 9.0464, + 9.3296, + 9.6128, + 9.8961, + 10.1793, + 10.1335, + 8.2796, + 8.169, + 8.0584, + 7.9477, + 7.9477, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF8BW1600 = { + .order = 7, + .coefficients = { + 7.2578e-10, + -2.8033e-07, + 3.8153e-05, + -0.0022174, + 0.053196, + 0.45123, + 1.0199, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF9BW0400.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF9BW0400.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,152 @@ +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF9BW0400[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -5.8767, // 0 + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -5.8767, + -2.2375, + -1.6080, + -0.0631, + 0.9782, + 3.1984, + 3.3014, + 3.1927, + 3.4959, + 3.2842, + 3.2098, + 2.9237, + 2.9123, + 3.0038, + 2.9294, + 2.8722, + 2.7120, + 2.6033, + 2.6548, + 2.7292, + 2.5690, + 2.5575, + 2.6033, + 2.5861, + 2.5575, + 2.5232, + 2.5918, + 2.5804, + 2.4888, + 2.5232, + 2.5346, + 2.5575, + 2.5747, + 2.4774, + 2.9581, + 2.6491, + 2.6548, + 2.7177, + 2.8093, + 2.9924, + 4.2283, + 4.7204, + 4.7319, + 5.1439, + 4.9665, + 5.4557, + 5.9450, + 6.4599, + 6.9749, + 7.4899, + 7.3564, + 7.2229, + 7.0894, + 6.9559, + 6.8223, + 6.6888, + 6.5553, + 6.4218, + 6.2883, + 7.6787, + 7.9591, + 7.9019, + 7.9133, + 8.0736, + 7.9248, + 8.0221, + 8.0163, + 8.3711, + 8.3139, + 8.3597, + 8.5714, + 8.6801, + 9.0692, + 9.3553, + 9.0864, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, + 8.8174, +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF9BW0400 = { + .order = 1, + .coefficients = {1} +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF9BW0800.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF9BW0800.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF9BW0800[NUMBER_OF_FACTORS_PER_SFBW] = +{ + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + 39.6364, + -53.2896, + -35.4979, + -17.7061, + 0.085636, + 26.9106, + 18.8654, + 10.8202, + 2.775, + -5.2702, + -1.6081, + 0.5434, + 5.9908, + 3.0153, + 2.6491, + 2.4202, + 4.3657, + 4.1368, + 4.2971, + 2.8322, + 3.8393, + 3.7935, + 3.4273, + 3.3358, + 3.2442, + 2.9238, + 3.1069, + 3.0611, + 2.8322, + 2.7864, + 2.878, + 2.6949, + 2.7864, + 2.8322, + 2.8322, + 2.6033, + 2.7407, + 2.6949, + 2.6491, + 2.3287, + 2.5576, + 2.6949, + 2.5576, + 2.5576, + 3.3358, + 4.1597, + 3.9309, + 3.9309, + 4.0224, + 4.2513, + 4.2513, + 4.2513, + 4.5259, + 4.4344, + 4.6633, + 4.7548, + 4.4344, + 4.6633, + 4.9379, + 4.7548, + 4.6175, + 5.121, + 5.1668, + 5.0753, + 6.8605, + 7.0436, + 7.0436, + 7.7761, + 7.6845, + 7.6845, + 7.9134, + 7.7761, + 7.8218, + 7.9592, + 7.7761, + 7.8218, + 7.9592, + 8.0507, + 8.0049, + 7.8218, + 8.0965, + 8.1881, + 8.1881, + 8.3712, + 8.8747, + 8.9205, + 8.8289, + 8.9205, + 9.012, + 9.1494, + 9.3325, + 9.2867, + 9.5156, + 9.3782, + 9.2409, + 9.2867, + 9.424, + 9.6987, + 9.8818, + 9.7444, + 9.8818, + 10.0191, + 9.9276, + 9.9733, + 10.0649, + 10.0649, + 10.0649, + 9.9276, + 10.0649, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + 10.1564, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF9BW0800 = { + .order = 7, + .coefficients = { + 1.0871e-10, + -6.7614e-08, + 1.1233e-05, + -0.00069623, + 0.016443, + 0.72006, + 0.78863, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrectionSF9BW1600.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrectionSF9BW1600.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,181 @@ +// Generated LUT and Polynomial Values +#include "rangingCorrection_defines.h" + +const double RangingCorrectionSF9BW1600[NUMBER_OF_FACTORS_PER_SFBW] = +{ + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + -2.8555, + 2.6262, + 1.0012, + -0.074582, + 1.0241, + 2.0998, + 2.4431, + 2.3058, + 2.1685, + 2.6262, + 2.4202, + 2.4546, + 1.8938, + 2.2829, + 2.4431, + 2.672, + 2.5461, + 2.8093, + 2.6033, + 2.2371, + 2.26, + 2.0998, + 2.3287, + 2.3516, + 2.3058, + 2.466, + 2.3058, + 2.157, + 2.2142, + 2.3287, + 2.26, + 2.3287, + 2.2715, + 2.2371, + 2.2371, + 2.3745, + 2.3287, + 2.3287, + 2.26, + 2.1227, + 2.1227, + 2.1913, + 2.2829, + 2.3973, + 2.3058, + 2.1685, + 2.26, + 3.4731, + 4.1368, + 4.5946, + 4.3886, + 4.0911, + 4.2513, + 4.0911, + 4.1826, + 4.3886, + 4.0682, + 4.3657, + 4.3886, + 4.3428, + 4.6175, + 4.4802, + 4.4344, + 4.7777, + 4.915, + 5.6475, + 5.0981, + 7.3412, + 7.181, + 6.8605, + 7.2954, + 7.2954, + 7.2039, + 7.4785, + 7.9592, + 8.0049, + 7.9134, + 7.9592, + 8.0049, + 8.0049, + 8.1194, + 8.1194, + 8.2567, + 8.2338, + 8.1881, + 8.3712, + 8.3712, + 8.4169, + 8.8518, + 8.6, + 8.806, + 8.909, + 9.1951, + 9.4011, + 9.4469, + 9.424, + 9.527, + 9.4469, + 9.424, + 9.5156, + 9.3782, + 9.527, + 9.424, + 9.5156, + 9.5156, + 9.4011, + 9.5156, + 9.5156, + 9.4927, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + 9.424, + +}; + +const RangingCorrectionPolynomes_t correctionRangingPolynomeSF9BW1600 = { + .order = 7, + .coefficients = { + 6.2781e-10, + -2.6256e-07, + 3.7632e-05, + -0.0022408, + 0.05252, + 0.47936, + 0.46183, + } +}; +
diff -r d60df50e108f -r c4f110f3fe3e rangingCorrection/rangingCorrection_defines.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rangingCorrection/rangingCorrection_defines.h Thu Nov 08 10:08:44 2018 +0000 @@ -0,0 +1,15 @@ +#ifndef __RANGING_CORRECTION_DEFINES_H__ +#define __RANGING_CORRECTION_DEFINES_H__ + +#include <stdint.h> + +#define NUMBER_OF_FACTORS_PER_SFBW 160 +#define MAX_POLYNOME_ORDER 10 + +typedef struct{ + const uint8_t order; + const double coefficients[MAX_POLYNOME_ORDER]; +}RangingCorrectionPolynomes_t; + +#endif // __RANGING_CORRECTION_DEFINES_H__ +
diff -r d60df50e108f -r c4f110f3fe3e sx1280-hal.cpp --- a/sx1280-hal.cpp Wed Jul 18 08:48:34 2018 +0000 +++ b/sx1280-hal.cpp Thu Nov 08 10:08:44 2018 +0000 @@ -153,24 +153,6 @@ { RadioUart->format( 9, SerialBase::Even, 1 ); // 8 data bits + 1 even parity bit + 1 stop bit RadioUart->baud( 115200 ); - - // By default the SX1280 UART is setup to handle bytes MSB first. - // In order to setup the radio to use the UART standard way we first send - // the equivalent of a WriteRegister with reversed bit order in order to - // change the endianness. - uint8_t regVal = 0; - RadioUart->putc( 0x98 ); // Reversed opcode for read register (0x19) - RadioUart->putc( 0x10 ); // Reversed MSB register address (0x08) - RadioUart->putc( 0x18 ); // Reversed LSB register address (0x18) - RadioUart->putc( 0x80 ); // Reversed value for reading only 1 byte (0x01) - regVal = RadioUart->getc( )& 0xF3; // Read reversed value and mask it - - RadioUart->putc( 0x18 ); // Reversed opcode for read register (0x18) - RadioUart->putc( 0x10 ); // Reversed MSB register address (0x08) - RadioUart->putc( 0x18 ); // Reversed LSB register address (0x18) - RadioUart->putc( 0x80 ); // Reversed value for writing only 1 byte (0x01) - RadioUart->putc( regVal ); // The new value of the register - // After this point, the UART is running standard mode: 8 data bit, 1 even // parity bit, 1 stop bit, 115200 baud, LSB first wait_us( 10 );
diff -r d60df50e108f -r c4f110f3fe3e sx1280.cpp --- a/sx1280.cpp Wed Jul 18 08:48:34 2018 +0000 +++ b/sx1280.cpp Thu Nov 08 10:08:44 2018 +0000 @@ -694,6 +694,40 @@ } } +void SX1280::EnableManualGain( void ) +{ + this->WriteRegister( REG_ENABLE_MANUAL_GAIN_CONTROL, this->ReadRegister( REG_ENABLE_MANUAL_GAIN_CONTROL ) | MASK_MANUAL_GAIN_CONTROL ); + this->WriteRegister( REG_DEMOD_DETECTION, this->ReadRegister( REG_DEMOD_DETECTION ) & MASK_DEMOD_DETECTION ); +} + +void SX1280::DisableManualGain( void ) +{ + this->WriteRegister( REG_ENABLE_MANUAL_GAIN_CONTROL, this->ReadRegister( REG_ENABLE_MANUAL_GAIN_CONTROL ) & (~MASK_MANUAL_GAIN_CONTROL) ); + this->WriteRegister( REG_DEMOD_DETECTION, this->ReadRegister( REG_DEMOD_DETECTION ) | (~MASK_DEMOD_DETECTION) ); +} + +void SX1280::SetManualGainValue( uint8_t gain ) +{ + this->WriteRegister( REG_MANUAL_GAIN_VALUE, ( this->ReadRegister( REG_MANUAL_GAIN_VALUE ) & MASK_MANUAL_GAIN_VALUE ) | gain ); +} + +void SX1280::SetLNAGainSetting( const RadioLnaSettings_t lnaSetting ) +{ + switch(lnaSetting) + { + case LNA_HIGH_SENSITIVITY_MODE: + { + this->WriteRegister( REG_LNA_REGIME, this->ReadRegister( REG_LNA_REGIME ) | MASK_LNA_REGIME ); + break; + } + case LNA_LOW_POWER_MODE: + { + this->WriteRegister( REG_LNA_REGIME, this->ReadRegister( REG_LNA_REGIME ) & ~MASK_LNA_REGIME ); + break; + } + } +} + void SX1280::SetRangingIdLength( RadioRangingIdCheckLengths_t length ) { switch( GetPacketType( true ) ) @@ -775,6 +809,14 @@ return val; } +uint8_t SX1280::GetRangingPowerDeltaThresholdIndicator( void ) +{ + SetStandby( STDBY_XOSC ); + WriteRegister( 0x97F, ReadRegister( 0x97F ) | ( 1 << 1 ) ); // enable LoRa modem clock + WriteRegister( REG_LR_RANGINGRESULTCONFIG, ( ReadRegister( REG_LR_RANGINGRESULTCONFIG ) & MASK_RANGINGMUXSEL ) | ( ( ( ( uint8_t )RANGING_RESULT_RAW ) & 0x03 ) << 4 ) ); // Select raw results + return ReadRegister( REG_RANGING_RSSI ); +} + void SX1280::SetRangingCalibration( uint16_t cal ) { switch( GetPacketType( true ) )
diff -r d60df50e108f -r c4f110f3fe3e sx1280.h --- a/sx1280.h Wed Jul 18 08:48:34 2018 +0000 +++ b/sx1280.h Thu Nov 08 10:08:44 2018 +0000 @@ -138,6 +138,9 @@ */ #define REG_LR_RANGINGRESULTCLEARREG 0x0923 + +#define REG_RANGING_RSSI 0x0964 + /*! * \brief The default number of samples considered in built-in ranging filter */ @@ -192,7 +195,26 @@ /*! * \brief Select high sensitivity versus power consumption */ -#define REG_HIGH_SENSITIVITY 0x0891 +#define REG_LNA_REGIME 0x0891 +#define MASK_LNA_REGIME 0xC0 + +/* + * \brief Register and mask controling the enabling of manual gain control + */ +#define REG_ENABLE_MANUAL_GAIN_CONTROL 0x089F +#define MASK_MANUAL_GAIN_CONTROL 0x80 + +/*! + * \brief Register and mask controling the demodulation detection + */ +#define REG_DEMOD_DETECTION 0x0895 +#define MASK_DEMOD_DETECTION 0xFE + +/*! + * Register and mask to set the manual gain parameter + */ +#define REG_MANUAL_GAIN_VALUE 0x089E +#define MASK_MANUAL_GAIN_VALUE 0xF0 /*! * \brief Represents the states of the radio @@ -643,8 +665,8 @@ */ typedef enum { - LNA_LOW_POWER_MASK = 0x00, - LNA_HIGH_SENSITIVITY_MASK = 0xC0, + LNA_LOW_POWER_MODE, + LNA_HIGH_SENSITIVITY_MODE, }RadioLnaSettings_t; /*! @@ -1520,6 +1542,40 @@ * \param [in] seed Initial LFSR value */ void SetWhiteningSeed( uint8_t seed ); + + /*! + * \brief Enable manual gain control and disable AGC + * + * \see SX1280::SetManualGainValue, SX1280::DisableManualGain + */ + void EnableManualGain( void ); + + /*! + * \brief Disable the manual gain control and enable AGC + * + * \see SX1280::EnableManualGain + */ + void DisableManualGain( void ); + + /*! + * \brief Set the gain for the AGC + * + * SX1280::EnableManualGain must be called before using this method + * + * \param [in] gain The value of gain to set, refer to datasheet for value meaning + * + * \see SX1280::EnableManualGain, SX1280::DisableManualGain + */ + void SetManualGainValue( uint8_t gain ); + + /*! + * \brief Configure the LNA regime of operation + * + * \param [in] lnaSetting The LNA setting. Possible values are + * LNA_LOW_POWER_MODE and + * LNA_HIGH_SENSITIVITY_MODE + */ + void SetLNAGainSetting( const RadioLnaSettings_t lnaSetting ); /*! * \brief Sets the number of bits used to check that ranging request match ranging ID @@ -1555,6 +1611,18 @@ double GetRangingResult( RadioRangingResultTypes_t resultType ); /*! + * \brief Return the last ranging result power indicator + * + * The value returned is not an absolute power measurement. It is + * a relative power measurement. + * + * \retval deltaThreshold A relative power indicator + */ + uint8_t GetRangingPowerDeltaThresholdIndicator( void ); + + + + /*! * \brief Sets the standard processing delay between Master and Slave * * \param [in] cal RxTx delay offset for correcting ranging bias.