Global Constants

To avoid the use of "magic numbers" in LOCSMITH source codes, constant definitions are collected in the MKLSCONSTANTS routine as far as possible. This routine returns values of constants specified by their names and gives definitions and explanations.

Unfortunately, it was not possible to include all constants in this routine, since getting values via a function call sometimes wastes too much CPU time. So there are still some magic numbers spread over the source codes. :-( These are explained in source code comments.

The values defined by MKLSCONSTANTS are divided into two groups: those that you might change if unavoidable and those that are mission critical - keep your hands off these.

To get the values of the constants, call MKLSCONSANTS with te respective constant name

You may change the following constants:
Constant Type Units Description
ReferenceDay numeric array [y m d] times in LOCSMITH are counted in seconds since this day, 00:00:00.
Transparency number - The Alpha value used for transparency in several types of grid plots
SphereFacets number - Some plot routines plot additional sphere surfaces as beautification or whatever. This constant is passed into MatLab's sphere() function and thus defines how fine this sphere surface is.
ColorMapLength number - Length of color maps (number of entries)
FaceColor number or string ColSpec Color specification for faces of surfaces that are drawn when plotting grids. This color is used e.g. for th augmenting sphere in "cloud"-plots of gridnodes, but also for the patches in "surface"-plots of grids.
EdgeColor number or string ColSpec Color specification for faces of surfaces that are drawn when plotting grids. This color is used e.g. for th augmenting sphere in "cloud"-plots of gridnodes, but also for the patches in "surface"-plots of grids.
NodeColor number or string ColSpec Color specification for points (nodes) that are drawn when plotting grids.
NodeMarker string linespec linespec string specifying the marker used by MKLSGRIDPLOT and MKLSGRIDRESPLOT to plot node markers.
StationMarker string linespec linespec string specifying the marker used by MKLSNETPLOT to plot station markers.
Lighting string predefined values Surface Lighting type used when plotting grids. This is one of the string allowed in the lighting property
KEEP OUT!!

The following constant definitions are listed here for your information only. Changing them might damage LOCSMITH.

Constant Type Units Description
ReftriRoundoff number - A large number used to round off the computed edge lengths in MKLSGRIDREFTRI. This roundoff is needed to find the second longest edge in a grid without strugglin over roundoff errors of about 1e-12.
TrianglesTetrahedron number - Number of triangles of a Tetrahedron.
TrianglesOctahedron number - Number of triangles of an Octahedron.
TrianglesIcosahedron number - Number of triangles of an Icosahedron
MaxEdgeTetra numeric array degree List of maximum edge lengths of tetrahedron-based grids. The first element is the edge length of the tetrahedron itself, the second element is the length of the longest edge after one iteration, the third if the same after two iterations and so on.
The list given here gives max edge lengths only for a few ietrations. For higher iterations, just divide the smallest value in the list by successive powers of two. This list was produced by an older version of MKLSGRIDREFTRI. Edge length lists are now obsolete, but remain here because it took some effort to produce them ;-)
MaxEdgeOcta numeric array degree List of maximum edge lengths of octahedron-based grids (see MaxEdgeTetra for details)
MaxEdgeIcosa numeric array degree List of maximum edge lengths of icosahedron-based grids (see MaxEdgeTetra for details)
MaxCCRTetra numeric array degree List of maximum circumcircle radii of tetrahedron based grids. The first element is the circumcircle radius of the intial tetrahedron, the second element is the largest circumcircle radius after one iteration, the third the same after two iterations and so on. The list given here gives radii only for a few iterations. For higher iterations, just divide the smallest value in the list by successive powers of two. This list was produced by MKLSGRIDREFTRI.
MaxCCROcta numeric array degree As MaxCCRTetra, but for Octahedron grids.
MaxCCRIcosa numeric array degree As MaxCCRTetra, but for icosahedron grids.
LSPath string - path to the directory in which the LOCSMITH m-files reside This is determinded dynamically as the path in which MKLSCONSTANT resides. No trailing slash/backslash.
LSDocPathEN string - path to the directory in which the english LOCSMITH documentation resides. This is the path to the HTML files of the english version of the documentation, not to the images or something else. Constructed via a recursive call to MKLSCONSTANT('LSPath'). No trailing slash/backslash.
LocationDemo1 structure depending on field Default values for the input of MKLSLOCATIONDEMO. These values are used if the location demo routine is called with an incomplete list of arguments or with the "demo1"-call. This demo shows a location with back azimuths only.
LocationDemo2 structure depending on field Another scenario for MKLSLOCATIONDEMO. These values are used for the "demo2"-call. This is a somewhat pathological case which demonstrates the Attention Creep Effect.
LocationDemo3 structure depending on field Another scenario for MKLSLOCATIONDEMO. These values are used for the "demo3"-call. This demo demonstrates the evaluation of arrival times.
LocationDemo4 structure depending on field Another scenario for MKLSLOCATIONDEMO. These values are used for the "demo4"-call. This demo demonstrates the evaluation of arrival times.
HTMLHead HTMLHead - HTML header for automatic generation of HTML files from the help lines in m-files, used by MKHELP2HTML
HTMLTitleOpen string - Opening phrase for HTML page headline. This is not the title-tag of the HTML page, but the headline of the text.
HTMLTitleClose string - Closing phrase for HTML headline
HTMLHelpBodyOpen string - This phrase opens the body part with the actual help lines
HTMLHelpBodyClose string - This phrase closes the body part with the actual help lines.
HTMLLinkOpen string - Opening Phrase for link to m-file source code. The link URL has to bewritten between the opening and the middle phrase.
HTMLLinkMiddle string - Middle phrase for link to m-file source code. This is mainly the constant part of the link text and the closing '>' character fo the anchor opening tag.
HTMLLinkClose string - Closing phrase for link to m-file source code
HTMLFoot string - HTML footer for automatic generation of HTML files from the help lines in m-files, used by MKHELP2HTML
HTMLTocLinkOpen string - Opening phrase for TOC entries generated by MKHELP2HTML
HTMLTocLinkMiddle string - Middle phrase for TOC entries generated by MKHELP2HTML
HTMLTocLinkClose string - Closing phrase for TOC entries generated by MKHELP2HTML

eof.