Skip to content

Commit

Permalink
1.0.11
Browse files Browse the repository at this point in the history
Add some extra contact details so the relayed markers appear correctly in iTAK.

Prevent 0,0 GPS from showing up on the map.
  • Loading branch information
niccellular committed Apr 18, 2024
1 parent 4ac447b commit a3ef956
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
buildscript {


ext.PLUGIN_VERSION = "1.0.10"
ext.ATAK_VERSION = "4.10.0"
ext.PLUGIN_VERSION = "1.0.11"
ext.ATAK_VERSION = "5.0.0"

def takdevVersion = '2.+'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void onReceive(Context context, Intent intent) {
if (ni.getUser() == null) return;
cotEvent.setUID(ni.getUser().getLongName());
if (ni.getPosition() == null) return;
if (ni.getPosition().getLatitude() == 0 || ni.getPosition().getLongitude() == 0) return;
CotPoint gp = new CotPoint(ni.getPosition().getLatitude(), ni.getPosition().getLongitude(), ni.getPosition().getAltitude(), CotPoint.UNKNOWN, CotPoint.UNKNOWN);
cotEvent.setPoint(gp);
cotEvent.setHow("m-g");
Expand All @@ -118,6 +119,10 @@ public void onReceive(Context context, Intent intent) {
CotDetail remarksDetail = new CotDetail("remarks");
remarksDetail.setInnerText(ni.toString());
cotDetail.addChild(remarksDetail);
CotDetail contactDetail = new CotDetail("contact");
contactDetail.setAttribute("callsign", ni.getUser().getLongName());
contactDetail.setAttribute("endpoint", "0.0.0.0:4242:tcp");
cotDetail.addChild(contactDetail);

if (cotEvent.isValid()) {
CotMapComponent.getInternalDispatcher().dispatch(cotEvent);
Expand Down

0 comments on commit a3ef956

Please sign in to comment.