Code Monkey home page Code Monkey logo

openathena's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

openathena's Issues

Add Cursor On Target UDP network output (as is done in the Android version)

In the Android version of OpenAthena, an industry-standard Cursor on Target message is sent to the local device whenever the user taps the "🧮" button.

Equivalent functionality should be built in to this headless Python version. It should also somehow be user-configurable when getTarget.py is invoked

See here for more documentation on the Android capability and the Cursor on Target message format:
Theta-Limited/OpenAthenaAndroid#15

pygdal package broken, no alternative available for Windows installation

OpenAthena currently has no workable build or runtime package available for Windows systems. This is mostly because the GDAL maintainer's pygdal package is broken, and has been for some time

The expansive gdal library will be replaced much narrower pypi geotiff library to rectify this situation in a future version of OpenAthena

Input DEM vertical datum is wrong for all Autel and some Parrot and DJI aircraft

The GPS standard uses the WGS84 reference ellipsoid as an idealized model of the earth's shape and size. This model is most commonly used for specifying horizontal location using lat/lon, but height above/below the ellipsoid is also commonly used as a vertical datum, such as with standard GPS

An alternative, commonly used vertical datum is EGM96, which is an Earth gravitational model which takes the rotation and gravity of the earth into consideration and uses the resultant expected sea level as the reference point for altitude.

Open Athena must be able to consume either vertical datum for its input drone images

According to the widely used EPSG identifier codes for projections:

EPSG:4326 is a commonly used geodetic coordinate system based on the WGS84 ellipsoid, and EPSG:4979 is a 3D version of EPSG:4326 that includes height information. For EGM96, the EPSG code is 5773.

Installing prereqs gives error

python3 -m pip install -r requirements.txt

......................

Using legacy 'setup.py install' for matplotlib, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pillow, since package 'wheel' is not installed.
Using legacy 'setup.py install' for imagecodecs, since package 'wheel' is not installed.
Building wheels for collected packages: mgrs
Building wheel for mgrs (pyproject.toml) ... done
Created wheel for mgrs: filename=mgrs-1.4.5-cp311-cp311-linux_x86_64.whl size=51702 sha256=cd36d18e6997c41c4249d095f9304d1fb93cd888a3ca39c01a5501bd87a2c8c7
Stored in directory: /tmp/pip-ephem-wheel-cache-2bpcj0r2/wheels/5b/92/1d/bc202481fdffa49ca25be0127b71436204b80482e03e80878b
Successfully built mgrs
Installing collected packages: pillow, imagecodecs, fasteners, entrypoints, certifi, pyproj, numcodecs, mgrs, matplotlib, zarr, geotiff
Running setup.py install for pillow ... error
error: subprocess-exited-with-error

× Running setup.py install for pillow did not run successfully.
│ exit code: 1
╰─> [192 lines of output]
running install
/usr/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(

  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-311
  creating build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/features.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/_version.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/_util.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/_tkinter_finder.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/_binary.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/__main__.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/__init__.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/TiffTags.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/TarIO.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PyAccess.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PngImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PcfFontFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/PSDraw.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/JpegPresets.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageWin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageTransform.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageShow.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageQt.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageOps.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageGrab.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageFont.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageFilter.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageEnhance.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageDraw.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageCms.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImageChops.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/Image.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ImImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/FontFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-cpython-311/PIL
  copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-cpython-311/PIL
  running egg_info
  writing src/Pillow.egg-info/PKG-INFO
  writing dependency_links to src/Pillow.egg-info/dependency_links.txt
  writing top-level names to src/Pillow.egg-info/top_level.txt
  reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '*.c'
  warning: no files found matching '*.h'
  warning: no files found matching '*.sh'
  warning: no previously-included files found matching '.appveyor.yml'
  warning: no previously-included files found matching '.clang-format'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching '.editorconfig'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'codecov.yml'
  warning: no previously-included files matching '.git*' found anywhere in distribution
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '*.so' found anywhere in distribution
  no previously-included directories found matching '.ci'
  adding license file 'LICENSE'
  writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
  running build_ext
  
  
  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  Traceback (most recent call last):
    File "/tmp/pip-install-yire0dg_/pillow_dca1cd4b200c4f9198ae27ba6dc01a2e/setup.py", line 989, in <module>
      setup(
    File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 177, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 193, in run_commands
      dist.run_commands()
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 1229, in run_command
      super().run_command(command)
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.11/site-packages/setuptools/command/install.py", line 68, in run
      return orig.install.run(self)
             ^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 690, in run
      self.run_command('build')
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 1229, in run_command
      super().run_command(command)
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.11/site-packages/setuptools/command/build.py", line 24, in run
      super().run()
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 1229, in run_command
      super().run_command(command)
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/tmp/pip-install-yire0dg_/pillow_dca1cd4b200c4f9198ae27ba6dc01a2e/setup.py", line 804, in build_extensions
      raise RequiredDependencyException(f)
  RequiredDependencyException: jpeg
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-yire0dg_/pillow_dca1cd4b200c4f9198ae27ba6dc01a2e/setup.py", line 1009, in <module>
      raise RequiredDependencyException(msg)
  RequiredDependencyException:
  
  The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pillow

Rotated or Skewed GeoTIFFs cause undefined behavior

With #19 recently merged, OpenAthena uses Kip Crossing's geotiff library instead of GDAL as a pre-requisite

One downside of this implementation: OpenAthena is no longer able to detect if a provided GeoTIFF is rotated or skewed

Before PR #19, OpenAthena would print an error and stop if the provided GeoTIFF was rotated or skewed. The software used the dydx and dxdy parameters of the GDAL .GetGeoTransform() function

An equivalent solution must be found and implemented for OpenAthena with the geotiff library

Need to be able to open/read .tiff DEM files in addition to just .tif

Newer tools from Theta automatically generate DEMs using the filename extension .tiff Further, users importing their own generated GeoTIFFs may name the files with arbitrary filename extensions. OA python needs to be able to eat GeoTIFF files regardless of their filename extension.

Synthesize testing data

Synthesis of data for testing the resolving calculator can be accomplished even without the use of aircraft, purely by using simulation software to obtain a position in the air with a specific measured

  • altitude
  • position
  • azimuth
  • angle of declanation of the camera towards the ground

while the camera is aimed at a fixed point on the ground.

This can be used to test the viability of the software resolving calculator concept.

Examples of simulation software include Google Earth or the Outerra Engine

Add SK-42 6° Gauss-Krüger Coordinates (in meters, w/ zone number)

SK-42 is normally expressed as a Geodetic (i.e. in degrees) coordinate pair, with altitude (in meters above ellipsoid)

However: a grid-ref system using 6° "slices" called the Gauss-Krüger system exists that can express a position in terms of its zone number (which slice, i.e. within a 6° chunk of longitude)

OpenAthena currently outputs SK-42 Geodetic coordinates (as an alternative to WGS84 Geodetic coordinates), but does not output a zone number and X/Y meters using the same Krasovsky 1940 ellipsoid

Some code is available here which will convert directly from WGS84 (Geodetic) to SK-42 Gauss-Krüger (in meters, with zone number)

Roadmap

I foresee the most ugly parts of this project being:

  1. Programming a position resolution calculator, with all the math involved, such that is is able to resolve the target's location (given that it is already has a set of sensor data from the rotary-wing aircraft including altitude, position, azimuth, and angle of declanation).

  2. Program an app to run on the rotary-wing aircraft's paired device (e.g. an app which makes use of the drone's API's that runs on the iPhone or Android smartphone connected to the radio controller device) to integrate the rotary wing aircraft's sensor data and automatically use it for calculations.

So, my thoughts are:

Task 1 is the most important part of this project, but also likely to be the most difficult.

Task 1 can be accomplished and tested with synthesized or recorded flight sensor data from a rotary-wing aircraft as a proof-of-concept

Task 1 and 2 can be decoupled as separate apps if necessary, with human input used to transcribe sensor values (this is not optimal for several reasons, however)

python3 parseGeoTIFF.py Rome-30m-DEM.tif ERROR

After following install instructions after python3 parseGeoTIFF.py Rome-30m-DEM.tif command getting error:
File "/../....../..../athen_env/lib/python3.9/site-packages/matplotlib/cbook/__init__.py", line 2194, in _g_sig_digits (math.floor(math.log10(abs(value))) + 1 if value else 1) ValueError: math domain error

Screenshot from 2023-08-09 15-27-57

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.