Marine systems simulation
propeller_table_2d.h
1#pragma once
2
3#include <map>
4#include <vector>
5#include <assert.h>
6#include <algorithm>
7#include <iostream>
8#include <string.h>
9#include "CPrintDuringExec.h"
10
11#define MAX(x,y) (x) > (y) ? (x) : (y)
12#define MIN(x,y) (x) < (y) ? (x) : (y)
13
15{
16public:
19
20
21 void AddPDSet( double _PD, double *_beta, double *_ct, double *_cq, unsigned int _size);
22
23 //void SetPD( double _PD);
24 //void SetB( double _B );
25
26 void CalcThrustTorque( double _B, double _PD, CPrintDuringExec* p_Print );
27
28 double GetCt();
29 double GetCq();
30
31 void Print();
32
33 void SetPDRange(double _Min, double _Max);
34 double LinInterp(double x0,double x1,double y0,double y1,double x);
35private:
36
37 double m_b;
38 double m_ct;
39 double m_cq;
40
41 std::vector<double> m_table_PD;
42 double m_PD_lo, m_PD_hi;
43 double m_PD_mix;
44
45 double m_PD_RangeMax;
46 double m_PD_RangeMin;
47
48 std::map<double,double *> m_table_b;
49 std::map<double,double *> m_table_ct;
50 std::map<double,double *> m_table_cq;
51 std::map<double,unsigned int> m_table_set_size;
52
53
54 void UpdateThrustTorque();
55
56};
Definition: propeller_table_2d.h:15