-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathConstants.hpp
More file actions
50 lines (42 loc) · 2.02 KB
/
Constants.hpp
File metadata and controls
50 lines (42 loc) · 2.02 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* Bridge Command 5.0 Ship Simulator
Copyright (C) 2014 James Packer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY Or FITNESS For A PARTICULAR PURPOSE. See the
GNU General Public License For more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifndef __CONSTANTS_HPP_INCLUDED__
#define __CONSTANTS_HPP_INCLUDED__
#include "irrlicht.h"
#include <string>
//global constants
const int IDFlag_IsPickable=1;
const int IDFlag_IsPickable_2d=2;
const irr::f32 RHO_SW = 1024; // density of seawater kg / m^3
const irr::f32 RHO_FW = 1000; // density of freshwater kg / m^3
const irr::f32 RHO_AIR = 1.225; // density of air at sea level kg / m^3 approximately
// treated as a non compressible fluid, which it isnt but
// good enough to use for simulation purposes
const irr::f32 VIEW_PROPORTION_3D = 0.6;
//units conversions
const irr::f32 SECONDS_IN_HOUR = 3600.0;
const irr::f32 SECONDS_IN_DAY = SECONDS_IN_HOUR * 24;
const irr::f32 M_IN_NM = 1852.0;
const irr::f32 KTS_TO_MPS = M_IN_NM/SECONDS_IN_HOUR;
const irr::f32 MPS_TO_KTS = SECONDS_IN_HOUR/M_IN_NM;
const irr::f32 EARTH_RAD_M = 6.371e6;
const irr::f32 EARTH_RAD_CORRECTION = 1.333; //Effective earth's radius for radar calculations
const irr::f32 PI = 3.1415926535897932384626433832795;
const irr::f32 RAD_IN_DEG = PI/180.0;
const irr::f32 DEG_IN_RAD = 180.0 / PI;
const irr::f32 RAD_PER_S_IN_DEG_PER_MINUTE = 180.0/PI * 60 ;
//general definitions
const std::string LONGNAME = "Bridge Command 5.10.4-alpha.1";
const std::string VERSION = "5.10";
const std::string LONGVERSION = "5.10.4-alpha.1";
#endif