Categorygithub.com/mmp/dat2vice
repositorypackage
0.0.5
Repository: https://github.com/mmp/dat2vice.git
Documentation: pkg.go.dev

# README

dat2vice is a utility for people doing facility engineering for vice. It extracts video maps from the FAA DAT video map file format and converts them to vice's internal format.

dat2vice takes a manifest file that specifies the filenames of the DAT files to convert as well as additional information about each one:

  • "filename" is a string giving the path to the DAT file
  • "brightness" (optional, 0 by default): should be either 0 or 1, with 0 signifying map group A, and 1 signifying map brightness group B.
  • "label" gives the label that should be used for the map on the STARS DCB
  • "title" gives the full name of the map, as is used in vice scenario definition files.
  • "number" gives the integer map number associated with the map.
  • "color" (optional): gives which map color to use (1-8).
  • "category" (optional): number from -1 to 9 giving the map category. 0 is the default if not specified.
    • -1: no category
    • 0: Geographic maps
    • 1: Controlled airspace
    • 2: Runway extensions
    • 3: Danger areas
    • 4: Aerodromes
    • 5: General aviation
    • 6: SIDs/STARs
    • 7: Military
    • 8: Geographic points
    • 9: Processing areas
  • "radius" (optional) if specified, gives a radius in nautical miles beyond which extra data in the map is culled.

For brightness group 0, the map are these RGB values:

140, 140, 1400, 255, 255255, 0, 255238, 201, 0238, 106, 80162, 205, 90218, 165, 3272, 118, 255
12345678

Here are the map colors for brightness group 1:
140, 140, 140132, 112, 255118, 238, 198237, 145, 33218, 112, 214238, 180, 18050, 205, 50255, 106, 106
12345678

Here is an example:

[
        {
            "filename": "xyz001sgp.dat",
            "brightness": 0,
            "label": "XYZ RNAV",
            "title": "XYZ RNAV APPROACHES",
            "number": 1
        },
        {
            "filename": "xyz012smvagp.dat",
            "brightness": 1,
            "label": "XYZ MVA",
            "title": "XYZ AREA MVAS",
            "color": 3,
            "number": 12,
            "radius": 60

        },
]

Given a manifest file, run dat2vice like this, giving it the filename for the manifest file and the facility identifier for the maps:

> dat2vice manifest.json ZXX

You can also specify a culling radius via the -radius command-line option:

> dat2vice -radius 40 manifest.json ZXX

If -radius is given and per-map "radius" values are present, the per-map value takes precedence.

If successful, dat2vice will generate two files in the current directory, ZXX-manifest.gob and ZXX-videomaps.gob.zst. These can be then be used in vice scenarios.