Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terrain point resolution, Offline DEM #5

Open
mkrupczak3 opened this issue May 20, 2022 · 13 comments
Open

Terrain point resolution, Offline DEM #5

mkrupczak3 opened this issue May 20, 2022 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@mkrupczak3
Copy link

mkrupczak3 commented May 20, 2022

Hi,

I've been working on a program called OpenAthena which finds the spot on the ground a drone is looking at, in any given photo, using terrain elevation data

It works pretty well:

pretty_good

concept_whiteboard_diagram

I'd like to donate, free of license or restriction, this technique and functionality to integrate it with the ATAK-UAS app. Could drastically improve the process of forward artillery observation and search and rescue use cases of the ATAK platform

Required for this technique: a Digital Elevation Model (DEM) GeoTIFF file covering at least the UAS's location and the location of the subject of its camera

With Open Athena, a DEM of a customized area (large or small alike) can be downloaded for offline use (as a GeoTIFF file) by the Python eio clip command from the easy to use Python elevation package

I'm away from my workstation at the moment, but I'd like to ask: does ATAK-UAS store a map, including a Digital Elevation Model, for offline use?

If so, it will be pretty easy to implement this technique in the app. All the functionality can be re-wrote with some basic Java, as long as there's a way to obtain the elevation at a certain lat/lon.

Otherwise, if ATAK-UAS currently does not implement a DEM, it should still be fairly simple to add the OpenAthena technique along with a system that can read in a GeoTIFF file into the ATAK-UAS app

No Python required in either case :)

-Matthew

@mkrupczak3
Copy link
Author

Mentioned previously with @brothercorvo in this issue:
deptofdefense/AndroidTacticalAssaultKit-CIV#205 (comment)

@mkrupczak3
Copy link
Author

@rdkgit 👀

@mkrupczak3
Copy link
Author

@brothercorvo brothercorvo added the enhancement New feature or request label May 21, 2022
@brothercorvo
Copy link
Contributor

What do you think @niccellular this could improve the accuracy of the target, currently we ignore terrain elevation

@mkrupczak3
Copy link
Author

mkrupczak3 commented May 22, 2022

So I thought it'd be worth sharing:

I've been really surprised by the efficacy of this technique, that is: using drone sensor data combined with an existing public global Digital Elevation Model data to find the exact location a drone's camera is looking at

The quality of the sensor data from the drones is usually quite good, and in the best case terrain resolution matches can be within 1-2 meters of the exact location

image of railway terrain resolution match proof of concept

In the current version, OpenAthena can automatically extract sensor data from a DJI or Skydio UAS' image:
image of command line interface OpenAthena is given cobb.tif and DJI_0419.JPG and resolves a GPS location on the ground

The quality of the free Digital Elevation Model is quite good as well, providing a significant advantage in accuracy with this technique

The open source Digital Elevation Model dataset I use was generated by the Space Shuttle Radar Topography Mission (SRTM) using a technique known as synthetic aperture radar. More detail is available here, but basically the short of it is that the radar technique is really good because it will go through stuff like cloud cover and surface foliage (trees) before bouncing off of hard terrain. The model's reported altitude for every datapoint is pretty darn close to the real thing

Also, the elevation model is free to use (download clips of), and it covers the entire earth

The resolution is 30 meters between each datapoint, going North, East, South, West, etc, but the vertical accuracy is within ~7 meters or so. OpenAthena just uses the altitude of the nearest datapoint (without any weighting or averaging)

@mkrupczak3
Copy link
Author

mkrupczak3 commented May 22, 2022

Mainly I bring this up because FreeTAK seems like the perfect platform for this kind of software

In conflicts today, consumer rotary-wing aircraft are already being commonly used for forward artillery observation (and to devastating effect)

My hope is that implementation on the FreeTAK-UAS app may simplify the targeting process for the operator of a UAS and make the process of forward artillery observation easier, more accurate, and less prone to error

In addition, the ability to quickly get location data instantly into the FreeTAK platform may improve situational awareness for commanders and armed forces

@brothercorvo
Copy link
Contributor

@mkrupczak3 just to be clear: this is a Open Source project driven by regular people in our free time. There is no commercial interest here. So if you want to contribute all you need to do is to look at the code (based on the DJI SDK and submit a pull request. @niccellular and myself will review it and approve it that's make sense.

@mkrupczak3
Copy link
Author

mkrupczak3 commented May 22, 2022

Sounds good 👍

I have no commercial interest at this time, and regardless I wish to contribute this to FreeTAK without any license or restriction

I'm working on internationalization of OpenAthena right now, but after I can take a deeper look into the FreeTAK app

OSGEO can be imported into an Android project, details in the following link. I anticipate this will probably be the most difficult part of implementation:
https://trac.osgeo.org/gdal/wiki/BuildingForAndroid
building as an "easy to use" .aar library:
https://github.com/paamand/GDAL4Android

The OpenAthena codebase is fairly readable, in case either of y'all would like to evaluate in anticipation of eventual integration into FreeTAK

@brothercorvo
Copy link
Contributor

brothercorvo commented May 22, 2022 via email

@niccellular
Copy link
Collaborator

niccellular commented May 22, 2022

@mkrupczak3 @brothercorvo

This seems like a great enhancement for FTUAS. As mentioned we currently do not consider terrain when calculating drone's Sensor Point of Interest (SPI) because we do not have elevation data.

Trying to think through how we can use this capability. A naïve approach would be to require the user to load digital elevation data in some predetermined format, (DTED, GeoTIFF, etc) onto their device, like their SDcard. Then the app provides a toggle to enable the new calculations that leverage the elevation data.

This is a rough approach but does fit the ATAK model, as all users typically load their own DTED data.

If the maths involved in computing the more accurate target can be implemented in Java. We should be able to make it happen.

Another thought, we currently bundle HERE maps via their sdk. I wonder if they provide elevation data from an online source. This would only work for internet connected devices and might not be great for Ukraine like ops.

@mkrupczak3
Copy link
Author

Sounds good

I think offline operation is very important for a Minimum Viable Product, so or now I'm going to focus on getting a GUI version of OpenAthena ready, then a simple Android version (if I can figure out how to get GDAL working as a library)

The code for OpenAthena is available in case you're interested in adapting it for FreeTAK in the mean time. Most of the math is very simple for the calculation itself, I think the hardest part honestly is importing the GDAL library and being able to read data from a GeoTIFF DEM file

@mkrupczak3
Copy link
Author

@niccellular @brothercorvo I've updated OpenAthena to support SK-42 Gaus Krüger values (as used as labels on old Soviet maps) and more drone models

Stubbed out an Android version here with some Android binaries for the GDAL library necessary for parsing GeoTIFF DEM's. Not functional yet though

Is there any interest in this project from the DHS Science and Technology directorate? I'd like to transfer ownership of the project if possible. Think y'all might be able to move on this faster than myself

@mkrupczak3
Copy link
Author

mkrupczak3 commented Dec 18, 2022

@brothercorvo @niccellular I've managed to port the core of OpenAthena to Java, get it working in an Android app, and integrate the tiff-java library maintained by the National Geospatial Intelligence Agency for reading a GeoTIFF DEM.

I would really like to provide an implementation for use with FreeTAK. The repo is currently licensed GPLv3.0 instead of LGPL 2.1, but I can provide the Java core and the GeoTIFF parsing implementation under whatever license would be compatible with the FreeTAK project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants