public class AlohaTracker extends java.lang.Object implements TrackerListener, GpsDataListener
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ALOHA_1200_CAPACITY
Maximum number of typical APRS packets that can be transmitted at 1200 baud over a 30-minute period.
|
Modifier and Type | Method and Description |
---|---|
AlohaRanger[] |
getAlohaRanges()
Get the currently computed Aloha ranges for this station.
|
static AlohaTracker |
getInstance()
Get a reference to the singleton AlohaTracker.
|
double |
getLastLatitude()
Get the center latitude of the computed Aloha ranges.
|
double |
getLastLongitude()
Get the center longitude of the computed Aloha ranges.
|
void |
gpsDataUpdated(GPSDistributor distributor,
GpsFix currentFix,
boolean isLocal,
java.lang.String source)
Called by the GPSDistributor when the GPS data has been updated.
|
static boolean |
isDoAlohaForAprsIs()
Report whether APRS-IS stations will be computed into an aloha circle.
|
void |
messageAdded(StationState ss,
int index,
AX25Message msg)
Called when a AX25Message is added to the history for a station in the tracker.
|
void |
messageDeleted(StationState ss,
int index,
AX25Message msg)
Called when a AX25Message is deleted from the history for a station in the tracker.
|
void |
satDataUpdated(GPSDistributor distributor,
SatelliteCatalog satCatalog,
boolean isLocal,
java.lang.String source)
Called when the satellite constellation in use changes.
|
static void |
setDoAlohaForAprsIs(boolean doAlohaForAprsIs)
Specify whether APRS-IS stations will be computed into an aloha circle.
|
void |
stationAdded(StationState ss,
int index)
Called when a new station is initially added to the tracker.
|
void |
stationDeleted(StationState ss,
int index)
Called when an existing station is deleted from the tracker.
|
void |
stationUpdated(StationState ss)
Called when an existing station is updated with new information in the tracker.
|
public static final int MAX_ALOHA_1200_CAPACITY
public static AlohaTracker getInstance()
public AlohaRanger[] getAlohaRanges()
getLastLatitude()
,
getLastLongitude()
public double getLastLatitude()
getAlohaRanges()
public double getLastLongitude()
getAlohaRanges()
public static boolean isDoAlohaForAprsIs()
public static void setDoAlohaForAprsIs(boolean doAlohaForAprsIs)
doAlohaForAprsIs
- boolean true if an aloha circle should be computed for Internet portspublic void gpsDataUpdated(GPSDistributor distributor, GpsFix currentFix, boolean isLocal, java.lang.String source)
gpsDataUpdated
in interface GpsDataListener
distributor
- instance of the GPSDistributorcurrentFix
- current position data reported by the local GPSisLocal
- boolean true if this is GPS data for the local station, false if for a remote GPS receiversource
- String name assigned to remote GPS receiver, or null if for the local receiverpublic void satDataUpdated(GPSDistributor distributor, SatelliteCatalog satCatalog, boolean isLocal, java.lang.String source)
satDataUpdated
in interface GpsDataListener
distributor
- instance of the GPSDistributorsatCatalog
- updated SatelliteCatalog instanceisLocal
- boolean true if this is GPS data for the local station, false if for a remote GPS receiversource
- String name assigned to remote GPS receiver, or null if for the local receiverpublic void stationAdded(StationState ss, int index)
stationAdded
in interface TrackerListener
ss
- StationState containing the station's information; the initial AX25Message
will not yet be stored within the StationState objectindex
- zero-based integer sequence number for this station in the StationTrackerpublic void stationUpdated(StationState ss)
stationUpdated
in interface TrackerListener
ss
- StationState containing the station's information; the new AX25Message
will not yet be stored within the StationState objectpublic void stationDeleted(StationState ss, int index)
stationDeleted
in interface TrackerListener
ss
- StationState containing the station's informationindex
- zero-based integer sequence number for this station in the StationTrackerpublic void messageAdded(StationState ss, int index, AX25Message msg)
messageAdded
in interface TrackerListener
ss
- StationState containing the station's informationindex
- zero-based index of the message added to the StationState objectmsg
- APRS Message object being added to the tracker; note that non-APRS packets
that can still be decoded (such as OpenTRAC) will also be passed
here; AX25Frames that cannot be decoded will pass null herepublic void messageDeleted(StationState ss, int index, AX25Message msg)
messageDeleted
in interface TrackerListener
ss
- StationState containing the station's information; the AX25Message
will already be removed from the StationState objectindex
- zero-based index of the message removed from the StationState objectmsg
- APRS Message object being removed from the tracker; note that non-APRS packets
that can still be decoded (such as OpenTRAC) will also be passed
here; AX25Frames that cannot be decoded will pass null here