Skip to content

Python script that tries to fix misplaced lines in imagery received from GVAR broadcasts.

License

Notifications You must be signed in to change notification settings

Cpt-Dingus/GVAR-line-corrector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GVAR line corrector

This python script tries to correct misplaced lines from within a .gvar file by applying majority law error correction to the raw GVAR frames. Before: Full disc GVAR crop with several missing lines

After: Full disc GVAR crop with much fewer missing lines

Usage

This python script is run on the raw output frames generated by SatDump, to get them:

  1. Copy the GVAR-Raw-Output.json file from the Pipeline folder into SatDump's pipelines folder

Locations of the pipelines folder:

  • Portable installation
    • The pipeline folder is located next to the SatDump executables/binaries.
  • Windows
    • When installed, the pipeline folder is located in C:\Program files\SatDump\share\satdump\
  • Linux
    • When installed, the pipeline folder is located in /usr/share/satdump/
  • Android
    • The pipeline folder can only be accessed by using a debug build of SatDump, GitHub automatically builds these in the Actions tab with each commit.
    • To access it:
      • Install ADB
      • Enable debugging on your device
      • Run adb shell
      • Run run-as org.satdump.SatDump
      • The pipelines folder is in ./files/
      • You can copy the pipeline file from another place such as /storage/emulated/0/ or /sdcard/
  1. Decode with the new pipeline, it will show up as GOES GVAR Raw Output
  2. Once satisfied with the results, stop the pipeline. SatDump will automatically start processing the uncorrected products, we can ignore this.
  3. In the Live Output folder, you will be able to find a goes_gvar.gvar file, you will use it as the input.
  4. Run the python script as follows: python GVAR-corrector.py -i <input_file_name> -o <optional_output_file_name>

The output filename defaults to goes_gvar_corrected.gvar

  1. Run the corrected file through the standard GOES GVAR pipeline, select gvar as the input level.

Configuration

  • CONSISTENCY_CHECK
    This is used for the first type of EC, which is consistency based - if a counter is present in N/10 of the series, the next one is set to this one +1.
    1 is the least reliable, 10 is the most (but is the least likely to trigger).

  • CURRENT_FRAME
    Which frame to start from.
    Should be set to 0, is primarily used for debugging

  • FRAME_LIMIT
    The maximum amount of frames to correct.
    Is used for debugging.

How the correction process works

GVAR is an incredibly inconsistent format owing to its name - Variable. Thankfully, it always transmits 10 blocks (frames) in consecutive order, all of which contain the a matching line counter. The script initially applies majority law EC to the header (as it's triple redundant), to ensure the block number is correct. After this, it applies majority law EC to every block series' line counters. This puts all received lines in place. All other missing lines are caused by the deframer losing sync, or there being too much corruption for the corrector to work effectively.

A huge thanks to @sealsrock and @that_zbychu on Discord for helping with this project! Also a huge thanks to Foxiks for giving me this idea with his FengYun 2 S-VISSR corrector!

About

Python script that tries to fix misplaced lines in imagery received from GVAR broadcasts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages