Skip to content

User JSON GForceTextIndicator

roosit edited this page Nov 15, 2026 · 1 revision

G-force Text JSON

Back to list | Indicator page | Русский

Purpose

This page describes the JSON template of the gforceText indicator for manual editing of .vttp: which fields exist and which values are allowed.

Full Template

{
  "name": "com.velitask.plagin.official.gforceText",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "GForce": {},
      "font": {"name":"Dialog","style":0,"size":48,"color":{"r":255,"g":255,"b":255,"a":255}},
      "textAlign": {"value":4},
      "measurement": {"system":{"value":0},"format":{"value":0},"acceleration":{"value":0}},
      "textTemplate": {"template":"{total} {unit}","vars":{"total":"%.2f","longitudinal":"%.2f","lateral":"%.2f","peak":"%.2f","unit":"%s"}},
      "pause": {"value":0}
    }
  }
}

Settings

GForce

Chooses the G-force sensor the values are taken from.

{
  "GForce": {}
}
Field Values What it does
sourceId {"value": number} The source identifier in the project. Absent in a template.
sensorId {"value": number} The sensor identifier in the source. Absent in a template.

In a template, leave an empty object {}: the source and sensor will be picked when the indicator is added to a project.

font

Changes the font, style, size and color of the text.

{
  "font": {"name":"Dialog","style":0,"size":48,"color":{"r":255,"g":255,"b":255,"a":255}}
}
Field Values What it does
name string, the font name; Dialog by default The font family.
style 0, 1, 2 Style: 0 plain, 1 bold, 2 italic.
size integer 1..999; 48 by default The font size; it is recalculated proportionally when the layer is scaled.
color object r, g, b, a The text color, see below.

color

Field Values What it does
r 0..255 Red channel.
g 0..255 Green channel.
b 0..255 Blue channel.
a 0..255 Transparency: 0 is fully transparent, 255 is opaque.

textAlign

Chooses the position of the text inside the layer.

{
  "textAlign": {"value":4}
}
Field Values What it does
value integer 0..8; 4 by default The number of the text position.
value Text position
0 top left
1 top center
2 top right
3 vertically centered, left
4 centered (default)
5 vertically centered, right
6 bottom left
7 bottom center
8 bottom right

A value outside the range 0..8 is treated as 3 (vertically centered, left).

measurement

The measurement system, the unit caption format and the acceleration unit ("Units").

{
  "measurement": {"system":{"value":0},"format":{"value":0},"acceleration":{"value":0}}
}
Field Values What it does
system.value 0..4 The measurement system.
format.value 0..3 The unit caption format.
acceleration.value 0, 1 The acceleration unit.
system.value System
0 From global settings (default)
1 Metric
2 Imperial
3 Nautical
4 Mixed
format.value Caption format
0 Full
1 Normal
2 Short
3 Symbol
acceleration.value Unit
0 g
1 m/s²

With system 0 the acceleration field is not used: the unit is taken from the general application settings. If you set system 1-3, keep acceleration equal to 0 (g): with another value the system switches to "Mixed".

textTemplate

Sets the G-force text: the total value, the longitudinal and lateral components, the peak and the unit caption.

{
  "textTemplate": {"template":"{total} {unit}","vars":{"total":"%.2f","longitudinal":"%.2f","lateral":"%.2f","peak":"%.2f","unit":"%s"}}
}
Field Values What it does
template string The resulting text with variables in curly braces.
vars object The variable formats: the key is the variable name without braces, the value is the format.

Template variables

Variable Default format What it shows
{total} %.2f The total G-force: the overall magnitude over all components in the chosen unit.
{longitudinal} %.2f The longitudinal component (acceleration and braking) in the chosen unit; can be negative.
{lateral} %.2f The lateral component (turns) in the chosen unit; can be negative.
{peak} %.2f The largest G-force (over the longitudinal and lateral components) from the start of the recording to the current frame, in the chosen unit.
{unit} %s The caption of the acceleration unit (g or m/s²); depends on the "Units" settings.

For the numeric variables the format is applied to a fractional number: %.1f, %.0f, %.2f and the like are allowed. The %d format does not fit: the variable will be replaced with an empty string. For {unit} use %s.

The "Compact" skin replaces template with {total}; the vars fields stay the same.

pause

What to show when the frame falls into a recording pause ("During a pause").

{
  "pause": {"value":0}
}
Field Values What it does
value 0, 1 The option index.
value Option
0 Center and dash (default): "—" is output instead of the text, the template is not applied.
1 Last value: the template substitutes the values that were before the pause.

Clone this wiki locally