kopia lustrzana https://github.com/sh123/codec2_talkie
Show aprs destination in map popup
rodzic
2c7e3e80b5
commit
968a213bc6
|
@ -266,8 +266,8 @@ public class AppWorker extends Thread {
|
|||
private final ProtocolCallback _protocolCallback = new ProtocolCallback() {
|
||||
@Override
|
||||
protected void onReceivePosition(Position position) {
|
||||
Log.i(TAG, String.format("Position received: %s, %s, lat: %f, lon: %f, course: %f, speed: %f, alt: %f, sym: %s, range: %.2f, status: %s, comment: %s",
|
||||
position.srcCallsign, position.maidenHead, position.latitude, position.longitude,
|
||||
Log.i(TAG, String.format("Position received: %s→%s, %s, lat: %f, lon: %f, course: %f, speed: %f, alt: %f, sym: %s, range: %.2f, status: %s, comment: %s",
|
||||
position.srcCallsign, position.dstCallsign, position.maidenHead, position.latitude, position.longitude,
|
||||
position.bearingDegrees, position.speedMetersPerSecond, position.altitudeMeters,
|
||||
position.symbolCode, position.rangeMiles, position.status, position.comment));
|
||||
_positionItemRepository.upsertPositionItem(position.toPositionItem(false));
|
||||
|
|
|
@ -83,7 +83,8 @@ public class MapStations {
|
|||
_stationItemLiveData.observe((LifecycleOwner) _owner, allStations -> {
|
||||
Log.i(TAG, "add stations " + allStations.size());
|
||||
for (StationItem station : allStations) {
|
||||
//Log.i(TAG, "new position " + station.getLatitude() + " " + station.getLongitude());
|
||||
//Log.i(TAG, "new position " + station.getSrcCallsign() + ">" +
|
||||
// station.getDstCallsign() + " " + station.getLatitude() + " " + station.getLongitude());
|
||||
// do not add items without coordinate
|
||||
if (station.getMaidenHead() == null) continue;
|
||||
if (addStationPositionIcon(station)) {
|
||||
|
@ -200,7 +201,8 @@ public class MapStations {
|
|||
|
||||
private String getStatus(StationItem station) {
|
||||
double range = UnitTools.milesToKilometers(station.getRangeMiles());
|
||||
return String.format(Locale.US, "%s<br>%s %f %f<br>%03d° %03dkm/h %04dm %.2fkm<br>%s %s",
|
||||
return String.format(Locale.US, "%s %s<br>%s %f %f<br>%03d° %03dkm/h %04dm %.2fkm<br>%s %s",
|
||||
station.getDstCallsign(),
|
||||
station.getDigipath(),
|
||||
station.getMaidenHead(), station.getLatitude(), station.getLongitude(),
|
||||
(int)station.getBearingDegrees(),
|
||||
|
|
|
@ -135,12 +135,6 @@ public class AprsIs implements Protocol, Runnable {
|
|||
}
|
||||
|
||||
private boolean isEligibleForTxGate(AprsIsData aprsIsData) {
|
||||
/* rules:
|
||||
1. RX gate must be heard on rf within digi hops or range
|
||||
2. RX gate has not been heard on internet within given period of time or in third party packets
|
||||
3. ✓ sender must not be heard within given period of time on RF
|
||||
4. ✓ sender must not have TCPXX, NOGATE, RFONLY
|
||||
*/
|
||||
AprsCallsign aprsCallsign = new AprsCallsign(aprsIsData.src);
|
||||
return _isTxGateEnabled &&
|
||||
aprsCallsign.isValid &&
|
||||
|
|
|
@ -116,7 +116,6 @@ public class StationItem {
|
|||
|
||||
public void updateFrom(StationItem stationItem) {
|
||||
setTimestampEpoch(stationItem.getTimestampEpoch());
|
||||
setDstCallsign(stationItem.getDstCallsign());
|
||||
// update position if known
|
||||
if (stationItem.getMaidenHead() != null) {
|
||||
setMaidenHead(stationItem.getMaidenHead());
|
||||
|
@ -139,6 +138,8 @@ public class StationItem {
|
|||
setLogLine(stationItem.getLogLine());
|
||||
if (stationItem.getDigipath() != null)
|
||||
setDigipath(stationItem.getDigipath());
|
||||
if (stationItem.getDstCallsign() != null)
|
||||
setDstCallsign(stationItem.getDstCallsign());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Ładowanie…
Reference in New Issue