How to measure roll, pitch with transform sensor

12 views (last 30 days)
It seems that there is a problem with measuring roll and pitch using the Transform Sensor block. The first image shows the sensor model measuring the Roll, Pitch, and Yaw angles, while the second image shows a model receiving data in the scope and outputting the last value. However, it appears that only the yaw angle is being measured. Is the Transform Sensor block supposed to support only yaw angle measurements, or could it be a problem with the parameter settings that I might have set incorrectly?

Answers (1)

Angelo Yeo
Angelo Yeo on 6 Feb 2024
You can directly measure Euler angles from Transform Sensor block as the image below. See the attached model.
I need your model in order to precisely understand what is done in your MATLAB Function block, though. In the image you provided it looks like that a value output from the Transform Sensor block is got processed by MATLAB Function blocks. It's not clear how the parameter for the constant block, which inputs into the MATLAB Function block, has been configured—possibly through code using the Scope block's name. This requires caution since it may involve using results from a previous simulation. It's also advisable to check if the Transform Sensor's output varies with the measurement frame selection. The exact cause of any issues cannot be determined without examining the model.

Categories

Find more on Simulation and Analysis in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!