-
Notifications
You must be signed in to change notification settings - Fork 1
/
AtmosphereFactory.m
31 lines (27 loc) · 946 Bytes
/
AtmosphereFactory.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
classdef AtmosphereFactory < Factory
properties (Constant, Access = protected)
defaults = {'GRAM', @nasa.AtmosphereGRAM, 'FastGRAM', @nasa.AtmosphereFastGRAM, 'MSIS', @AtmosphereMSIS, 'COESA', @AtmosphereCOESA, 'Std76', @AtmosphereStd76, 'Wind', @nasa.AtmosphereWindGRAM, 'WindGRAM', @nasa.AtmosphereWindGRAM};
exception = 'Unkown atmosphere model provided';
end
methods
function self = AtmosphereFactory(varargin)
self@Factory(varargin);
end
function at = generate(self, model, dateandtime)
% atmosphere := 'atmosphere' structure from case *.json
% dateandtime := Datetime string, e.g. '1967/11/09 20:00:00'
% Generate Atmosphere (note: first argument defines class)
at = self.constructor(model, dateandtime);
end
end
methods (Static)
% Static property: DICTIONARY
function out = dictionary(in)
persistent DICTIONARY;
if nargin
DICTIONARY = in;
end
out = DICTIONARY;
end
end
end