Skip to content

Commit

Permalink
Merge pull request #112 from Theta-Limited/ui-improvement
Browse files Browse the repository at this point in the history
UI improvement v0.19.9
  • Loading branch information
mkrupczak3 authored Feb 13, 2024
2 parents 7ff1bce + c2bdaab commit 09a2cfc
Show file tree
Hide file tree
Showing 29 changed files with 27 additions and 49 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ You should have received a copy of the GNU General Public License along with thi

## Obtain a GeoTIFF Digital Elevation Model:

To use this app, you need a GeoTIFF Digital Elevation Model (DEM) file. GeoTIFF files store terrain elevation data for an area on Earth. OpenAthena performs a ray-cast from a drone camera's position and orientation towards the terrain, which can be used to precisely locate any point within a given picture.
To use this app, you need a GeoTIFF or DTED (resolution 2 or higher) Digital Elevation Model (DEM) file. DEM files store terrain elevation data for an area on Earth. OpenAthena performs a ray-cast from a drone camera's position and orientation towards the terrain, which can be used to precisely locate any point within a given drone image.

GeoTIFF DEM files obtained from the [STRM GL1 30m](https://portal.opentopography.org/raster?opentopoID=OTSRTM.082015.4326.1) tend to produce more accurate target results than DTED (per spec, DTED stores treetop height, not terrain height)

To obtain a GeoTIFF file for a certain area, use [this link](https://github.com/mkrupczak3/OpenAthena/blob/main/EIO_fetch_geotiff_example.md).

Expand All @@ -59,7 +61,7 @@ To obtain a GeoTIFF file for a certain area, use [this link](https://github.com/
Load the DEM file (e.g. cobb.tif) using the "⛰" button. The app will display the size of the file and its latitude and longitude boundaries:


(NOTE: during file selection, the thumbnail image preview for any GeoTIFF ".tif" file will be blank. This is normal.)
(NOTE: during file selection, the thumbnail image preview for any GeoTIFF ".tif" or DTED ".dt#" file will be blank. This is normal.)


<img width="586" alt="OpenAthena™ Android GeoTIFF DEM loading demo using cobb.tif" src="./assets/cobb_tif_DEM_Loading_Demo_landscape.png">
Expand Down Expand Up @@ -102,9 +104,9 @@ After loading a GeoTIFF DEM, use the "🖼" button to select a drone image conta

<img width="586" alt="OpenAthena™ Android Image Selection demo using DJI_0419.JPG" src="./assets/DJI_0419_Image_Selection_Demo_landscape.png">

## Calculate a target 🧮 🎯:
## Calculate a target 🎯:

Press the "🧮" button to calculate the target location on the ground. You can tap the result display box to copy the result text to your clipboard or open the position in Google Maps by clicking the blue hyperlink:
Tap anywhere on the displayed image to calculate the corresponding target location on the ground. You can tap the result display box to copy the result text to your clipboard or open the position in Google Maps by clicking the blue hyperlink:

<img width="586" alt="OpenAthena™ Android Target Calculation demo using cobb.tif and DJI_0419.JPG, output mode WGS84" src="./assets/DJI_0419_Target_Res_Demo_landscape.png">

Expand All @@ -116,15 +118,15 @@ Press the "🧮" button to calculate the target location on the ground. You can

## [ATAK](https://en.wikipedia.org/wiki/Android_Team_Awareness_Kit) Cursor on Target

When the "🧮" button is pressed, OpenAthena will automatically send a multicast packet to udp://239.2.3.1:6969 . Under default settings, this will cause a marker to show up in ATAK at the target location:
When the "✉️" button is pressed, OpenAthena will automatically send a Cursor on Target multicast UDP packet to udp://239.2.3.1:6969 to all devices connected via network. Under default settings, this will cause a marker to show up in ATAK at the target location for all recipients:

<img width="586" alt="OpenAthena for Android triggers a waypoint to show in Android Team Awarness Kit at the calculated location" src="./assets/ATAK_OpenAthena_CoT_Demo_landscape.png">

Change the marker to its appropriate type (friend, suspect, hostile) then send the target to other networked users.

## Arbitrary Point Selection

OpenAthena allows users to tap any point in the image to locate it. Tapping on any point in the image will move the marker and calculate the new location. A new Cursor-on-Target message will not be sent to ATAK until the "🧮" button is pressed:
OpenAthena allows users to tap any point in the image to locate it. Tapping on any point in the image will move the marker and calculate the new location. A new Cursor-on-Target message will not be sent to ATAK until the "✉️" button is pressed:

<img width="586" alt="OpenAthena for Android demo of arbitrary point selection for raycast calculation" src="./assets/DJI_0419_Target_Res_Arbitrary_Point_Demo_landscape.png">

Expand All @@ -150,14 +152,14 @@ Select your desired output mode by pressing its button in the list:
<img width="270" alt="OpenAthena™ Android 🎯 Output Modes Activity demo NATO MGRS 10m" src="./assets/Settings_MGRS10m_Demo.png">


Then press the back button or again tap the kebab menu icon (three dots) to return to the "Calculate" screen. Finally, press the "🧮" button to re-calculate the target location according to your chosen output mode:
Then press the back button or again tap the kebab menu icon (three dots) to return to the "Calculate" screen:

<img width="270" alt="OpenAthena™ Android Target Calculation demo using cobb.tif and DJI_0419.JPG, output mode NATO MGRS 10m" src="./assets/DJI_0419_Target_Res_MGRS10m_Demo.png">


## LIVE Telemetry from DJI-SDK
## Telemetry and localization from live video feed

**TBD**
The end goal of this project is to enable UAS operators to perform terrain-raycast localization from any point within live video feed. The target resolution engine of this application is highly modular, and may be extended to operate on any such telemetry data source. This capability will be specific to each UAS manufactuer's SDK however, therefore this capability will take time to develop.

# Contributing

Expand Down Expand Up @@ -187,6 +189,3 @@ git submodule update --remote
# Acknowledgements

This software project would not be possible without the tireless work of many U.S. public servants and open source maintainers. Please see [CREDITS.md](./CREDITS.md) for a full list of included software libraries, and their authors and licenses.

### Setting Up Android Studio with this project
**TODO add instructions for setting up Android Studio**
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 @@ android {
applicationId "com.openathena"
minSdk 28
targetSdk 33
versionCode 33
versionName "0.19.8"
versionCode 34
versionName "0.19.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.debug
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/openathena/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public void calculateImage(View view, boolean shouldISendCoT)
clearText();
textViewTargetCoord.setText("");

appendText(getString(R.string.calculating_target_msg));
appendText(getString(R.string.calculating_target_msg) + "\n");
// appendLog("Going to start calculation\n");

if (imageUri == null) {
Expand Down Expand Up @@ -944,7 +944,7 @@ public void run() {
String placeholderText = getString(R.string.openathena_for_android) + " " + getString(R.string.version_word) + " " + versionName + "\n\n";
placeholderText += getString(R.string.step_1_load_a_DEM) + " \u26F0\n";
placeholderText += getString(R.string.step_2_load_drone_image) + " \uD83D\uDDBC\n";
placeholderText += getString(R.string.step_3_press_calculate) + " \uD83E\uDDEE\n";
placeholderText += getString(R.string.step_3_press_calculate) + " \n";
placeholderText += getString(R.string.step_4_obtain_target) + " \uD83C\uDFAF\n\n";
textView.setText(placeholderText);
}
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/com/openathena/SelectionActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import java.io.File;
import java.io.FileNotFoundException;
Expand Down Expand Up @@ -55,6 +56,11 @@ protected void onCreate(Bundle savedInstanceState) {
iView.mark(0.5d, 0.5d); // put marker on center of iView if no current selection
}
}

// Display UI prompt only when activity is first opened, not upon return to activity (e.g. multitasking switch or screen rotation)
if (savedInstanceState == null) {
Toast.makeText(this, "Zoom out or press \"Back\" to return", Toast.LENGTH_SHORT).show();
}
}

private void imageSelected(Uri uri) {
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">À propos</string>
<string name="action_settings">Paramètres</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">OpenAthena™ pour Android . . .</string>
<string name="test_button_text">Calculer</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">「OpenAthena」について</string>
<string name="action_settings">設定</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">Android 用 「OpenAthena™」. . .</string>
<string name="test_button_text">計算する</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">OpenAthena 소개</string>
<string name="action_settings">설정</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">Android용 OpenAthena™ . . .</string>
<string name="test_button_text">계산하다</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">O OpenAthena</string>
<string name="action_settings">Ustawienia</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">OpenAthena™ dla Androida. . .</string>
<string name="test_button_text">Oblicz</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">О OpenAthena</string>
<string name="action_settings">Настройки</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">OpenAthena™ для Android. . .</string>
<string name="test_button_text">Рассчитать</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">Про OpenAthena</string>
<string name="action_settings">Налаштування</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">OpenAthena™ для Android. . .</string>
<string name="test_button_text">Обчислити</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<string name="action_about_openathena">关于 OpenAthena</string>
<string name="action_settings">设置</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">Android 版 OpenAthena™...</string>
<string name="test_button_text">计算</string>
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<string name="action_about_openathena">About OpenAthena</string>
<string name="action_settings">Settings</string>

<string name="button_selectImage">🖼️</string>
<string name="button_calculate">🧮</string>
<string name="button_loadDEM">⛰️</string>
<string name="button_selectImage" translatable="false">🖼️</string>
<string name="button_calculate" translatable="false">✉️</string>
<string name="button_loadDEM" translatable="false">⛰️</string>

<string name="text_view_value">ChangeMe</string>
<string name="log_text_view_value">OpenAthena™ for Android . . . </string>
Expand Down Expand Up @@ -49,7 +49,7 @@
<string name="dem_loaded_size_is_msg">loaded ⛰. Size </string>
<string name="dem_load_error_generic_msg">ERROR: failed to load DEM, </string>
<string name="dem_load_error_tiffexception_msg">ERROR: failed to load DEM, not a GeoTIFF \".tif\" or DTED2 \".dt2\" file.\n</string>
<string name="calculating_target_msg">Calculating 🧮:\n</string>
<string name="calculating_target_msg">"Calculating 🧮: "</string>
<string name="no_image_selected_error_msg">ERROR: Cannot calculate 🚫🧮: no image 🚫🖼 selected\n</string>
<string name="opened_exif_for_image_msg">Opened EXIF for image\n</string>
<string name="autel_accuracy_warning_msg">⚠️ DANGER: Autel drones have known accuracy problems ⚠️</string>
Expand Down Expand Up @@ -89,7 +89,7 @@
<string name="version_word"> version </string>
<string name="step_1_load_a_DEM">Step 1: load a Digital Elevation Model (DEM) </string>
<string name="step_2_load_drone_image">Step 2: load a Drone Image </string>
<string name="step_3_press_calculate">Step 3: press this button to calculate: </string>
<string name="step_3_press_calculate">Step 3: tap anywhere on the image to calculate </string>
<string name="step_4_obtain_target">Step 4: obtain your target location below </string>
<string name="wrong_filetype_toast_error_msg">ERROR: wrong filetype. Please select a GeoTIFF file ending in \".tif\" or DTED2 file ending in \".dt2\"</string>
<string name="permissions_toast_success_msg">Permissions Granted</string>
Expand Down
Binary file modified assets/0419_text_copied_to_clipboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/App_Open_Demo_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/DJI_0419_Image_Selection_Demo_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/DJI_0419_Open_Settings_Demo_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/DJI_0419_Target_Res_Arbitrary_Point_Demo_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/DJI_0419_Target_Res_Demo_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/DJI_0419_Target_Res_MGRS10m_Demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/TextCopiedOptimized.gif
Binary file not shown.
Binary file modified assets/cobb_tif_DEM_Loading_Demo_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/magnetometer_fail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tap_to_locate_demo_small.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions metadata/en-US/changelogs/34.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Minor user interface changes and improvements
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 09a2cfc

Please sign in to comment.