Scripts - acnelson12/PP4 GitHub Wiki
Statements of scripts are grouped into three categories: map specifications, map configurations, and map elements. Each category is processed in its entirety before the next category is processed. Map specifications are concerned with what is being mapped: where in the sky, how big of an area, and at what scale. Map configurations are concerned with how the map is drawn: what colors to use, what fonts, where to write the file, etc. Map elements are the data that actually get plotted on the map depending on the specifications and according to the configurations. They include stars, clouds, labels, etc.
Specifications express which elements will be plotted; configurations express the manner in which elements will be plotted.
All statements are delimited by semi-colons. Comments are created with the #
symbol.
Commands
include
The include
command is simply used to specify the inclusion of other PP4 files. Its use is encouraged for modularity. Any included files will be read as if their contents had been copied and pasted at the location of the include
command. The depth of inclusion is unlimited.
Map Specifications
right_ascension
The right ascension for the center of the map.
declination
The declination for the center of the map.
width
The width of the map in pixels.
height
The height of the map in pixels.
Map Elements
star
The star
command defines a star in the following manner:
star
RightAscension
Declination
ApparentMagnitude
SpectralType;
If the spectral type is unknown, U
should be given as its type.
Annotations
The first line of a PP4 file may contain a @
symbol. This allows for the file to be annotated with certain tags describing its contents to the program parsing the script. These descriptions allow the parser to work more efficiently because it won't be searching the file for things it doesn't contain. Annotations are completely optional.
specifications
: Used for files containing map specifications.configurations
: Used for files containing map configurations.stars
h_ii
milkyway