G-Rebels Telemetry for SimHub          Version 1.1.0
(R) 2026 - DannyDan
=====================================================================

Feeds the native telemetry of G-Rebels into SimHub, so motion platforms
and haptic seats work without any extra tool. The plugin runs inside
SimHub: it starts and stops with it and is configured on its own page.

REQUIREMENTS
------------
  - SimHub (current version) on Windows
  - G-Rebels with the telemetry output of the update of 2026-10-27 or
    newer (Options - Input - Peripherals - Telemetry)

INSTALL
-------
  1. Close SimHub and run install.bat. It asks for administrator rights,
     copies the plugin into SimHub and installs the game definition.
  2. Start SimHub and enable "G-Rebels Telemetry" when asked (or under
     Settings - Plugins).
  3. Pick "G Rebels" in the games list.
  4. In the game, under Options - Input - Peripherals - Telemetry:
         Enable Telemetry   On
         Output             Expanded  (recommended)
         IP                 127.0.0.1
         Port               33001
     "SimRacingStudio" as output also works; see below.
  5. Import the profiles from the Profiles folder:
       Motion:   Motion - Profiles - Import, then assign it to the game
                 "G Rebels". It is a starting point, see MOTION below.
       ShakeIt:  optional, for the ERS3 seat: ShakeIt Motors - Profiles -
                 Import.

The plugin page (left menu "G-Rebels") shows the plugin version, the
connection state with the packet rate, the detected output, the craft
and the live attitude and accelerations. The switch in its top right
corner turns the plugin off; it then releases UDP port 33001.

OUTPUT: EXPANDED OR SIMRACINGSTUDIO
-----------------------------------
The plugin detects which output the game sends. Both drive the platform
the same way, so a motion profile made for one works with the other.

                           SimRacingStudio     Expanded
  attitude and speed       yes                 yes
  surge / sway / heave     yes                 yes (derived)
  weapons, hits, crashes   no                  yes

Only Expanded carries the weapon, hit and collision data used by the
ShakeIt profile.

MOTION
------
Motion profiles are bound to the game "G Rebels". The package contains
"G-Rebels - DannyDan - starting point", made on a 6DOF hexapod with
long-stroke actuators. Treat it as a starting point: gains, input ranges
and the axis limits of your own platform will differ, so expect to tune
it. The plugin conditions the signal for a platform with limited travel:
  - interpolates a midpoint when the game sends less than 50 Hz
  - smooths the accelerations
  - sends roll as a tilt cue, which removes the 358 degree jump at
    +-180 degrees during full rolls
  - freezes roll and yaw near vertical, where the game's Euler angles
    swing by hundreds of degrees
  - detects the menu (the game keeps sending one packet) as paused
These options are on the plugin page.

PROPERTIES FOR SHAKEIT AND DASHBOARDS
-------------------------------------
Names as used in SimHub formulas, e.g. $prop('GRebelsPlugin.Weapons.PrimaryImpulse').
Expanded output only; they stay at zero with SimRacingStudio.

  Weapons.PrimaryImpulse, Weapons.SecondaryImpulse
        0..1 pulse on every shot, decaying (0.08 s / 0.25 s)
  Weapons.PrimaryCount, Weapons.SecondaryCount
        shots fired so far
  Impacts.HitImpulse, Impacts.HitStrength, Impacts.HitCount
        hits taken from enemy fire; the pulse scales with the strength
  Impacts.CollisionImpulse, Impacts.CollisionStrength, Impacts.CollisionCount
        collisions; the pulse scales with the magnitude
  Input.Forward, Input.Vertical, Input.Lateral
        thrust inputs, -1 / 0 / +1
  Bridge.Connected, Bridge.InputRateHz, Bridge.Layout, Bridge.GimbalFrames
        state of the bridge
  Expanded.Float04 ... Float18, Expanded.Int13 ... Int16
        every raw value of the Expanded packet, for experiments

TROUBLESHOOTING
---------------
  Nothing arrives ("waiting for the game" on the plugin page)
      - Telemetry must be On in the game, Output Expanded or
        SimRacingStudio, target 127.0.0.1 port 33001.
      - UDP port 33001 must be free. SimRacingStudio or another listener
        on the same port blocks the plugin; close it.
      - The game must be in flight; the menu counts as paused.
      - Game and SimHub on different PCs: enter the SimHub PC's address
        in the game and allow UDP 33001 in the firewall (install.bat can
        add the rule).
  The game tile "G Rebels" is missing in SimHub
      - There must be exactly one definition. Check
        %LOCALAPPDATA%\SimHub\ExternalSims\Definitions: only the flat
        file "G Rebels.simdef", no "G Rebels" subfolder, no copy.
      - Do not edit the definition: SimHub then drops the tile silently.
  Motion feels wrong after switching Output
      - Both outputs are meant to feel identical. If they do not, note
        which axis and report it.

UNINSTALL
---------
Close SimHub, delete GRebelsPlugin.dll from the SimHub folder and
"G Rebels.simdef" and "icon.jpg" from
%LOCALAPPDATA%\SimHub\ExternalSims\Definitions.

CREDITS
-------
The game definition "G Rebels.simdef" (UniqueId 971ee505-...) is from
jkliman/grebels-simhub-telemetry, MIT licensed; the licence text is in
Definition\LICENSE-jkliman.txt. Keeping the same definition keeps the
game code, so existing motion profiles stay bound.
