some APRS for wettersonde.net support

pull/249/head
Hansi, dl9rdz 2021-10-30 17:14:42 +02:00
rodzic beea3a7047
commit 327bbca6e6
6 zmienionych plików z 15 dodań i 10 usunięć

Wyświetl plik

@ -646,7 +646,8 @@ struct st_configitems config_list[] = {
{"tcp.port", 0, &sonde.config.tcpfeed.port},
{"tcp.chase", 0, &sonde.config.chase},
{"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},
#if FEATURE_CHASEMAPPER
/* Chasemapper settings */
@ -2302,7 +2303,7 @@ void loopDecoder() {
// first check if ID and position lat+lonis ok
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) {
char raw[201];
int rawlen = aprsstr_mon2raw(str, raw, APRS_MAXLEN);
@ -3232,9 +3233,9 @@ void aprs_station_update() {
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;
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()) {
tcpclient.connect(sonde.config.tcpfeed.host, sonde.config.tcpfeed.port);
}

Wyświetl plik

@ -43,7 +43,8 @@ var cfgs = [
[ "tcp.host", "APRS TCP host"],
[ "tcp.port", "APRS TCP port"],
[ "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.comment", "APRS location comment"],
[ "", "MQTT data feed configuration", "https://github.com/dl9rdz/rdz_ttgo_sonde/wiki/MQTT-configuration"],

Wyświetl plik

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

Wyświetl plik

@ -284,7 +284,8 @@ typedef struct st_rdzconfig {
char call[10]; // APRS callsign
int passcode; // APRS passcode
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];
struct st_feedinfo udpfeed; // target for AXUDP messages
struct st_feedinfo tcpfeed; // target for APRS-IS TCP connections

Wyświetl plik

@ -290,13 +290,14 @@ char *aprs_send_beacon(const char *usercall, float lat, float lon, const char *s
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);
*b=0;
aprsstr_append(b, usercall);
aprsstr_append(b, *objcall ? objcall : usercall);
aprsstr_append(b, ">");
// const char *destcall="APRARX,SONDEGATE,TCPIP,qAR,oh3bsg";
aprsstr_append(b, destcall);
if(*objcall) aprsstr_append(b, usercall);
// uncompressed
aprsstr_append(b, ":;");
char tmp[10];

Wyświetl plik

@ -9,7 +9,7 @@ void aprs_gencrctab(void);
int aprsstr_mon2raw(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_senddata(SondeInfo *s, const char *usercall, const char *sym);
char *aprs_senddata(SondeInfo *s, const char *usercall, const char *objcall, const char *sym);
#endif