Skip to content

Instantly share code, notes, and snippets.

@a4099181
Last active September 23, 2018 09:00
Show Gist options
  • Save a4099181/f7719ab893c72588213a14a2be0e47f3 to your computer and use it in GitHub Desktop.
Save a4099181/f7719ab893c72588213a14a2be0e47f3 to your computer and use it in GitHub Desktop.

Flight sim command set

Textures processing

FOR /R .\Orthophotos %F IN (PL_15/*.jpg) DO (CD %~pF && "C:\Program Files\GIMP 2\bin\gimp-console-2.8.exe" ^
                                -i -b "(greeny \"PL_15\\%~nxF\" \"Ortho4XP_PL15_64\")" -b "(gimp-quit 0)")
Requirements:
  • gimp

Scenery generation

It iterates through the tiles from 48N12E up to 55N23E and generates sceneries for each one.

FOR /L %Y IN (48,1,55) DO FOR /L %X IN (12,1,23) DO (                                                ^
  IF NOT EXIST "zOrtho4XP_+%Y+0%X\Earth nav data" (                                                  ^
    IF EXIST "zOrtho4XP_+%Y+0%X\Ortho4XP.cfg" (                                                      ^
      "%USERPROFILE%\AppData\Local\Programs\Python\Python35\python.exe" Ortho4XP.py %Y %X            ^
        "zOrtho4XP_+%Y+0%X\Ortho4XP.cfg" )                                                           ^
    ELSE ( "%USERPROFILE%\AppData\Local\Programs\Python\Python35\python.exe" Ortho4XP.py %Y %X ) ) )
Requirements:
  • Ortho4XP

PDF chart conversion to high quality PNG image file.

The primary goal is to use the chart image with LES Saab 340A Pilot Chart Selector.

It can be displayed on the captain's control yoke.

FOR /R %F in (*ICAO*.pdf) DO magick -density 300  %~nxF[0] ^
  -trim -units pixelsperinch -density 300 -resize "1304x1304^" ^
  -rotate "-90>" -colorspace gray -background white -flatten ^
  -gravity west -extent "2048x2048" ..\..\..\Charts.png\%~nxF.png

Please note, that only the first page of the PDF document is converted.

Requirements:
  • imagemagick
  • ghotscript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment