diff --git a/classes/misc/Wind.m b/classes/misc/Wind.m index e8aa811618e0aed98791655dea1a733ee05e9580..f3eb9a9ae50e9225468ea9dddb03e517aac0b9f6 100644 --- a/classes/misc/Wind.m +++ b/classes/misc/Wind.m @@ -123,6 +123,16 @@ classdef Wind < Config obj@Config(mission, varIn); end + function obj = updateAll(obj) + obj.magnitude = obj.updateDistribution(obj.MAGNITUDE_DISTRIBUTION, obj.MAGNITUDE_PARAMETERS); + obj.azimuth = obj.updateDistribution(obj.AZIMUTH_DISTRIBUTION, obj.AZIMUTH_PARAMETERS); + obj.elevation = obj.updateDistribution(obj.ELEVATION_DISTRIBUTION, obj.ELEVATION_PARAMETERS); + + obj.checks(1) = length(obj.magnitude) == length(obj.ALTITUDES); + obj.checks(2) = length(obj.azimuth) == length(obj.ALTITUDES); + obj.checks(3) = length(obj.elevation) == length(obj.ALTITUDES); + end + function [uw, vw, ww] = getVels(obj, z) if ~all(obj.checks) error(['Parameters and distributions must be the same ' ...