InputRcNorm Module Documentation¶
Toolbox: RflySim APIs

Introduction¶
One-sentence description: Normalizes raw remote controller input signals and outputs standardized four-channel remote control signals.
This module is a functional component in the RflySim APIs toolbox for preprocessing remote control signals. It maps the raw channel data read from the remote controller to a specified standard range, satisfying the requirement for standardized remote control commands in UAV flight controller development. Within the RflySim toolchain, this module is typically used together with the remote controller input reading module to provide well-conditioned control commands for custom UAV flight control algorithms. The four output channels—roll, pitch, throttle, and yaw—can be directly connected to the PX4 simulation framework or custom flight control logic, and can also be used with CopterSim and RflySim3D for simulation validation. The throttle channel output range can be flexibly configured according to the UAV control protocol.
Port Descriptions¶
Input Ports (Inputs)¶
This module has no input ports.
Output Ports (Outputs)¶
| Port Name | Data Type | Dimension | Description |
|---|---|---|---|
CH1 |
double |
1×1 |
Roll channel normalized output, fixed range -1 to 1; 1 indicates the UAV flying to the far right |
CH2 |
double |
1×1 |
Pitch channel normalized output, fixed range -1 to 1; 1 indicates the UAV flying to the far bottom |
CH3 |
double |
1×1 |
Throttle channel normalized output, range configurable as 0~1 or -1~1 via parameters; 1 indicates the UAV flying to the far top |
CH4 |
double |
1×1 |
Yaw channel normalized output, fixed range -1 to 1; 1 indicates the UAV rotating to the right |
Parameter Configuration (Parameters)¶
The following parameters can be configured in the Mask dialog box opened by double-clicking the module:
| Parameter Name | Type | Default Value | Available Values / Range | Description |
|---|---|---|---|---|
CH3 range type |
enum |
[0,1] |
[0,1], [-1,1] |
Configures the output range of throttle channel CH3 |
Sample Time(s) |
double |
0.01 |
>0 |
Module sampling time |
Parameter Setting Description¶
CH3 range type¶
This parameter selects the normalized output range of the throttle channel CH3: when [0,1] is selected, CH3 outputs in the range 0~1; when [-1,1] is selected, CH3 outputs in the range -1~1, accommodating different throttle input range requirements of various flight control architectures.
Sample Time(s)¶
This parameter configures the module’s sampling time in seconds. Generally, it should match the flight control simulation step size.
Module Characteristics (Block Characteristics)¶
| Characteristic | Value |
|---|---|
| Supported Data Types | double, single |
| Direct Feedthrough | Yes |
| Sample Time | Discrete |
| Code Generation Support | No |
Data Communication Protocol¶
This module does not involve network communication.
Related Modules¶
| Module Name | Description |
|---|---|
UDP Receive RC |
Receives raw remote controller input data from a UDP port |
Joystick Input |
Reads input signals from local joystick sticks |
PX4 Offboard Control |
Uses normalized remote control outputs for UAV offboard mode control |
Usage Example¶
For related usage examples, refer to the following path:
Please refer to
Readme.pdfin the above path for complete example descriptions and operational steps.
Notes and Common Issues¶
- Initialization Order: This module relies on the underlying remote controller input driver of the RflySim platform for raw data acquisition. Ensure the underlying input service is properly started before simulation begins. If the service is not running, the module outputs will all be zero. Launch the corresponding input service in the RflySim toolchain before starting the Simulink simulation.
- Sample Time Matching: If the normalized signals output by this module are connected to the flight control control law loop, ensure the
Sample Time(s)setting of this module matches the sampling time of the control law loop to avoid remote control response delays or control signal jitter caused by asynchronous sampling. - Channel Polarity Note: For the pitch channel CH2 output by this module, 1 corresponds to the aircraft flying to the far bottom, consistent with the native PX4 remote channel polarity definition. If your flight control project uses opposite polarity definitions, apply a negative sign to the CH2 output before connecting it to the control logic.
- CH3 Output Range Matching: For fixed-wing flight control or multi-rotor altitude-hold mode, it is recommended to select the
[0,1]range to align with throttle logic. For architectures requiring full manual throttle up/down control, the[-1,1]range may be selected. Configure the corresponding parameter in advance based on your flight control requirements to avoid throttle control anomalies due to output range mismatch. - Raw Input Range Limitation: By default, this module assumes the raw remote controller input signal is a standard PWM signal in the range 1000~2000 µs. If your remote controller’s output range deviates from this standard, the normalized output may exceed the expected ranges of [-1,1]/[0,1]. Calibrate your remote controller’s output range before using this module.
Changelog¶
v4.10(2024-08-07): Initial release. Implements remote controller signal normalization, supporting mapping of remote channel data to specified output ranges, with configurable output range and sampling time parameters.