windVelocity
Description
Examples
Generate Wind in UAV Scenario
Create a UAV scenario and platform. Specify a trajectory to fly the platform 5 meters north of the scenario origin at an altitude of 50 meters.
scene = uavScenario;
platformTrajectory = waypointTrajectory([0 0 -50; 5 0 -50],[0 1]);
platform = uavPlatform("UAV",scene,Trajectory=platformTrajectory);
Create a steady wind object with default properties.
steadyWind = uavWindSteady
steadyWind = uavWindSteady with properties: Velocity: [3.5000 3.5000 5] StartTime: 0 StopTime: Inf
Create a wind gust object with default properties.
gustWind = uavWindGust
gustWind = uavWindGust with properties: GustAmplitude: [3.5000 3.5000 5] GustLength: [120 120 80] StartTime: 0 StopTime: Inf
Create a turbulence wind object with default properties.
turbulenceWind = uavWindTurbulence
turbulenceWind = uavWindTurbulence with properties: Specification: "MIL-F-8785C" ModelType: "Von Karman (+q +r)" WindSpeedAt6m: 15 WindDirectionAt6m: 0 ProbExceedanceHighAltitudeIntensity: "10^-2 - Light" ScaleLengthAtMediumHighAltitude: 762 Wingspan: 10 BandLimitedNoiseSampleTime: 0.1000 RandomNoiseSeeds: [23341 23342 23343 23344] StartTime: 0 StopTime: Inf
Add the wind objects to the UAV platform.
addWind(platform,{steadyWind gustWind turbulenceWind})
Set up the simulation, and advance the scene.
setup(scene) advance(scene);
Obtain the translational wind velocity on the UAV platform.
velocityWind = windVelocity(platform)
velocityWind = 1×3
3.5753 3.0892 4.5805
Obtain the angular wind velocity on the UAV platform.
angularVelocityWind = windAngularRate(platform)
angularVelocityWind = 1×3
-0.0484 -0.0323 -0.0419
Input Arguments
platform
— UAV platform
uavPlatform
handle
UAV platform, specified as a uavPlatform
object
ID
— Wind model object identifier
positive integer | vector of positive integers
Wind model object identifier, specified as a positive integers in the range [1,
N], where N is the number of wind model objects
that have been added to the platform. You can use the windDetails
function to see how many wind model objects have been added to the UAV platform
platform
.
Example: windVelocity(platform,[1 2])
returns the wind velocity of
the first and second wind models added to platform
.
Output Arguments
VWind
— Translational wind velocity
K-by-3 matrix
Translational wind velocity in the UAV platform body frame, returned as a
K-by-3 matrix. K is the number of elements
specified in ID
. Each row contains the wind translational velocity
from the corresponding element of ID
in the form
[uw
vw
ww]. The values of
uw,
vw, and
ww are the translational wind velocities in
the positive x
-, y
-, and
z
-axes, respectively. Units are in m/s.
Version History
Introduced in R2024a
See Also
Functions
Objects
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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)