added close plane box

Former-commit-id: 5921a6bc3009f4e26a9ce94d32e2b0a78abf64d2
This commit is contained in:
Nathan 2017-09-07 20:40:12 -05:00
parent beff2fa966
commit 0ea8b16df5
4 changed files with 21 additions and 9 deletions

View file

@ -1 +1 @@
f949a3ecfc90cfcc5b1b6fedbb8f447476e22b95
12cd0ac25a00548b5547e3652a223af0087cb1a6

View file

@ -496,9 +496,11 @@ void interactiveShowData(void) {
char cLat = ' ';
char cLon = ' ';
double d;
unsigned char * pSig = a->signalLevel;
unsigned int signalAverage = (pSig[0] + pSig[1] + pSig[2] + pSig[3] +
pSig[4] + pSig[5] + pSig[6] + pSig[7] + 3) >> 3; //up to 4 bars
pSig[4] + pSig[5] + pSig[6] + pSig[7] + 3) >> 3;
if (a->bFlags & MODES_ACFLAGS_AOG) {
snprintf(strFl, 6," grnd");
@ -525,7 +527,7 @@ void interactiveShowData(void) {
double x = dLon * M_PI / 180.0f * cos(((a->lat+41.9809263)/2.0f) * M_PI / 180.0f);
double y = dLat * M_PI / 180.0f;
double d = sqrt(x*x + y*y) * 6371.0;
d = sqrt(x*x + y*y) * 6371.0;
if(fabs(dLon) < .01 && fabs(dLat) > fabs(dLon)) {
cLon = ' ';
@ -563,16 +565,26 @@ void interactiveShowData(void) {
//formatted for terminusBold 10x20, no unicode
if(count==3) {
printf("\n%lc%lc%lc%lc",0x250C,0x2500,0x2500,0x2510);
if(d<5) {
printf("%ls",L"\n╔═════════════════════════════╗\n");
} else {
printf("\n ");
}
printf("\n \x1B[%d;31m%-8s\x1B[%d;32m%5s \x1B[%d;33m%3s \x1B[%d;34m%6s \x1B[%d;36m%c%c \x1B[%d;37m%d",
printf("\x1B[%d;31m%-8s\x1B[%d;32m%5s \x1B[%d;33m%3s \x1B[%d;34m%6s \x1B[%d;36m%c%c \x1B[%d;37m%d",
count%2, a->flight,
count%2, strFl,
count%2, strGs,
count%2, strD,
count%2, cLat, cLon,
count%2, (int)(signalAverage/255));
count%2, (int)((float)signalAverage/25.0f));
if(d<5) {
printf("%ls",L"\n╚═════════════════════════════╝");
count+=2;
}
count++;
} else {
numNoDir++;
@ -587,7 +599,7 @@ void interactiveShowData(void) {
count++;
}
printf("%c%c%c%c\x1B[30;47m\e[1m\n%+3d %c \x1B[37;40m",192,196,191,179,numNoDir,progress);
printf("\x1B[30;47m\e[1m\n%+3d %c \x1B[37;40m",numNoDir,progress);
fflush(stdout);
}
//

Binary file not shown.

View file

@ -1 +1 @@
00de1e6ebbc58ed95c008847070cdc305ec2aca4
d8b181a8be770e96fb26808f94b5e3b92ea79ca4