Skip to content

Indicators

roosit edited this page May 9, 2026 · 5 revisions

Indicators

Русский

Overview of all indicators in the plugin-official plugin. Each has its own page in Code/ with the full source code and detailed analysis.

Texts

Indicator Source What it shows
TimeTextIndicator — The current player time, time elapsed since the start of the project, and time remaining until the end. Configurable format via a DateTimeFormatter pattern, timezone selection.
DistanceTextIndicator distance The current distance traveled and the full track distance. Template with variables currNum / currUnit / fullNum / fullUnit.
SlopeTextIndicator slope (+ plugin DB) The current slope type (ascent/descent/flat), slope percentage, segment length, accumulated ascent/descent of the track. 14 variables in the template, short / detailed skins.

Speed

Indicator Source What it shows
SpeedometerIndicator distance A classic round speedometer with a needle and numeric value. 40 / 80 / 160 / 320 km/h scales. SVG graphics with configurable colors.
SlopeSpeedIndicator slope + distance Two-line indicator: slope with arrow and percentage on top, speed below. The slope color depends on the type (ascent/descent/flat).

Charts

Indicator Source What it shows
SpeedChartIndicator distance Speed chart along distance — a window around the current position, fill with color interpolation (green→red by speed level), dashed average line, "you are here" marker.
SlopeChartIndicator slope (+ plugin DB) Elevation profile along distance with colored fill by slope-group type (ascents are reddish, descents are greenish).

Geolocation

Indicator Source What it shows
GeoMapIndicator geo + OSM tiles OSM map with auto-zoom by track or manual zoom; supports tile transparency and hiding the background. Figures are drawn on the map: GeoTrackFigure (track) and GeoPositionFigure (position point).
CompassIndicator geo A compass that rotates by the track bearing (direction of movement, not magnetic north). SVG with configurable colors.

Video

Indicator Source What it shows
VideoIndicator video Video frame window for the selected source at the current point in time. Configurable border and rounded corners. Useful for picture-in-picture.

Decor / shapes

Indicator Source What it shows
LineIndicator — A decorative line through the layer: horizontal, vertical, diagonal (two types). Color, thickness, dash pattern.
RectangleIndicator — Rectangle with fill and optional border; supports rounded corners. Most often used as a "background" for texts.
EllipseIndicator — Oval inscribed in a rectangular layer. On a square layer, it is a circle. Fill + border.

Plugin entry point

Class What it does
VelitaskPlagin IPlagin entry point: registers all 11 indicators, declares getDbVersion() = 1 (its own SQLite DB for slope analytics), and when importing a source with a slope sensor, computes slope groups (ascents/descents/flats) through SlopeDetector and saves them into its own slope_groups + slope_atom_groups tables. SlopeText, SlopeChart, and SlopeSpeed depend on these groups.

Internal helpers

Helper classes from the charts/, slope/, and geo/ subpackages. They are not shown in the indicator picker, but they have their own pages in Code/ because they are used in the render logic of the main indicators.

Class Uses What it does
MillimetersChart charts/ mm↔pixels converter for chart indicators (used by SpeedChart, SlopeChart).
SlopeDetector slope/ Streaming aggregator of slope atoms into groups by slope type. Used by VelitaskPlagin.onSourceImported.
SlopeGroup slope/ Mutable accumulator for one slope group; can build a summary SlopeGroupAtom for INSERT into the DB.
SlopeGroupAtom slope/ DTO for a row of the slope_groups table. Mapped by reflection from PluginDatabase.
GeoFigureContext geo/ Base figure context for all geo figures; provides toScreenX/Y for projecting lat/lon into pixels.
GeoPositionFigure geo/ "You are here" marker over GeoMapIndicator.
GeoTrackFigure geo/ Full track as a polyline over GeoMapIndicator.

What is inside Code/

The Code/ folder contains detailed pages for each Java class of the plugin:

  • Full source code with inline /* */ comments explaining each field and method.
  • Purpose — what the class does and who it is for.
  • How it works — three short paragraphs: what data it takes → which settings it accounts for → how it draws.
  • Features and limitations — non-obvious traps that are not visible from the code.

The production source in src/main/java/... is intentionally clean (without JavaDoc or comments) — all descriptions live here in the wiki.

Clone this wiki locally