Commit pirate JS files

This commit is contained in:
2026-04-02 17:39:02 -06:00
parent 7b15a0eb9c
commit d287f8a443
49 changed files with 19149 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
/*
Copyright (c) 2023-forever Douglas Malnati. All rights reserved.
See the /faq/tos page for details.
(If this generated header is stamped on a file which is a 3rd party file or under a different license or copyright, then ignore this copyright statement and use that file's terms.)
*/
import { CandidateFilterBase } from './CandidateFilterBase.js';
import { NonRejectedOnlyFilter } from './WsprMessageCandidate.js';
///////////////////////////////////////////////////////////////////////////
// Candidate Filter - HighResLocation
//
// Reject HighResLocation messages whose Reference field is not an
// established value.
///////////////////////////////////////////////////////////////////////////
export class CandidateFilterHighResLocation
extends CandidateFilterBase
{
constructor(t)
{
super("HighResLocation", t);
}
OnFilterStart()
{
this.t.Event(`CandidateFilterHighResLocation Start`);
}
OnFilterEnd()
{
this.t.Event(`CandidateFilterHighResLocation End`);
}
FilterWindowAlgorithm(msgListList)
{
for (let slot = 0; slot < 5; ++slot)
{
for (let msg of NonRejectedOnlyFilter(msgListList[slot]))
{
if (!msg.IsTelemetryExtended())
{
continue;
}
let codec = msg.GetCodec();
if (codec.GetHdrTypeEnum() != 3)
{
continue;
}
if (slot == 0)
{
msg.Reject(this.type, `HighResLocation is not supported in Slot 0.`);
continue;
}
let referenceEnum = codec.GetReferenceEnum();
if (referenceEnum != 1)
{
msg.Reject(this.type, `HighResLocation Reference (${referenceEnum}) is not an established value.`);
}
}
}
}
}