Engee documentation

Ardupilot TX

Page in progress.

Sending sensor data to the autopilot.

blockType: EngeeFunction

Path in the library:

/Interfaces/Ardupilot/Ardupilot TX

Description

To work with the block, install/update the support package. equipment.

Block Ardupilot TX sends the sensor data frame calculated by the model to the Ardupilot autopilot via the UDP bridge created by the block Ardupilot Setup (the descriptor is fed to the conn input).

The data is fed to the tx_data input by a single bus with the following fields:

  • t — model time, with;

  • gyro — angular velocities, rad/s;

  • accel — accelerations in the associated coordinate system, m/s 2;

  • position — position in the NED coordinate system, m;

  • attitude — orientation angles, rad;

  • velocity — speed in the NED coordinate system, m/s.

All fields except t, are vectors; their length is set by the parameter Data dimension:.

A frame is sent at each step of the calculation without waiting for a response. The exchange is synchronized (lockstep): Ardupilot sends the next PWM frame only after receiving the next sensor frame, so the blocks Ardupilot TX and Ardupilot RX The models must operate at the same step rate corresponding to the autopilot cycle frequency.

Ports

Input

# conn — connection descriptor
scalar

Details
Data types

Float64

Complex numbers support

No

# tx_data — sensor data
the tire

Details
Data types

BusType

Complex numbers support

No

Parameters

Параметры моделирования

# Размерность данных: — the length of vectors with sensor data in the bus

Details
Default value

3

Program usage name

m_sens_dim

Tunable

No

Evaluatable

Yes

# Шаг расчёта, с: — block calculation step

Details
Default value

-1

Program usage name

m_sample_time

Tunable

No

Evaluatable

Yes