Add detached service windows and selectable terminal themes

Support standalone APRS, Monitor, Chat and Terminal views with courtesy screens, window focus and return controls, shared sessions and suspended embedded polling.

Add five persistent phosphor palettes, remove Console terminal idle disconnections, and display decoded Mic-E movement and altitude with expandable original packets.

Document the new behavior and add regression coverage. Validation: 182 tests passed; the known hanging PowerShell startup readiness test was excluded.
This commit is contained in:
alberto committed 2026-10-19 22:15:15 +02:00
1 parent 8ee4e9636a
commit c98c67e18b
24 files changed
+415 -22

No files matched your search

+36
View File
@@ -13,5 +13,41 @@
const col=info.index%16,row=Math.floor(info.index/16);
return '<span class="aprs-symbol-image aprs-symbol-'+info.table+' aprs-symbol-col-'+col+' aprs-symbol-row-'+row+'" aria-hidden="true">'+(info.overlay?'<span class="aprs-symbol-overlay">'+info.overlay+'</span>':'')+'</span>';
}
// APRS101 chapter 10 and aprs.org/aprs12/mic-e-types.txt.
function packetDetails(body=''){
body=String(body);const result={format:null,comment:body,speedKmh:null,course:null,altitudeM:null,device:null};
if(/^[`']/.test(body)){
result.format='Mic-E';result.comment='';
if(body.length<9||!decode({symset:body[8],symbol:body[7]}))return result;
const [sp,dc,se]=[4,5,6].map(i=>body.charCodeAt(i)-28);
if(sp>=0&&sp<=99&&dc>=0&&dc<=99&&se>=0&&se<=99){
let speed=sp*10+Math.floor(dc/10),course=(dc%10)*100+se;
if(speed>=800)speed-=800;if(course>=400)course-=400;
if(speed>=0&&speed<=799&&course>=0&&course<=360){result.speedKmh=Math.round(speed*1.852);result.course=course||null;}
}
let tail=body.slice(9),prefix=tail[0];
if(prefix==='>'||prefix===']'){
result.device=prefix==='>'?'Kenwood TH-D7':'Kenwood TM-D700';tail=tail.slice(1);
if(tail.endsWith('=')){result.device=prefix==='>'?'Kenwood TH-D72':'Kenwood TM-D710';tail=tail.slice(0,-1);}
else if(prefix==='>'&&tail.endsWith('^')){result.device='Kenwood TH-D74';tail=tail.slice(0,-1);}
}else if(prefix==='`'||prefix==="'"){
tail=tail.slice(1);
const devices={'_ ':'Yaesu VX-8','_"':'Yaesu FTM-350','_#':'Yaesu VX-8G','_$':'Yaesu FT1D','_%':'Yaesu FTM-400DR','_)':'Yaesu FTM-100D','_(':'Yaesu FT2D','_0':'Yaesu FT3D','_3':'Yaesu FT5D','_1':'Yaesu FTM-300D','(5':'AnyTone D578UV','(8':'AnyTone D878UV','|3':'Byonics TinyTrak3','|4':'Byonics TinyTrak4',':4':'SCS DR-7400',':8':'SCS DR-7800'};
const device=devices[tail.slice(-2)];if(device){result.device=device;tail=tail.slice(0,-2);}
}else if(prefix===' ')tail=tail.slice(1);
const altitude=tail.match(/^([!-{]{3})\}/);
if(altitude){result.altitudeM=[...altitude[1]].reduce((n,c)=>n*91+c.charCodeAt(0)-33,0)-10000;tail=tail.slice(4);}
result.comment=tail;
}else if(/^[!=/@]/.test(body)){
result.format='APRS';const payload=body.slice(body[0]==='@'||body[0]==='/'?8:1);
if(/^\d{4}\.\d{2}[NS].\d{5}\.\d{2}[EW]./.test(payload))result.comment=payload.slice(19);
else if(/^[/\A-Z0-9][!-{]{8}[!-~][!-{]{3}/.test(payload))result.comment=payload.slice(13);
else result.comment='';
}else if(body.startsWith('>'))result.comment=body.slice(1).replace(/^\d{6}[zh/]/,'');
// Control bytes belong to the encoded frame, never the operator's description.
result.comment=result.comment.replace(/[\x00-\x1f\x7f-\x9f]/g,' ').trim();return result;
}
window.BPQAprsPacket={decode:packetDetails};
window.BPQAprsSymbols={decode,html};
})();