Giter Club home page Giter Club logo

geoscan-tools's People

Contributors

cyyyr avatar kng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

geoscan-tools's Issues

Stratosat address calculation is broken

I have attached a tgz with a kss file and expected vs actual outputs when running

python3 stratosat_simple.py input.kss

broken.tgz

I see that the issue is around the address calculation, I just dont have a 'high resolution' kss file to make a proper fix. If you have a sample input I can make a PR for this issue.

Here is a patch that works.

diff --git a/stratosat_simple.py b/stratosat_simple.py
index c45bd5d..9beb40b 100755
--- a/stratosat_simple.py
+++ b/stratosat_simple.py
@@ -55,15 +55,12 @@ def parse_frames(data):
     hr = False
     for row in data:
         if row[16:22].upper() == 'FFD8FF':
-            offset = int((row[12:14] + row[10:12]), 16)
+            offset = int((row[14:16]+ row[12:14] + row[10:12]), 16)
             hr = row[6:10].upper() == '2098'
             break
     for row in data:
         cmd = row[0:4]
-        if hr:
-            addr = int((row[14:16] + row[12:14] + row[10:12]), 16)
-        else:
-            addr = int((row[12:14] + row[10:12]), 16) - offset
+        addr = int((row[14:16] + row[12:14] + row[10:12]), 16) - offset
         dlen = (int(row[4:6], 16) + 2) * 2
         payload = row[16:dlen]
         if cmd == '0200' and addr >= 0:

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.