#2512 NXDN Call and GPS events not aliasing correctly (#2513)

Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
Denny Sheirer
2026-10-24 05:04:12 -04:00
committed by GitHub
parent b0428a1d8b
commit c8b1c8ed3a
3 changed files with 61 additions and 10 deletions

View File

@@ -723,7 +723,7 @@ public class NXDNDecoderState extends DecoderState
if(message instanceof GPS gps)
{
PlottableDecodeEvent plottableEvent = PlottableDecodeEvent.plottableBuilder(DecodeEventType.GPS, gps.getTimestamp())
.identifiers(new IdentifierCollection(message.getPacketSequence().getHeader().getIdentifiers()))
.identifiers(getMutableIdentifierCollection(message.getPacketSequence().getHeader().getIdentifiers()))
.channel(getCurrentChannel())
.details(gps.getLocationFormatted() + " HDG: " + gps.getHeading() + " SPD:" + gps.getSpeed() +
" ELE:" + gps.getElevation())

View File

@@ -20,6 +20,7 @@
package io.github.dsheirer.module.decode.nxdn;
import io.github.dsheirer.channel.IChannelDescriptor;
import io.github.dsheirer.channel.state.SingleChannelState;
import io.github.dsheirer.controller.channel.Channel;
import io.github.dsheirer.controller.channel.ChannelEvent;
import io.github.dsheirer.controller.channel.IChannelEventListener;
@@ -92,6 +93,7 @@ public class NXDNTrafficChannelManager extends TrafficChannelManager implements
private ChannelAccessInformation mChannelAccessInformation;
private boolean mIgnoreDataCalls;
private boolean mIgnoreEncryptedCalls;
private List<Identifier<?>> mChannelIdentifiers;
/**
* Constructs an instance
@@ -109,6 +111,34 @@ public class NXDNTrafficChannelManager extends TrafficChannelManager implements
mChannelFrequencies.addAll(configNXDN.getChannelMap());
createTrafficChannels(configNXDN);
}
mChannelIdentifiers = SingleChannelState.createChannelIdentifiers(parentChannel);
}
/**
* Creates a new list of identifiers containing the channel metadata identifiers and the provided identifiers.
* @param identifiers to merge with the channel identifiers
* @return new list of identifiers.
*/
private List<Identifier> getMergedIdentifiers(List<Identifier> identifiers)
{
List<Identifier> merged = new ArrayList<>();
merged.addAll(identifiers);
merged.addAll(mChannelIdentifiers);
return merged;
}
/**
* Creates a new mutable identifier collection with the identifiers and the channel identifiers
* @param identifiers for initial fill of the collection
* @return mutable identifier collection
*/
private MutableIdentifierCollection getMergedIdentifierCollection(List<Identifier> identifiers)
{
List<Identifier> merged = getMergedIdentifiers(identifiers);
MutableIdentifierCollection mic = new MutableIdentifierCollection();
mic.update(merged);
return new MutableIdentifierCollection(merged);
}
/**
@@ -303,7 +333,7 @@ public class NXDNTrafficChannelManager extends TrafficChannelManager implements
try
{
NXDNChannelEventTracker tracker = getTrackerRemoveIfStale(channel.getDownlinkFrequency(), timestamp);
MutableIdentifierCollection ic = new MutableIdentifierCollection(identifiers);
MutableIdentifierCollection ic = getMergedIdentifierCollection(identifiers);
if(tracker != null)
{
if(tracker.isSameCallCheckingToAndFrom(ic, timestamp))
@@ -506,7 +536,7 @@ public class NXDNTrafficChannelManager extends TrafficChannelManager implements
try
{
NXDNChannelEventTracker tracker = getTrackerRemoveIfStale(frequency, timestamp);
MutableIdentifierCollection ic = new MutableIdentifierCollection(identifiers);
MutableIdentifierCollection ic = getMergedIdentifierCollection(identifiers);
mTalkerAliasManager.enrich(ic);
if(tracker != null)
{