some APRS for wettersonde.net support

This commit is contained in:
Hansi, dl9rdz 2021-10-30 17:14:42 +02:00
parent beea3a7047
commit 327bbca6e6
6 changed files with 15 additions and 10 deletions

View File

@ -646,7 +646,8 @@ struct st_configitems config_list[] = {
{"tcp.port", 0, &sonde.config.tcpfeed.port}, {"tcp.port", 0, &sonde.config.tcpfeed.port},
{"tcp.chase", 0, &sonde.config.chase}, {"tcp.chase", 0, &sonde.config.chase},
{"tcp.comment", 30, sonde.config.comment}, {"tcp.comment", 30, sonde.config.comment},
{"tcp.bcall", 9, sonde.config.bcall}, {"tcp.objcall", 9, sonde.config.objcall},
{"tcp.beaconsym", 4, sonde.config.beaconsym},
{"tcp.highrate", 0, &sonde.config.tcpfeed.highrate}, {"tcp.highrate", 0, &sonde.config.tcpfeed.highrate},
#if FEATURE_CHASEMAPPER #if FEATURE_CHASEMAPPER
/* Chasemapper settings */ /* Chasemapper settings */
@ -2302,7 +2303,7 @@ void loopDecoder() {
// first check if ID and position lat+lonis ok // first check if ID and position lat+lonis ok
if (s->d.validID && ((s->d.validPos & 0x03) == 0x03)) { if (s->d.validID && ((s->d.validPos & 0x03) == 0x03)) {
char *str = aprs_senddata(s, sonde.config.call, sonde.config.udpfeed.symbol); char *str = aprs_senddata(s, sonde.config.call, sonde.config.objcall, sonde.config.udpfeed.symbol);
if (connected) { if (connected) {
char raw[201]; char raw[201];
int rawlen = aprsstr_mon2raw(str, raw, APRS_MAXLEN); int rawlen = aprsstr_mon2raw(str, raw, APRS_MAXLEN);
@ -3232,9 +3233,9 @@ void aprs_station_update() {
return; return;
} }
} }
Serial.printf("Really updating!! (bcall is %s)", sonde.config.bcall); Serial.printf("Really updating!! (objcall is %s)", sonde.config.objcall);
time_last_aprs_update = time_now; time_last_aprs_update = time_now;
char *bcn = aprs_send_beacon(sonde.config.bcall, lat, lon, "/O"); char *bcn = aprs_send_beacon(sonde.config.call, lat, lon, sonde.config.beaconsym + ((chase==SH_LOC_CHASE)?2:0));
if ( tcpclient.disconnected()) { if ( tcpclient.disconnected()) {
tcpclient.connect(sonde.config.tcpfeed.host, sonde.config.tcpfeed.port); tcpclient.connect(sonde.config.tcpfeed.host, sonde.config.tcpfeed.port);
} }

View File

@ -43,7 +43,8 @@ var cfgs = [
[ "tcp.host", "APRS TCP host"], [ "tcp.host", "APRS TCP host"],
[ "tcp.port", "APRS TCP port"], [ "tcp.port", "APRS TCP port"],
[ "tcp.highrate", "Rate limit"], [ "tcp.highrate", "Rate limit"],
[ "tcp.bcall", "APRS location beacon call"], [ "tcp.objcall", "APRS object call"],
[ "tcp.beaconsym", "APRS tracker symbol"],
[ "tcp.chase", "APRS location reporting (0=off, 1=fixed, 2=chase/GPS, 3=auto)"], [ "tcp.chase", "APRS location reporting (0=off, 1=fixed, 2=chase/GPS, 3=auto)"],
[ "tcp.comment", "APRS location comment"], [ "tcp.comment", "APRS location comment"],
[ "", "MQTT data feed configuration", "https://github.com/dl9rdz/rdz_ttgo_sonde/wiki/MQTT-configuration"], [ "", "MQTT data feed configuration", "https://github.com/dl9rdz/rdz_ttgo_sonde/wiki/MQTT-configuration"],

View File

@ -107,7 +107,8 @@ tcp.symbol=/O
tcp.highrate=20 tcp.highrate=20
# send beacon (possibly with different call or SSID) # send beacon (possibly with different call or SSID)
tcp.chase=0 tcp.chase=0
tcp.bcall= tcp.objcall=
tcp.beaconsym=/`/(
tcp.comment= tcp.comment=
#-------------------------------# #-------------------------------#
# mqtt settings # mqtt settings

View File

@ -284,7 +284,8 @@ typedef struct st_rdzconfig {
char call[10]; // APRS callsign char call[10]; // APRS callsign
int passcode; // APRS passcode int passcode; // APRS passcode
int chase; int chase;
char bcall[10]; // APRS position beacon call char objcall[10]; // APRS object call (for wettersonde.net)
char beaconsym[5]; // APRS beacon symbol
char comment[32]; char comment[32];
struct st_feedinfo udpfeed; // target for AXUDP messages struct st_feedinfo udpfeed; // target for AXUDP messages
struct st_feedinfo tcpfeed; // target for APRS-IS TCP connections struct st_feedinfo tcpfeed; // target for APRS-IS TCP connections

View File

@ -290,13 +290,14 @@ char *aprs_send_beacon(const char *usercall, float lat, float lon, const char *s
return b; return b;
} }
char *aprs_senddata(SondeInfo *si, const char *usercall, const char *sym) { char *aprs_senddata(SondeInfo *si, const char *usercall, const char *objcall, const char *sym) {
SondeData *s = &(si->d); SondeData *s = &(si->d);
*b=0; *b=0;
aprsstr_append(b, usercall); aprsstr_append(b, *objcall ? objcall : usercall);
aprsstr_append(b, ">"); aprsstr_append(b, ">");
// const char *destcall="APRARX,SONDEGATE,TCPIP,qAR,oh3bsg"; // const char *destcall="APRARX,SONDEGATE,TCPIP,qAR,oh3bsg";
aprsstr_append(b, destcall); aprsstr_append(b, destcall);
if(*objcall) aprsstr_append(b, usercall);
// uncompressed // uncompressed
aprsstr_append(b, ":;"); aprsstr_append(b, ":;");
char tmp[10]; char tmp[10];

View File

@ -9,7 +9,7 @@ void aprs_gencrctab(void);
int aprsstr_mon2raw(const char *mon, char raw[], int raw_len); int aprsstr_mon2raw(const char *mon, char raw[], int raw_len);
int aprsstr_mon2kiss(const char *mon, char raw[], int raw_len); int aprsstr_mon2kiss(const char *mon, char raw[], int raw_len);
char *aprs_send_beacon(const char *call, float lat, float lon, const char *sym); char *aprs_send_beacon(const char *call, float lat, float lon, const char *sym);
char *aprs_senddata(SondeInfo *s, const char *usercall, const char *sym); char *aprs_senddata(SondeInfo *s, const char *usercall, const char *objcall, const char *sym);
#endif #endif