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:
This python script is run on the raw output frames generated by SatDump, to get them:
- Copy the
GVAR-Raw-Output.json
file from thePipeline
folder into SatDump'spipelines
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\
- When installed, the pipeline folder is located in
- Linux
- When installed, the pipeline folder is located in
/usr/share/satdump/
- When installed, the pipeline folder is located in
- 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/
- The pipeline folder can only be accessed by using a debug build of SatDump, GitHub automatically builds these in the
- Decode with the new pipeline, it will show up as
GOES GVAR Raw Output
- Once satisfied with the results, stop the pipeline. SatDump will automatically start processing the uncorrected products, we can ignore this.
- In the
Live Output
folder, you will be able to find agoes_gvar.gvar
file, you will use it as the input. - 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
- Run the corrected file through the standard
GOES GVAR
pipeline, selectgvar
as the input level.
-
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.
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!