Skip to content

Commit

Permalink
further advance of Remote ID feature
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Oct 30, 2023
1 parent 96eed89 commit ae35213
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 89 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ Data|FLARM NMEA|<p align="center">![](https://github.com/lyusupov/SoftRF/raw/mas
Model(s)|Platform|First appearance|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Notes
---|:---:|:---:|:---:|---
1&nbsp;[Prime](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition)<br>2&nbsp;[Standalone](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)<br>3&nbsp;[UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)<br>4&nbsp;[**WebTop&nbsp;Serial**](https://github.com/lyusupov/SoftRF/wiki/WebTop-Serial-adapter)|[Espressif<br>ESP8266](https://en.wikipedia.org/wiki/ESP8266)|Q4 2015|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)<!-- ![](https://via.placeholder.com/140x70/00A000/000000?text=Good) -->|[Prime](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition) model is no longer supported - use [Prime MkII](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII) instead.<br><!-- ESP8266 platform will be phased out through year 2020 in favour of ESP32.-->
1&nbsp;[**Prime Mark II**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII)<br>2&nbsp;[**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition) + [adapter](https://github.com/lyusupov/ESP32-NODEMCU-ADAPTER)<br>3&nbsp;[UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)<br>4&nbsp;[**SkyView EZ**](https://github.com/lyusupov/SoftRF/wiki/SkyView-EZ)<br>5&nbsp;[Flight Recorder](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder)|[Espressif<br>ESP32](https://en.wikipedia.org/wiki/ESP32)|Q1 2018|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|1&nbsp;today's best platform ;<br>2&nbsp;holds [**FCC** mark](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII#certificates)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
1&nbsp;[**Prime Mark II**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII)<br>2&nbsp;[**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition) + [adapter](https://github.com/lyusupov/ESP32-NODEMCU-ADAPTER)<br>3&nbsp;[UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)<br>4&nbsp;[**SkyView EZ**](https://github.com/lyusupov/SoftRF/wiki/SkyView-EZ)<br>5&nbsp;[Flight Recorder](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder)|[Espressif<br>ESP32](https://en.wikipedia.org/wiki/ESP32)|Q1 2018|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|1&nbsp;today's best platform ;<br>2&nbsp;holds [**FCC** mark](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII#certificates)
1&nbsp;[**Raspberry Edition**](https://github.com/lyusupov/SoftRF/wiki/Raspberry-Edition)<br>2&nbsp;[**SkyView Pi**](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pi)|[Broadcom<br>BCM283X<br>(Raspberry Pi)](https://en.wikipedia.org/wiki/Raspberry_Pi)|Q4 2018|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|Good for use together with RTL-SDR dongles to achieve additional 1090ES (and 978UAT) ADS-B air traffic reception.
[UAT module](https://github.com/lyusupov/UAT-test-signal#variant-2-advanced)|[Texas Instruments<br>CC1310](http://www.ti.com/product/CC1310)|Q1 2019|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)<!-- ![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress) -->|Unique RF radio specs are useful for [UAT978 **ADS-B** reception](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/source/UATbridge) [ [1](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-7.jpg) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-8.jpg) , [3](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-6.jpg) ]
1&nbsp;[Retro](https://github.com/lyusupov/SoftRF/wiki/Retro-Edition)<br>2&nbsp;[**Dongle**](https://github.com/lyusupov/SoftRF/wiki/Dongle-Edition)<br>3&nbsp;[**Bracelet**](https://github.com/lyusupov/SoftRF/wiki/Bracelet-Edition)|[STMicroelectronics](https://en.wikipedia.org/wiki/STMicroelectronics)<br>[STM32**F103**](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) and<br>[STM32**L073**](https://www.st.com/en/microcontrollers-microprocessors/stm32l073rz.html)|Q3 2019|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)<!-- ![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress)-->|<!-- [AcSiP **S76G**](http://www.acsip.com.tw/index.php?action=products-detail&fid1=19&fid2=&fid3=&id=41&lang=3) "3-in-1" system-in-package is doing good [ [1](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/watch-1.jpg) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/t-motion-4.jpg) , [3](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/t-motion-5.jpg) ] .<br>As well as STM32F103C8 "**Blue Pill**" (same MCU that [STM32 OGN tracker](http://wiki.glidernet.org/stm32-ogn-tracker) uses) [ [4](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/stm32_breadboard.jpg) , [5](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/stm32_ognweb_1.JPG) ] . -->
[**Uni**](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition)|[Texas Instruments<br>CC13x2R](http://www.ti.com/product/CC1352R)|Q2 2020|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)<!-- ![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress) -->|1&nbsp;Unique RF radio specs are useful for UAT978 **ADS-B** reception ; <br>2&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition#certificates)
[**Mini**](https://github.com/lyusupov/SoftRF/wiki/Mini-Edition)|[Cypress<br>PSoC 4100**S**](https://en.wikipedia.org/wiki/Cypress_PSoC)|Q3 2020|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)<!-- ![](https://via.placeholder.com/140x40/c5f015/000000?text=May+need)<br>![](https://via.placeholder.com/140x40/c5f015/000000?text=improvements) -->|1&nbsp;good add-on candidate for modded Kobo e-Readers ;<br>2&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Mini-Edition#certificates)
[**Badge**](https://github.com/lyusupov/SoftRF/wiki/Badge-Edition)|[Nordic Semiconductor<br>nRF52840](https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF52840)|Q4 2020|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Badge-Edition#certificates)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
[**Badge**](https://github.com/lyusupov/SoftRF/wiki/Badge-Edition)|[Nordic Semiconductor<br>nRF52840](https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF52840)|Q4 2020|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Badge-Edition#certificates)
[**ES**](https://github.com/lyusupov/SoftRF/wiki/ES-Edition)|[NXP Semiconductors<br>LPC4320](https://en.wikipedia.org/wiki/NXP_LPC#LPC4000_series)|Q2 2021|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|Unique RF radio specs are useful for 1090ES **ADS-B** reception [ [1](https://user-images.githubusercontent.com/5849637/140610617-7c74582e-b0d7-4610-8ac2-d51f55c9086d.png) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/ES-1.jpg) ]
1&nbsp;[**Academy**](https://github.com/lyusupov/SoftRF/wiki/Academy-Edition)<br>2&nbsp;[USB2BT](https://github.com/lyusupov/SoftRF/wiki/USB-to-Bluetooth-adapter)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Microchip&nbsp;(Atmel)<br>SAM&nbsp;D21](https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/32-bit-mcus/sam-32-bit-mcus/sam-d) <!-- and [ATmega2560](https://www.microchip.com/en-us/product/ATmega2560) -->|Q4 2021|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png) <!-- ![](https://via.placeholder.com/140x40/c5f015/000000?text=May+need)<br>![](https://via.placeholder.com/140x40/c5f015/000000?text=improvements) -->|good for teaching students of air traffic proximity awareness
1&nbsp;[**Academy**](https://github.com/lyusupov/SoftRF/wiki/Academy-Edition)<br>2&nbsp;[USB2BT](https://github.com/lyusupov/SoftRF/wiki/USB-to-Bluetooth-adapter)|[Microchip&nbsp;(Atmel)<br>SAM&nbsp;D21](https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/32-bit-mcus/sam-32-bit-mcus/sam-d) <!-- and [ATmega2560](https://www.microchip.com/en-us/product/ATmega2560) -->|Q4 2021|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png) <!-- ![](https://via.placeholder.com/140x40/c5f015/000000?text=May+need)<br>![](https://via.placeholder.com/140x40/c5f015/000000?text=improvements) -->|good for teaching students of air traffic proximity awareness
[**Octave**](https://github.com/lyusupov/SoftRF/wiki/Octave-Concept)|[ASR Microelectronics<br>ASR6601](https://asriot.readthedocs.io/en/latest/ASR6601/index.html)|Q1 2022|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)| **the best 'price per radio protocol' ratio** on the market
1&nbsp;[**Lego**](https://github.com/lyusupov/SoftRF/wiki/Lego-Edition)<br>2&nbsp;[**SkyView Pico**](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pico)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Raspberry Pi<br>Foundation<br>**RP2040**](https://en.wikipedia.org/wiki/RP2040)|Q1 2022|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Lego-Edition#certificates)
[**Balkan**](https://github.com/lyusupov/SoftRF/wiki/Balkan-Edition)|[STMicroelectronics](https://en.wikipedia.org/wiki/STMicroelectronics)<br>[STM32**WLE5**](https://www.st.com/en/microcontrollers-microprocessors/stm32wle5cc.html)|Q3 2022|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|&nbsp;holds [**CE** mark](https://github.com/lyusupov/SoftRF/wiki/Balkan-Edition#certificates)
[**WebTop USB**](https://github.com/lyusupov/SoftRF/wiki/WebTop-USB)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif<br>ESP32-S2](https://en.wikipedia.org/wiki/ESP32#ESP32-S2)|Q4 2022|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|
[**WebTop USB**](https://github.com/lyusupov/SoftRF/wiki/WebTop-USB)|[Espressif<br>ESP32-S2](https://en.wikipedia.org/wiki/ESP32#ESP32-S2)|Q4 2022|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|
[**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition)&nbsp;**upgrade**![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif<br>ESP32-C3](https://en.wikipedia.org/wiki/ESP32#ESP32-C3)|Q1 2023|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|[RISC-V](https://en.wikipedia.org/wiki/RISC-V)
1&nbsp;[**Prime Mark III**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkIII)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)<br>2&nbsp;[**SkyView Pico**](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pico#alternative-hardware-option)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)<br>3&nbsp;[**Ham**](https://github.com/lyusupov/SoftRF/wiki/Ham-Edition)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)<br>4&nbsp;[**Midi**](https://github.com/lyusupov/SoftRF/wiki/Midi-Edition)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif<br>ESP32-S3](https://en.wikipedia.org/wiki/ESP32#ESP32-S3)|Q1 2023|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|

Expand Down Expand Up @@ -192,7 +192,7 @@ Generic<br>NMEA|[Standalone](https://github.com/lyusupov/SoftRF/wiki/Standalone-
* [Dual boot](https://github.com/lyusupov/SoftRF/wiki/SkyView.-Dual-boot)
* [Pi](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pi)

* [WebTop USB](https://github.com/lyusupov/SoftRF/wiki/WebTop-USB)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
* [WebTop USB](https://github.com/lyusupov/SoftRF/wiki/WebTop-USB)
* [WebTop Serial](https://github.com/lyusupov/SoftRF/wiki/WebTop-Serial-adapter)
* [Quick start](https://github.com/lyusupov/SoftRF/wiki/WebTop-Serial.-Quick-Start)
* [Flight Recorder](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder)
Expand Down
38 changes: 8 additions & 30 deletions software/firmware/source/SoftRF/src/driver/Bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,6 @@ void startAdv(void)
bool no_data = (settings->nmea_out != NMEA_BLUETOOTH &&
settings->gdl90 != GDL90_BLUETOOTH &&
settings->d1090 != D1090_BLUETOOTH);
bool odid = false /* true */;

// Advertising packet

Expand All @@ -1350,7 +1349,7 @@ void startAdv(void)
Bluefruit.Advertising.addTxPower();

#if defined(ENABLE_REMOTE_ID)
if (odid) {
if (rid_enabled()) {
Bluefruit.Advertising.addService(BLE_ODID_service);
Bluefruit.Advertising.addName();
} else
Expand All @@ -1371,7 +1370,7 @@ void startAdv(void)

// Secondary Scan Response packet (optional)
// Since there is no room for 'Name' in Advertising packet
if (!odid) {
if (!rid_enabled()) {
Bluefruit.ScanResponse.addName();
}

Expand Down Expand Up @@ -1465,8 +1464,10 @@ void nRF52_Bluetooth_setup()
blebas.write(100);

#if defined(ENABLE_REMOTE_ID)
BLE_ODID_service.setUuid(BLEUuid(ODID_Uuid /* UUID16_COMPANY_ID_ASTM */));
BLE_ODID_service.begin();
if (rid_enabled()) {
BLE_ODID_service.setUuid(BLEUuid(ODID_Uuid /* UUID16_COMPANY_ID_ASTM */));
BLE_ODID_service.begin();
}
#endif /* ENABLE_REMOTE_ID */

// Start SensBox Service
Expand All @@ -1490,30 +1491,7 @@ void nRF52_Bluetooth_setup()
BLE_SensBox_TimeMarker = millis();

#if defined(ENABLE_REMOTE_ID)
memset(&utm_parameters,0,sizeof(utm_parameters));

#if 0
strcpy(utm_parameters.UAS_operator,"GBR-OP-1234ABCDEFGH");
#elif defined(ARDUINO_ARCH_ESP32)
strcpy(utm_parameters.UAS_operator,"GBR-OP-ESP32");
#elif defined(ARDUINO_ARCH_ESP8266)
strcpy(utm_parameters.UAS_operator,"GBR-OP-ESP8266");
#elif defined(ARDUINO_ARCH_RP2040)
strcpy(utm_parameters.UAS_operator,"GBR-OP-PICOW");
#else
strcpy(utm_parameters.UAS_operator,"GBR-OP-UNKNOWN");
#endif

utm_parameters.region = 1;
utm_parameters.EU_category = 1;
utm_parameters.EU_class = 5;

squitter.init(&utm_parameters);

memset(&utm_data,0,sizeof(utm_data));

utm_data.satellites = 8;

rid_init();
RID_Time_Marker = millis();
#endif /* ENABLE_REMOTE_ID */
}
Expand Down Expand Up @@ -1548,7 +1526,7 @@ static void nRF52_Bluetooth_loop()
}

#if defined(ENABLE_REMOTE_ID)
if (isValidFix()) {
if (rid_enabled() && isValidFix()) {
if ((millis() - RID_Time_Marker) > (RID_TX_INTERVAL_MIN + RID_TX_INTERVAL_MAX)/2) {
rid_encode((void *) &utm_data, &ThisAircraft);
squitter.transmit(&utm_data);
Expand Down
27 changes: 2 additions & 25 deletions software/firmware/source/SoftRF/src/driver/WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,30 +193,7 @@ void WiFi_setup()
#endif

#if defined(ENABLE_REMOTE_ID)
memset(&utm_parameters,0,sizeof(utm_parameters));

#if 0
strcpy(utm_parameters.UAS_operator,"GBR-OP-1234ABCDEFGH");
#elif defined(ARDUINO_ARCH_ESP32)
strcpy(utm_parameters.UAS_operator,"GBR-OP-ESP32");
#elif defined(ARDUINO_ARCH_ESP8266)
strcpy(utm_parameters.UAS_operator,"GBR-OP-ESP8266");
#elif defined(ARDUINO_ARCH_RP2040)
strcpy(utm_parameters.UAS_operator,"GBR-OP-PICOW");
#else
strcpy(utm_parameters.UAS_operator,"GBR-OP-UNKNOWN");
#endif

utm_parameters.region = 1;
utm_parameters.EU_category = 1;
utm_parameters.EU_class = 5;

squitter.init(&utm_parameters);

memset(&utm_data,0,sizeof(utm_data));

utm_data.satellites = 8;

rid_init();
RID_Time_Marker = millis();
#endif /* ENABLE_REMOTE_ID */
}
Expand Down Expand Up @@ -248,7 +225,7 @@ void WiFi_loop()
#endif

#if defined(ENABLE_REMOTE_ID)
if (WiFi.getMode() == WIFI_AP && isValidFix()) {
if (rid_enabled() && WiFi.getMode() == WIFI_AP && isValidFix()) {
if ((millis() - RID_Time_Marker) > (RID_TX_INTERVAL_MIN + RID_TX_INTERVAL_MAX)/2) {
rid_encode((void *) &utm_data, &ThisAircraft);
squitter.transmit(&utm_data);
Expand Down
Loading

0 comments on commit ae35213

Please sign in to comment.