Skip to content

Commit 817dcb1

Browse files
Sime Fixes + Doc update
1 parent 22f7b91 commit 817dcb1

9 files changed

Lines changed: 58 additions & 59 deletions

File tree

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "cppdbg",
66
"request": "attach",
77
// For other OS replace "lin.xpl" with "win.xpl" or "mac.xpl"
8-
"program": "${config:xplane.folder}/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-HITL/64/lin.xpl",
8+
"program": "${config:xplane.folder}/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-XITL/64/lin.xpl",
99
"processId": "${command:pickProcess}",
1010
// You may want to change the following two lines when using Windows or Mac
1111
"MIMode": "gdb",
@@ -23,7 +23,7 @@
2323
"name": "(gdb) Attach to XPlane - Windows",
2424
"type": "cppdbg",
2525
"request": "attach",
26-
"program": "${config:xplane.folder}\\Aircraft\\Extra Aircraft\\NK_FPVSurfwing\\plugins\\INAV-X-Plane-HITL\\64\\win.xpl",
26+
"program": "${config:xplane.folder}\\Aircraft\\Extra Aircraft\\NK_FPVSurfwing\\plugins\\INAV-X-Plane-XITL\\64\\win.xpl",
2727
"processId": "${command:pickProcess}",
2828
"MIMode": "gdb",
2929
"miDebuggerPath": "c:\\msys64\\ucrt64\\bin\\gdb.exe",

.vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"label": "CMAKE Build Debug - Linux",
77
"type": "shell",
8-
"command": "cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DOUTPUT_DIR=\"${config:xplane.folder}/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-HITL/64/\" ..",
8+
"command": "cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DOUTPUT_DIR=\"${config:xplane.folder}/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-XITL/64/\" ..",
99
"group": "build",
1010
"problemMatcher": [],
1111
"options": {
@@ -15,7 +15,7 @@
1515
{
1616
"label": "CMAKE Build Release - Linux",
1717
"type": "shell",
18-
"command": "cmake -GNinja -DOUTPUT_DIR=\"${config:xplane.folder}/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-HITL/64/\" ..",
18+
"command": "cmake -GNinja -DOUTPUT_DIR=\"${config:xplane.folder}/Aircraft/Extra Aircraft/NK_FPVSurfwing/plugins/INAV-X-Plane-XITL/64/\" ..",
1919
"group": "build",
2020
"problemMatcher": [],
2121
"options": {
@@ -26,7 +26,7 @@
2626
"label": "CMAKE Build Debug - Windows",
2727
"type": "shell",
2828
// For Windows you may need to adjust the OUTPUT_DIR path syntax accordingly (/ vs \) and surround OUTPUT_DIR value with '': -DOUTPUT_DIR='\"path\"'
29-
"command": "cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DOUTPUT_DIR='\"${config:xplane.folder}\\Aircraft\\Extra Aircraft\\NK_FPVSurfwing\\plugins\\INAV-X-Plane-HITL\\64\"' ..",
29+
"command": "cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DOUTPUT_DIR='\"${config:xplane.folder}\\Aircraft\\Extra Aircraft\\NK_FPVSurfwing\\plugins\\INAV-X-Plane-XITL\\64\"' ..",
3030
"group": "build",
3131
"problemMatcher": [],
3232
"options": {
@@ -36,7 +36,7 @@
3636
{
3737
"label": "CMAKE Build Release - Windows",
3838
"type": "shell",
39-
"command": "cmake -GNinja -DOUTPUT_DIR='\"${config:xplane.folder}\\Aircraft\\Extra Aircraft\\NK_FPVSurfwing\\plugins\\INAV-X-Plane-HITL\\64\"' ..",
39+
"command": "cmake -GNinja -DOUTPUT_DIR='\"${config:xplane.folder}\\Aircraft\\Extra Aircraft\\NK_FPVSurfwing\\plugins\\INAV-X-Plane-XITL\\64\"' ..",
4040
"group": "build",
4141
"problemMatcher": [],
4242
"options": {

ReleaseNotes.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
Test Release note. Please ignore.
1+
This the first beta release for INAV XITL.
2+
3+
Please report all bugs and errors under [Issues](https://github.com/Scavanger/INAV-X-Plane-XITL/issues).
4+
5+
### Notes
6+
- Settings from the HITL plugin 1.X will not be transferred.
7+
- Requires INAV 9 with Simulator Interface V3 from https://github.com/Scavanger/INAV-XITL-Firmware
8+
9+
### Upgrading from HITL Plugin 1.X
10+
- Delete folder `X-Plane 11\Aircraft\Extra Aircraft\NK_FPVSurfwing`

doc/nkfpvsufrwing/example-hitl-config.txt

Lines changed: 24 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
2-
3-
# diff all
1+
diff all
42

53
# version
6-
# INAV/SPEEDYBEEF405WING 9.0.0 Dec 29 2025 / 20:29:10 (38a56feb)
4+
# INAV/SPEEDYBEEF405WING 9.0.0 Jan 14 2026 / 21:14:14 (bf801d40)
75
# GCC-13.2.1 20231009
86

97
# start the command batch
@@ -17,8 +15,6 @@ defaults noreboot
1715
# Timer overrides
1816

1917
# Outputs [servo]
20-
servo 1 1000 2000 1500 -100
21-
servo 4 1000 2000 1500 -100
2218

2319
# safehome
2420

@@ -29,10 +25,7 @@ servo 4 1000 2000 1500 -100
2925
# geozone vertices
3026

3127
# features
32-
feature GEOZONE
3328
feature GPS
34-
feature FW_LAUNCH
35-
feature FW_AUTOTRIM
3629

3730
# beeper
3831

@@ -55,9 +48,7 @@ blackbox SERVOS
5548
# Receiver: Channel map
5649

5750
# Ports
58-
serial 0 1 115200 115200 0 115200
5951
serial 1 33554432 115200 115200 0 115200
60-
serial 5 0 115200 115200 0 115200
6152

6253
# LEDs
6354

@@ -73,12 +64,12 @@ aux 3 53 1 1375 1475
7364
aux 4 11 1 1550 1650
7465
aux 5 10 1 1900 2100
7566
aux 6 28 1 1450 1550
76-
aux 7 21 2 1700 2100
77-
aux 8 54 2 900 1300
78-
aux 9 19 3 1625 1875
79-
aux 10 42 3 1125 1375
80-
aux 11 43 3 1375 1625
81-
aux 12 44 3 1875 2100
67+
aux 7 21 3 1700 2100
68+
aux 8 54 3 900 1300
69+
aux 9 19 2 1625 1875
70+
aux 10 42 2 1125 1375
71+
aux 11 43 2 1375 1625
72+
aux 12 44 2 1875 2100
8273

8374
# Adjustments [adjrange]
8475
adjrange 0 0 7 1025 1075 14 6
@@ -116,7 +107,7 @@ osd_layout 0 2 0 0 V
116107
osd_layout 0 3 8 6 V
117108
osd_layout 0 4 8 6 V
118109
osd_layout 0 7 28 15 V
119-
osd_layout 0 9 18 7 V
110+
osd_layout 0 9 17 7 V
120111
osd_layout 0 11 4 17 V
121112
osd_layout 0 12 12 13 H
122113
osd_layout 0 13 17 10 V
@@ -175,6 +166,7 @@ osd_layout 3 75 8 9 V
175166
osd_layout 3 76 21 11 V
176167
osd_layout 3 77 34 10 V
177168
osd_layout 3 85 37 4 V
169+
osd_layout 3 104 0 0 H
178170
osd_layout 3 108 7 4 H
179171
osd_layout 3 109 7 7 H
180172
osd_layout 3 110 22 11 H
@@ -192,10 +184,12 @@ osd_layout 3 118 21 12 V
192184

193185
# master
194186
set gyro_main_lpf_hz = 25
195-
set gyro_zero_x = 3
196-
set gyro_zero_y = -8
197-
set gyro_zero_z = 7
198-
set ins_gravity_cmss = 980.402
187+
set dynamic_gyro_notch_q = 250
188+
set dynamic_gyro_notch_min_hz = 30
189+
set gyro_zero_x = 2
190+
set gyro_zero_y = -11
191+
set gyro_zero_z = 3
192+
set ins_gravity_cmss = 980.680
199193
set gyro_adaptive_filter_min_hz = 20
200194
set acc_hardware = ICM42605
201195
set rangefinder_hardware = FAKE
@@ -206,7 +200,6 @@ set pitot_hardware = VIRTUAL
206200
set receiver_type = SIM (SITL)
207201
set blackbox_rate_denom = 2
208202
set motor_pwm_protocol = STANDARD
209-
set align_board_pitch = 2
210203
set small_angle = 180
211204
set applied_defaults = 3
212205
set airmode_type = STICK_CENTER_ONCE
@@ -219,18 +212,19 @@ set nav_fw_launch_motor_delay = 100
219212
set nav_fw_launch_max_altitude = 5000
220213
set nav_fw_launch_climb_angle = 25
221214
set osd_video_system = DJIWTF
222-
set name = SITL
215+
set osd_failsafe_switch_layout = ON
223216

224217
# control_profile
225218
control_profile 1
226219

227220
set fw_p_pitch = 15
228221
set fw_i_pitch = 5
229222
set fw_d_pitch = 5
230-
set fw_ff_pitch = 80
223+
set fw_ff_pitch = 180
231224
set fw_p_roll = 15
232225
set fw_i_roll = 3
233226
set fw_d_roll = 7
227+
set fw_ff_roll = 190
234228
set fw_p_yaw = 50
235229
set fw_i_yaw = 0
236230
set fw_d_yaw = 20
@@ -244,9 +238,9 @@ set d_boost_min = 1.000
244238
set d_boost_max = 1.000
245239
set rc_expo = 30
246240
set rc_yaw_expo = 30
247-
set roll_rate = 18
248-
set pitch_rate = 9
249-
set yaw_rate = 3
241+
set roll_rate = 53
242+
set pitch_rate = 50
243+
set yaw_rate = 4
250244

251245
# control_profile
252246
control_profile 2
@@ -264,8 +258,7 @@ set fw_d_yaw = 20
264258
set fw_ff_yaw = 255
265259
set dterm_lpf_hz = 10
266260
set fw_turn_assist_pitch_gain = 0.400
267-
set nav_fw_pos_z_p = 25
268-
set nav_fw_pos_z_d = 8
261+
set nav_fw_pos_z_p = 35
269262
set nav_fw_pos_xy_p = 55
270263
set d_boost_min = 1.000
271264
set d_boost_max = 1.000
@@ -291,8 +284,7 @@ set fw_d_yaw = 20
291284
set fw_ff_yaw = 255
292285
set dterm_lpf_hz = 10
293286
set fw_turn_assist_pitch_gain = 0.400
294-
set nav_fw_pos_z_p = 25
295-
set nav_fw_pos_z_d = 8
287+
set nav_fw_pos_z_p = 35
296288
set nav_fw_pos_xy_p = 55
297289
set d_boost_min = 1.000
298290
set d_boost_max = 1.000
@@ -334,7 +326,6 @@ mixer_profile 2
334326
# battery_profile
335327
battery_profile 1
336328

337-
set battery_capacity = 2200
338329
set throttle_idle = 5.000
339330

340331
# battery_profile

doc/nkfpvsufrwing/nkfpvsurfwing.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,18 @@
44

55
![](/aircraft//NK_FPVSurfwing/NK_FPVSW_icon11_thumb.png)
66

7-
A complete preconfigured HITL configuration for INAV 9: [example-hitl-config.txt](example-hitl-config.txt)
7+
A complete preconfigured example HITL configuration for INAV 9: [example-hitl-config.txt](example-hitl-config.txt)
88

99
Modes are configured for the [INAV fixed wing group Open TX Pro Model](https://inavfixedwinggroup.com/guides/transmitter-models/pro-opentx-model-v2/)
1010

1111
## Recommended configuration
1212

13+
Set Airplane/Mixer type to "Airplane (with Tail)", even though it's a fixed-wing aircraft, X-Plane doesn't let us control the control surfaces directly, only roll, pitch and yaw.
14+
1315
For HITL and SITL.
1416

1517
INAV cli comands
1618

17-
### Outputs (servo)
18-
```
19-
servo 1 1000 2000 1500 -100
20-
servo 4 1000 2000 1500 -100
21-
```
22-
2319
### Mixer
2420
```
2521
set platform_type = AIRPLANE
@@ -40,10 +36,11 @@ smix 3 4 2 100 0 -1
4036
set fw_p_pitch = 15
4137
set fw_i_pitch = 5
4238
set fw_d_pitch = 5
43-
set fw_ff_pitch = 80
39+
set fw_ff_pitch = 180
4440
set fw_p_roll = 15
4541
set fw_i_roll = 3
4642
set fw_d_roll = 7
43+
set fw_ff_roll = 190
4744
set fw_p_yaw = 50
4845
set fw_i_yaw = 0
4946
set fw_d_yaw = 20
@@ -57,13 +54,11 @@ set d_boost_min = 1.000
5754
set d_boost_max = 1.000
5855
set rc_expo = 30
5956
set rc_yaw_expo = 30
60-
set roll_rate = 18
61-
set pitch_rate = 9
62-
set yaw_rate = 3
57+
set roll_rate = 53
58+
set pitch_rate = 50
59+
set yaw_rate = 4
6360
```
6461

65-
66-
6762
Modifications applied to original model:
6863
- in order to prevent motor shutdown in inverted fight, an option has been changed to 1: "acf/_inverted_fuel_oil_EQ 1"
6964
- changed motor type to Electric

src/MSP.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace MSPConstants {
2222
static constexpr int MSP_COMM_TIMEOUT_MS = 3000;
2323
static constexpr int MSP_COMM_DEBUG_TIMEOUT_MS = 60000;
2424
static constexpr int JUMBO_FRAME_MIN_SIZE = 255;
25-
static constexpr int RECONNECT_DELAY_MS = 5000;
25+
static constexpr int RECONNECT_DELAY_MS = 10000;
2626
static constexpr int MAX_LINUX_TTY_PORTS = 16; // Max /dev/ttyACMx and /dev/ttyUSBx ports to probe, should be enough for everyone
2727
static constexpr int MAX_WINDOWS_COM_PORTS = 32; // Max COM ports to probe on Windows
2828

@@ -334,7 +334,11 @@ void MSP::disconnect()
334334
{
335335
timeout = this->state == STATE_TIMEOUT;
336336
this->state = STATE_DISCONNECTED;
337-
Plugin()->GetEventBus()->Publish<SimulatorConnectedEventArg>("SimulatorConnected", SimulatorConnectedEventArg(timeout ? ConnectionStatus::DisconnectedTimeout : ConnectionStatus::Disconnected));
337+
auto eventArg = SimulatorConnectedEventArg(
338+
timeout ? ConnectionStatus::DisconnectedTimeout : ConnectionStatus::Disconnected
339+
);
340+
341+
Plugin()->GetEventBus()->Publish<SimulatorConnectedEventArg>("SimulatorConnected", eventArg);
338342
}
339343
}
340344

src/core/EventBus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class SimulatorConnectedEventArg
154154
{
155155
public:
156156
ConnectionStatus status;
157-
157+
158158
SimulatorConnectedEventArg() = default;
159159
SimulatorConnectedEventArg(ConnectionStatus stat) : status(stat) {}
160160
};

src/settings/SettingNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace DefaultSetting
6262
{ SettingsKeys::SETTINGS_GPS_TIMEOUT, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "0") },
6363
{ SettingsKeys::SETTINGS_GPS_GLITCH, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "0") },
6464
{ SettingsKeys::SETTINGS_MAG_FAILURE, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "0") },
65-
{ SettingsKeys::SETTINGS_ATTITUDE_COPY_FROM_XPLANE, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "0") },
65+
{ SettingsKeys::SETTINGS_ATTITUDE_COPY_FROM_XPLANE, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "1") },
6666
{ SettingsKeys::SETTINGS_BATTERY_EMULATION, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "0") },
6767
{ SettingsKeys::SETTINGS_MUTE_BEEPER, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "1") },
6868
{ SettingsKeys::SETTINGS_SIMULATE_PITOT, DefaultSettingKey(SettingsSections::SECTION_SIMDATA, "1") },

src/widgets/SettingsWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void SettingsWindow::loadSettings()
8686
wtfOSFontIndex = 0;
8787
}
8888

89-
copyAttitudeFromXPlane = setting->GetSettingAs<bool>(SettingsSections::SECTION_GENERAL, SettingsKeys::SETTINGS_ATTITUDE_COPY_FROM_XPLANE, true);
89+
copyAttitudeFromXPlane = setting->GetSettingAs<bool>(SettingsSections::SECTION_SIMDATA, SettingsKeys::SETTINGS_ATTITUDE_COPY_FROM_XPLANE, true);
9090
muteBeeper = setting->GetSettingAs<bool>(SettingsSections::SECTION_GENERAL, SettingsKeys::SETTINGS_MUTE_BEEPER, true);
9191
}
9292

@@ -107,7 +107,7 @@ void SettingsWindow::saveSettings()
107107
setting->SetSetting(SettingsSections::SECTION_OSD, SettingsKeys::SETTINGS_AVATAR_OSD_FONT, std::string(avatarFonts[avatarFontIndex]));
108108
setting->SetSetting(SettingsSections::SECTION_OSD, SettingsKeys::SETTINGS_WTFOS_OSD_FONT, std::string(wtfOSFonts[wtfOSFontIndex]));
109109

110-
setting->SetSetting(SettingsSections::SECTION_GENERAL, SettingsKeys::SETTINGS_ATTITUDE_COPY_FROM_XPLANE, copyAttitudeFromXPlane);
110+
setting->SetSetting(SettingsSections::SECTION_SIMDATA, SettingsKeys::SETTINGS_ATTITUDE_COPY_FROM_XPLANE, copyAttitudeFromXPlane);
111111
setting->SetSetting(SettingsSections::SECTION_GENERAL, SettingsKeys::SETTINGS_MUTE_BEEPER, muteBeeper);
112112
setting->SetSetting(SettingsSections::SECTION_GENERAL, SettingsKeys::SETTINGS_RESTART_ON_AIRPORT_LOAD, restartOnAirportLoad);
113113

0 commit comments

Comments
 (0)