Skip to content

Conversation

@Scavanger
Copy link
Contributor

@Scavanger Scavanger commented Jan 16, 2026

User description

New features for X-Plane HITL/SITL, mainly for use with https://github.com/Scavanger/INAV-X-Plane-XITL

HITL

  • Option to use the simulator joystick as a receiver
  • RSSI and failsafe
  • Current sensor
  • Rangefinder

SITL
Improved communication, only set simulator values via X-Plane DataRefs, no a mix with MSP.

Should not break compatibility with HITL Plugin 1.X or with "raw" X-Plane.


PR Type

Enhancement, New Feature


Description

This description is generated by an AI tool. It may have inaccuracies

  • Add support for X-Plane INAV-XITL plugin with DataRef-based communication for SITL/HITL modes

  • Implement new simulator features: RC input from joystick, RSSI, failsafe, current sensor, rangefinder

  • Refactor simulator MSP protocol to support version 3 with extended sensor data and SITL-specific handling

  • Add connection state management and dynamic DREF registration for X-Plane plugin detection

  • Support battery voltage/current, magnetometer, and RC failsafe simulation via X-Plane DREFs


Diagram Walkthrough

flowchart LR
  XPlane["X-Plane Simulator"]
  Plugin["INAV-XITL Plugin"]
  DREFs["DataRef Communication"]
  MSP["MSP Protocol V3"]
  INAV["INAV FC"]
  
  XPlane -->|DREFs| Plugin
  Plugin -->|Sensor Data| DREFs
  DREFs -->|Read/Write| INAV
  INAV -->|MSP Commands| MSP
  MSP -->|Control Output| XPlane
  
  DREFs -->|RC Input| INAV
  DREFs -->|Battery/Current| INAV
  DREFs -->|Rangefinder| INAV
  DREFs -->|Failsafe| INAV
Loading

File Walkthrough

Relevant files
Enhancement
9 files
fc_msp.c
Refactor simulator MSP protocol to support V3                       
+217/-178
runtime_config.c
Add current and rangefinder to simulator data                       
+3/-1     
runtime_config.h
Define MSP V3 and new HITL feature flags                                 
+14/-2   
displayport_msp_osd.c
Enable OSD in SITL mode via HITL flag                                       
+2/-0     
sim.c
Add failsafe support to RC simulator                                         
+11/-1   
sim.h
Add failsafe setter function signature                                     
+2/-1     
battery.c
Integrate simulated current sensor data                                   
+6/-0     
xplane.c
Implement INAV-XITL plugin connection and DREFs                   
+499/-264
xplane.h
Add stdbool include for xplane header                                       
+1/-0     
Bug fix
1 files
navigation_pos_estimator.c
Fix GPS velocity handling for HITL mode                                   
+1/-1     
Configuration changes
2 files
target.h
Move RX_SIM and RANGEFINDER_FAKE to common                             
+0/-2     
common.h
Enable RX_SIM and RANGEFINDER_FAKE globally                           
+2/-0     
Documentation
3 files
SITL.md
Add reference to INAV-X-Plane-XITL plugin                               
+1/-1     
X-Plane.md
Document INAV-XITL plugin for advanced features                   
+3/-0     
Hardware In The Loop (HITL) plugin for X-Plane.md
Add INAV-XITL plugin documentation link                                   
+6/-0     

@github-actions
Copy link

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 16, 2026

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@Scavanger Scavanger changed the title HILT/SITL X-Plane: Improvments HITL/SITL X-Plane: Improvements Jan 16, 2026
@Scavanger Scavanger changed the base branch from master to maintenance-9.x January 17, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant