Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Arinc429-LVar-Bridge #8631

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
90dc8e0
Initial prototype for the Arinc429-LVar-Bridge
frankkopp Apr 20, 2024
ac16eb4
additional gitignore entries
frankkopp Apr 20, 2024
f8ebe86
Using Arinc conversion
frankkopp Apr 20, 2024
5889741
Moved debug output
frankkopp Apr 20, 2024
9dcc720
Added all A32NX LVars (1767) for performance testing
frankkopp Apr 20, 2024
ca6e733
reorder of check if on to better compare when running
frankkopp Apr 20, 2024
b0fa6b4
reorder some debug lines
frankkopp Apr 20, 2024
84be29a
Renaming of package, folder and classes
frankkopp Apr 21, 2024
251e176
Added reading all LVars from sim - skipping config files
frankkopp Apr 21, 2024
2bf3e92
Cleanup and documentation
frankkopp Apr 22, 2024
9fe6fb9
Added interval for repeated LVar scan, cleanup and documenting
frankkopp Apr 23, 2024
1dda2ea
minor doc correction
frankkopp Apr 23, 2024
5ed92fe
Refactor to use default and configurable work list
frankkopp Apr 24, 2024
a0f82ed
Cleanup and documentation
frankkopp Apr 24, 2024
abac43f
Fix include and documentation
frankkopp Apr 25, 2024
d3a4d3b
Fix github build
frankkopp Apr 26, 2024
b95c763
Refactor build script to avoid code repetition
frankkopp Apr 27, 2024
6c4380c
Improved file handling
frankkopp Apr 28, 2024
7e1ebb9
Added getDataDefinitionVarByName to DataManager
frankkopp Mar 22, 2024
9d7eb64
Cleanup, formatting and commenting
frankkopp Mar 22, 2024
57e7071
Added GTest framework and some initial tests
frankkopp Apr 28, 2024
19c4dd9
Added arinc library and initial unit tests
frankkopp Apr 28, 2024
35d9053
Added arinc library and initial unit tests
frankkopp Apr 28, 2024
11ce6c4
Merged unit tests from cpp-improvement branch
frankkopp Apr 28, 2024
020829d
rebase fix
frankkopp Sep 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,21 @@ large-files/node_modules
!/fbw-ingamepanels-checklist-fix/src/**
/fbw-ingamepanels-checklist-fix/out

# === ARINC LVar Bridge ===
/fbw-arinc429-lvar-bridge/*
!/fbw-arinc429-lvar-bridge/README.md
!/fbw-arinc429-lvar-bridge/docs/
!/fbw-arinc429-lvar-bridge/docs/**
!/fbw-arinc429-lvar-bridge/src/
!/fbw-arinc429-lvar-bridge/src/**
/fbw-arinc429-lvar-bridge/out

# === Tools ===
!/tools/**
/tools/fdr2csv/*.exe
/tools/fdr2csv/build/
/tools/fdr2csv/cmake-build*


# Build scripts
!/scripts/**
!/build-utils.js
Expand All @@ -106,6 +114,8 @@ localazy.keys.json
# build artifacts
node_modules/
target/
out/
build/
obj/
build/
out/
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ add_subdirectory(fbw-a32nx/src/wasm)

# add the A380X components
add_subdirectory(fbw-a380x/src/wasm)

# add the LVarProvider components
add_subdirectory(fbw-arinc429-lvar-bridge/src/wasm)
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ MSFS_CALLBACK bool Gauge_Extra_Backend_gauge_callback([[maybe_unused]] FsContext
return false;
}
}

15 changes: 15 additions & 0 deletions fbw-arinc429-lvar-bridge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# FlyByWire Arinc429 LVar Bridge

The Arinc429 LVar Bridge in the FlyByWire project is a bridge designed to interface
between the Aircraft's data bus protocol (ARINC 429) and local simulation variables (LVars).

As some of these raw values of these LVars might be useful to 3rd parties (e.g. cockpit builder,
3rd party software, etc.) this bridge allows to expose a selected user configurable set of these
arinc429 encoded variables with their raw value as LVars.

## **NOTE**

This is still a proof of concept as there are only few arinc429 encoded variables yet.
Also, it is yet unclear how the naming convention of encoded vs. raw values should be handled.


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
# ADR 1-3
A32NX_ADIRS_ADR_1_ALTITUDE
A32NX_ADIRS_ADR_1_ANGLE_OF_ATTACK
A32NX_ADIRS_ADR_1_BAROMETRIC_VERTICAL_SPEED
A32NX_ADIRS_ADR_1_BARO_CORRECTED_ALTITUDE_1
A32NX_ADIRS_ADR_1_BARO_CORRECTED_ALTITUDE_2
A32NX_ADIRS_ADR_1_BARO_CORRECTION_1_HPA
A32NX_ADIRS_ADR_1_BARO_CORRECTION_1_INHG
A32NX_ADIRS_ADR_1_BARO_CORRECTION_2_HPA
A32NX_ADIRS_ADR_1_BARO_CORRECTION_2_INHG
A32NX_ADIRS_ADR_1_COMPUTED_AIRSPEED
A32NX_ADIRS_ADR_1_CORRECTED_AVERAGE_STATIC_PRESSURE
A32NX_ADIRS_ADR_1_MACH
A32NX_ADIRS_ADR_1_MAX_AIRSPEED
A32NX_ADIRS_ADR_1_STATIC_AIR_TEMPERATURE
A32NX_ADIRS_ADR_1_TOTAL_AIR_TEMPERATURE
A32NX_ADIRS_ADR_1_TRUE_AIRSPEED
A32NX_ADIRS_ADR_2_ALTITUDE
A32NX_ADIRS_ADR_2_ANGLE_OF_ATTACK
A32NX_ADIRS_ADR_2_BAROMETRIC_VERTICAL_SPEED
A32NX_ADIRS_ADR_2_BARO_CORRECTED_ALTITUDE_1
A32NX_ADIRS_ADR_2_BARO_CORRECTED_ALTITUDE_2
A32NX_ADIRS_ADR_2_BARO_CORRECTION_1_HPA
A32NX_ADIRS_ADR_2_BARO_CORRECTION_1_INHG
A32NX_ADIRS_ADR_2_BARO_CORRECTION_2_HPA
A32NX_ADIRS_ADR_2_BARO_CORRECTION_2_INHG
A32NX_ADIRS_ADR_2_COMPUTED_AIRSPEED
A32NX_ADIRS_ADR_2_CORRECTED_AVERAGE_STATIC_PRESSURE
A32NX_ADIRS_ADR_2_MACH
A32NX_ADIRS_ADR_2_MAX_AIRSPEED
A32NX_ADIRS_ADR_2_STATIC_AIR_TEMPERATURE
A32NX_ADIRS_ADR_2_TOTAL_AIR_TEMPERATURE
A32NX_ADIRS_ADR_2_TRUE_AIRSPEED
A32NX_ADIRS_ADR_3_ALTITUDE
A32NX_ADIRS_ADR_3_ANGLE_OF_ATTACK
A32NX_ADIRS_ADR_3_BAROMETRIC_VERTICAL_SPEED
A32NX_ADIRS_ADR_3_BARO_CORRECTED_ALTITUDE_1
A32NX_ADIRS_ADR_3_BARO_CORRECTED_ALTITUDE_2
A32NX_ADIRS_ADR_3_BARO_CORRECTION_1_HPA
A32NX_ADIRS_ADR_3_BARO_CORRECTION_1_INHG
A32NX_ADIRS_ADR_3_BARO_CORRECTION_2_HPA
A32NX_ADIRS_ADR_3_BARO_CORRECTION_2_INHG
A32NX_ADIRS_ADR_3_COMPUTED_AIRSPEED
A32NX_ADIRS_ADR_3_CORRECTED_AVERAGE_STATIC_PRESSURE
A32NX_ADIRS_ADR_3_MACH
A32NX_ADIRS_ADR_3_MAX_AIRSPEED
A32NX_ADIRS_ADR_3_STATIC_AIR_TEMPERATURE
A32NX_ADIRS_ADR_3_TOTAL_AIR_TEMPERATURE
A32NX_ADIRS_ADR_3_TRUE_AIRSPEED

# IR 1-3
A32NX_ADIRS_IR_1_BODY_LATERAL_ACC
A32NX_ADIRS_IR_1_BODY_LONGITUDINAL_ACC
A32NX_ADIRS_IR_1_BODY_NORMAL_ACC
A32NX_ADIRS_IR_1_BODY_PITCH_RATE
A32NX_ADIRS_IR_1_BODY_ROLL_RATE
A32NX_ADIRS_IR_1_BODY_YAW_RATE
A32NX_ADIRS_IR_1_DRIFT_ANGLE
A32NX_ADIRS_IR_1_FLIGHT_PATH_ANGLE
A32NX_ADIRS_IR_1_GROUND_SPEED
A32NX_ADIRS_IR_1_HEADING
A32NX_ADIRS_IR_1_HEADING_RATE
A32NX_ADIRS_IR_1_LATITUDE
A32NX_ADIRS_IR_1_LONGITUDE
A32NX_ADIRS_IR_1_PITCH
A32NX_ADIRS_IR_1_PITCH_ATT_RATE
A32NX_ADIRS_IR_1_ROLL
A32NX_ADIRS_IR_1_ROLL_ATT_RATE
A32NX_ADIRS_IR_1_TRACK
A32NX_ADIRS_IR_1_TRUE_HEADING
A32NX_ADIRS_IR_1_TRUE_TRACK
A32NX_ADIRS_IR_1_VERTICAL_SPEED
A32NX_ADIRS_IR_1_WIND_DIRECTION
A32NX_ADIRS_IR_1_WIND_DIRECTION_BNR
A32NX_ADIRS_IR_1_WIND_SPEED
A32NX_ADIRS_IR_1_WIND_SPEED_BNR
A32NX_ADIRS_IR_2_BODY_LATERAL_ACC
A32NX_ADIRS_IR_2_BODY_LONGITUDINAL_ACC
A32NX_ADIRS_IR_2_BODY_NORMAL_ACC
A32NX_ADIRS_IR_2_BODY_PITCH_RATE
A32NX_ADIRS_IR_2_BODY_ROLL_RATE
A32NX_ADIRS_IR_2_BODY_YAW_RATE
A32NX_ADIRS_IR_2_DRIFT_ANGLE
A32NX_ADIRS_IR_2_FLIGHT_PATH_ANGLE
A32NX_ADIRS_IR_2_GROUND_SPEED
A32NX_ADIRS_IR_2_HEADING
A32NX_ADIRS_IR_2_HEADING_RATE
A32NX_ADIRS_IR_2_LATITUDE
A32NX_ADIRS_IR_2_LONGITUDE
A32NX_ADIRS_IR_2_PITCH
A32NX_ADIRS_IR_2_PITCH_ATT_RATE
A32NX_ADIRS_IR_2_ROLL
A32NX_ADIRS_IR_2_ROLL_ATT_RATE
A32NX_ADIRS_IR_2_TRACK
A32NX_ADIRS_IR_2_TRUE_HEADING
A32NX_ADIRS_IR_2_TRUE_TRACK
A32NX_ADIRS_IR_2_VERTICAL_SPEED
A32NX_ADIRS_IR_2_WIND_DIRECTION
A32NX_ADIRS_IR_2_WIND_DIRECTION_BNR
A32NX_ADIRS_IR_2_WIND_SPEED
A32NX_ADIRS_IR_2_WIND_SPEED_BNR
A32NX_ADIRS_IR_3_BODY_LATERAL_ACC
A32NX_ADIRS_IR_3_BODY_LONGITUDINAL_ACC
A32NX_ADIRS_IR_3_BODY_NORMAL_ACC
A32NX_ADIRS_IR_3_BODY_PITCH_RATE
A32NX_ADIRS_IR_3_BODY_ROLL_RATE
A32NX_ADIRS_IR_3_BODY_YAW_RATE
A32NX_ADIRS_IR_3_DRIFT_ANGLE
A32NX_ADIRS_IR_3_FLIGHT_PATH_ANGLE
A32NX_ADIRS_IR_3_GROUND_SPEED
A32NX_ADIRS_IR_3_HEADING
A32NX_ADIRS_IR_3_HEADING_RATE
A32NX_ADIRS_IR_3_LATITUDE
A32NX_ADIRS_IR_3_LONGITUDE
A32NX_ADIRS_IR_3_PITCH
A32NX_ADIRS_IR_3_PITCH_ATT_RATE
A32NX_ADIRS_IR_3_ROLL
A32NX_ADIRS_IR_3_ROLL_ATT_RATE
A32NX_ADIRS_IR_3_TRACK
A32NX_ADIRS_IR_3_TRUE_HEADING
A32NX_ADIRS_IR_3_TRUE_TRACK
A32NX_ADIRS_IR_3_VERTICAL_SPEED
A32NX_ADIRS_IR_3_WIND_DIRECTION
A32NX_ADIRS_IR_3_WIND_DIRECTION_BNR
A32NX_ADIRS_IR_3_WIND_SPEED
A32NX_ADIRS_IR_3_WIND_SPEED_BNR

# APU
A32NX_APU_EGT
A32NX_APU_EGT_CAUTION
A32NX_APU_EGT_WARNING
A32NX_APU_FLAP_FULLY_OPEN
A32NX_APU_LOW_FUEL_PRESSURE_FAULT
A32NX_APU_N

# FCDC 1-2
A32NX_FCDC_1_AILERON_LEFT_POS
A32NX_FCDC_1_AILERON_RIGHT_POS
A32NX_FCDC_1_CAPT_PITCH_COMMAND
A32NX_FCDC_1_CAPT_ROLL_COMMAND
A32NX_FCDC_1_ELEVATOR_LEFT_POS
A32NX_FCDC_1_ELEVATOR_RIGHT_POS
A32NX_FCDC_1_ELEVATOR_TRIM_POS
A32NX_FCDC_1_FO_PITCH_COMMAND
A32NX_FCDC_1_FO_ROLL_COMMAND
A32NX_FCDC_1_RUDDER_PEDAL_POS
A32NX_FCDC_1_SPOILER_LEFT_1_POS
A32NX_FCDC_1_SPOILER_LEFT_2_POS
A32NX_FCDC_1_SPOILER_LEFT_3_POS
A32NX_FCDC_1_SPOILER_LEFT_4_POS
A32NX_FCDC_1_SPOILER_LEFT_5_POS
A32NX_FCDC_1_SPOILER_RIGHT_1_POS
A32NX_FCDC_1_SPOILER_RIGHT_2_POS
A32NX_FCDC_1_SPOILER_RIGHT_3_POS
A32NX_FCDC_1_SPOILER_RIGHT_4_POS
A32NX_FCDC_1_SPOILER_RIGHT_5_POS
A32NX_FCDC_2_AILERON_LEFT_POS
A32NX_FCDC_2_AILERON_RIGHT_POS
A32NX_FCDC_2_CAPT_PITCH_COMMAND
A32NX_FCDC_2_CAPT_ROLL_COMMAND
A32NX_FCDC_2_ELEVATOR_LEFT_POS
A32NX_FCDC_2_ELEVATOR_RIGHT_POS
A32NX_FCDC_2_ELEVATOR_TRIM_POS
A32NX_FCDC_2_FO_PITCH_COMMAND
A32NX_FCDC_2_FO_ROLL_COMMAND
A32NX_FCDC_2_RUDDER_PEDAL_POS
A32NX_FCDC_2_SPOILER_LEFT_1_POS
A32NX_FCDC_2_SPOILER_LEFT_2_POS
A32NX_FCDC_2_SPOILER_LEFT_3_POS
A32NX_FCDC_2_SPOILER_LEFT_4_POS
A32NX_FCDC_2_SPOILER_LEFT_5_POS
A32NX_FCDC_2_SPOILER_RIGHT_1_POS
A32NX_FCDC_2_SPOILER_RIGHT_2_POS
A32NX_FCDC_2_SPOILER_RIGHT_3_POS
A32NX_FCDC_2_SPOILER_RIGHT_4_POS
A32NX_FCDC_2_SPOILER_RIGHT_5_POS

# FM 1-2
A32NX_FM1_DECISION_HEIGHT
A32NX_FM1_MINIMUM_DESCENT_ALTITUDE
A32NX_FM1_TRANS_ALT
A32NX_FM1_TRANS_LVL
A32NX_FM1_DEST_LAT
A32NX_FM1_DEST_LONG
A32NX_FM1_TO_PITCH_TRIM
A32NX_FM2_DECISION_HEIGHT
A32NX_FM2_MINIMUM_DESCENT_ALTITUDE
A32NX_FM2_TRANS_ALT
A32NX_FM2_TRANS_LVL
A32NX_FM2_DEST_LAT
A32NX_FM2_DEST_LONG
A32NX_FM2_TO_PITCH_TRIM

# PRESS CPC 1-2
A32NX_PRESS_CPC_1_CABIN_ALTITUDE
A32NX_PRESS_CPC_1_CABIN_DELTA_PRESSURE
A32NX_PRESS_CPC_1_CABIN_VS
A32NX_PRESS_CPC_1_LANDING_ELEVATION
A32NX_PRESS_CPC_1_OUTFLOW_VALVE_OPEN_PERCENTAGE
A32NX_PRESS_CPC_2_CABIN_ALTITUDE
A32NX_PRESS_CPC_2_CABIN_DELTA_PRESSURE
A32NX_PRESS_CPC_2_CABIN_VS
A32NX_PRESS_CPC_2_LANDING_ELEVATION
A32NX_PRESS_CPC_2_OUTFLOW_VALVE_OPEN_PERCENTAGE

# RA 1-2
A32NX_RA_1_RADIO_ALTITUDE
A32NX_RA_2_RADIO_ALTITUDE

# FAC 1-2
A32NX_FAC_1_SIDESLIP_TARGET
A32NX_FAC_1_ESTIMATED_SIDESLIP
A32NX_FAC_1_V_ALPHA_LIM
A32NX_FAC_1_V_LS
A32NX_FAC_1_V_STALL_1G
A32NX_FAC_1_V_ALPHA_PROT
A32NX_FAC_1_V_STALL_WARN
A32NX_FAC_1_SPEED_TREND
A32NX_FAC_1_V_3
A32NX_FAC_1_V_3
A32NX_FAC_1_V_MAN
A32NX_FAC_1_V_MAX
A32NX_FAC_1_V_FE_NEXT
A32NX_FAC_2_SIDESLIP_TARGET
A32NX_FAC_2_ESTIMATED_SIDESLIP
A32NX_FAC_2_V_ALPHA_LIM
A32NX_FAC_2_V_LS
A32NX_FAC_2_V_STALL_1G
A32NX_FAC_2_V_ALPHA_PROT
A32NX_FAC_2_V_STALL_WARN
A32NX_FAC_2_SPEED_TREND
A32NX_FAC_2_V_3
A32NX_FAC_2_V_3
A32NX_FAC_2_V_MAN
A32NX_FAC_2_V_MAX
A32NX_FAC_2_V_FE_NEXT
15 changes: 15 additions & 0 deletions fbw-arinc429-lvar-bridge/src/base/manifest-base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"creator": "FlyByWire Simulations",
"release_notes": {
"neutral": {
"LastUpdate": "",
"OlderHistory": ""
}
},
"title": "FlyByWire Arinc429 LVar Bridge",
"dependencies": [],
"content_type": "MISC",
"minimum_game_version": "1.36.2",
"manufacturer": "FlyByWire Simulations",
"package_version": "0.1.0"
}
8 changes: 8 additions & 0 deletions fbw-arinc429-lvar-bridge/src/wasm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# folder structure
set(OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../out/flybywire-arinc429-lvar-bridge/modules)

# add compiler definitions
#add_definitions()

add_subdirectory(arinc429-lvar-bridge)

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# fbw-arinc429-lvar-bridge CMakeLists.txt

# add additional compiler definitions for the a32nx extra-backend build
#add_definitions()

# add the local include directories
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src
${FBW_COMMON}/cpp-msfs-framework/
)

# define the source files
set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/Arinc429LVarBridge.cpp
src/Arinc429LvarConverter.cpp
)

set(INCLUDE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/Arinc429LVarBridge.h
src/Arinc429LvarConverter.h
)

# create the targets
add_library(fbw-arinc429-lvar-bridge OBJECT ${SOURCE_FILES} ${INCLUDE_FILES})
add_wasm_library(
NAME fbw-arinc429-lvar-bridge
DEPENDENCIES fbw-arinc429-lvar-bridge cpp-msfs-framework-lvar-provider
)
Loading
Loading