platformPoses
Syntax
Description
specifies the coordinate system of the poses
= platformPoses(___,'CoordinateSystem',coordinateSystem
)poses
output argument. You can
use this syntax only when the IsEarthCentered
property of the radar
scenario is set to true
.
Examples
Get Pose of Platforms in Radar Scenario
Create a radar scenario.
rs = radarScenario;
Add a platform to the scenario.
plat = platform(rs); plat.Trajectory.Position = [1 1 0]; plat.Trajectory.Orientation = quaternion([90 0 0],'eulerd','ZYX','frame');
Extract the pose of the platform from the radar scenario.
poses = platformPoses(rs)
poses = struct with fields:
PlatformID: 1
ClassID: 0
Position: [1 1 0]
Velocity: [0 0 0]
Acceleration: [0 0 0]
Orientation: [1x1 quaternion]
AngularVelocity: [0 0 0]
Get Platform Orientation in Matrix Format
Create a radar scenario.
rs = radarScenario;
Add a platform to the scenario.
plat = platform(rs); plat.Trajectory.Position = [1 1 0]; plat.Trajectory.Orientation = quaternion([90 0 0],'eulerd','ZYX','frame');
Extract the pose orientation in matrix format.
poses = platformPoses(rs,'rotmat');
poses.Orientation
ans = 3×3
0.0000 1.0000 0
-1.0000 0.0000 0
0 0 1.0000
Input Arguments
scenario
— Radar scenario
radarScenario
object
Radar scenario, specified as a radarScenario
object.
format
— Pose orientation format
'quaternion'
(default) | 'rotmat'
Pose orientation format, specified as 'quaternion'
or
'rotmat'
. When specified as 'quaternion'
, the
Orientation
field of the platform pose structure is a quaternion.
When specified as 'rotmat'
, the Orientation
field
is a rotation matrix.
Data Types: char
| string
coordinateSystem
— Coordinate system
'Cartesian'
(default) | 'Geodetic'
Coordinate system in which the function reports poses, specified as one of these values:
'Cartesian'
— Report poses using Cartesian coordinates in the Earth-Centered-Earth-Fixed coordinate frame.'Geodetic'
— Report positions using geodetic coordinates (latitude, longitude, and altitude). Report orientation, velocity, and acceleration in the local reference frame of each platform (North-East-Down by default) corresponding to the current waypoint.
Specify this argument only when the IsEarthCentered
property of
the radar scenario, scenario
, is set to
true
.
Data Types: char
| string
Output Arguments
poses
— Platform poses in scenario coordinates
structure | array of structures
Poses of all platforms in the radar scenario, returned as a structure or an array of structures. Each structure contains these fields.
Field | Description |
---|---|
PlatformID | Unique identifier for the platform, specified as a positive integer. This is a required field with no default value. |
ClassID | User-defined integer used to classify the type of target, specified as a nonnegative integer. Zero is reserved for unclassified platform types and is the default value. |
Position | Position of target in scenario coordinates, specified as a real-valued 1-by-3 row vector.
|
Velocity | Velocity of platform in scenario coordinates, specified as a real-valued 1-by-3 row
vector. Units are meters per second. The default value is |
Acceleration | Acceleration of the platform in scenario coordinates, specified as a
1-by-3 row vector in meters per second squared. The default value is
|
Orientation | Orientation of the platform with respect to the local scenario navigation frame,
specified as a scalar quaternion or a 3-by-3 rotation matrix. Orientation
defines the frame rotation from the local navigation coordinate system to
the current platform body coordinate system. Units are dimensionless. The
default value is |
AngularVelocity | Angular velocity of the platform in scenario coordinates, specified as a real-valued
1-by-3 vector. The magnitude of the vector defines the angular speed. The
direction defines the axis of clockwise rotation. Units are degrees per
second. The default value is |
Data Types: struct
Version History
Introduced in R2021a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)