dao extension, aprs symbol
This commit is contained in:
parent
cd30b6ce94
commit
63abbe9a2c
|
|
@ -339,6 +339,7 @@ static void posrs41(const byte b[], uint32_t b_len, uint32_t p)
|
|||
long0)+vz*(double)sin((float)lat);
|
||||
dir = X2C_DIVL(atang2(vn, ve),1.7453292519943E-2);
|
||||
if (dir<0.0) dir = 360.0+dir;
|
||||
sonde.si()->dir = dir;
|
||||
Serial.print(" ");
|
||||
sonde.si()->hs = sqrt((float)(vn*vn+ve*ve))*3.6f;
|
||||
Serial.print(sonde.si()->hs);
|
||||
|
|
|
|||
|
|
@ -54,12 +54,14 @@ Sonde::Sonde() {
|
|||
config.udpfeed.active = 1;
|
||||
config.udpfeed.type = 0;
|
||||
strcpy(config.udpfeed.host, "192.168.42.20");
|
||||
strcpy(config.udpfeed.symbol, "/O");
|
||||
config.udpfeed.port = 9002;
|
||||
config.udpfeed.highrate = 1;
|
||||
config.udpfeed.idformat = ID_DFMGRAW;
|
||||
config.tcpfeed.active = 0;
|
||||
config.tcpfeed.type = 1;
|
||||
strcpy(config.tcpfeed.host, "radiosondy.info");
|
||||
strcpy(config.tcpfeed.symbol, "/O");
|
||||
config.tcpfeed.port = 12345;
|
||||
config.tcpfeed.highrate = 10;
|
||||
config.tcpfeed.idformat = ID_DFMDXL;
|
||||
|
|
|
|||
|
|
@ -211,6 +211,43 @@ extern int aprsstr_mon2raw(const char *mon, char raw[], int raw_len)
|
|||
#define FEET (1.0/0.3048)
|
||||
#define KNOTS (1.851984)
|
||||
|
||||
#define X2C_max_longcard 0xFFFFFFFFUL
|
||||
static uint32_t X2C_TRUNCC(double x, uint32_t min0, uint32_t max0)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
if (x < (double)min0)
|
||||
i = (uint32_t)min0;
|
||||
if (x > (double)max0)
|
||||
i = (uint32_t)max0;
|
||||
|
||||
i = (uint32_t)x;
|
||||
if ((double)i > x)
|
||||
--i;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
static uint32_t truncc(double r)
|
||||
{
|
||||
if (r<=0.0) return 0UL;
|
||||
else if (r>=2.E+9) return 2000000000UL;
|
||||
else return (uint32_t)X2C_TRUNCC(r,0UL,X2C_max_longcard);
|
||||
return 0;
|
||||
} /* end truncc() */
|
||||
|
||||
|
||||
|
||||
static uint32_t dao91(double x)
|
||||
/* radix91(xx/1.1) of dddmm.mmxx */
|
||||
{
|
||||
double a;
|
||||
a = fabs(x);
|
||||
return ((truncc((a-(double)(float)truncc(a))*6.E+5)%100UL)
|
||||
*20UL+11UL)/22UL;
|
||||
} /* end dao91() */
|
||||
|
||||
|
||||
char b[201];
|
||||
char raw[201];
|
||||
|
||||
|
|
@ -248,7 +285,7 @@ char * aprs_senddata(float lat, float lon, float hei, float speed, float dir, fl
|
|||
i=strlen(b);
|
||||
snprintf(b+i, APRS_MAXLEN-i, "/A=%06d", realcard(hei*FEET+0.5));
|
||||
}
|
||||
#if 0
|
||||
#if 1
|
||||
int dao=1;
|
||||
if(dao) {
|
||||
i=strlen(b);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ typedef struct st_feedinfo {
|
|||
int type; // 0:UDP(axudp), 1:TCP(aprs.fi)
|
||||
char host[64];
|
||||
int port;
|
||||
char symbol[3];
|
||||
int lowrate;
|
||||
int highrate;
|
||||
int lowlimit;
|
||||
|
|
|
|||
Loading…
Reference in New Issue