comparison Discovery/Inc/simulation.h @ 38:5f11787b4f42

include in ostc4 repository
author heinrichsweikamp
date Sat, 28 Apr 2018 11:52:34 +0200
parents
children 2bb1db22b5f5
comparison
equal deleted inserted replaced
37:ccc45c0e1ea2 38:5f11787b4f42
1 ///////////////////////////////////////////////////////////////////////////////
2 /// -*- coding: UTF-8 -*-
3 ///
4 /// \file Discovery/Inc/simulation.h
5 /// \brief
6 /// \author Heinrichs Weikamp
7 /// \date 2018
8 ///
9 /// $Id$
10 ///////////////////////////////////////////////////////////////////////////////
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
12 ///
13 /// This program is free software: you can redistribute it and/or modify
14 /// it under the terms of the GNU General Public License as published by
15 /// the Free Software Foundation, either version 3 of the License, or
16 /// (at your option) any later version.
17 ///
18 /// This program is distributed in the hope that it will be useful,
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 /// GNU General Public License for more details.
22 ///
23 /// You should have received a copy of the GNU General Public License
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
25 //////////////////////////////////////////////////////////////////////////////
26
27 #ifndef SIMULATION_H
28 #define SIMULATION_H
29
30 #include "stm32f4xx_hal.h"
31 #include "data_central.h"
32
33 typedef struct
34 {
35 uint8_t depthMeterFirstStop;
36 uint8_t descentRateMeterPerMinute;
37 uint8_t ascentRateMeterPerMinute;
38 uint16_t timeToBottom;
39 uint16_t timeAtBottom;
40 uint16_t timeToFirstStop;
41 uint16_t timeToSurface;
42 float ppO2AtBottom;
43 } SSimDataSummary;
44
45 void simulation_start(int aim_depth);
46 void simulation_exit(void);
47
48 void simulation_set_aim_depth(int depth_meter);
49 void simulation_set_heed_decostops(_Bool heed_decostops_while_ascending);
50
51 void simulation_add_time(int minutes);
52 void simulation_UpdateLifeData( _Bool checkOncePerSecond);
53 void simulation_set_zero_time_descent(void);
54
55 uint16_t simulation_get_aim_depth(void);
56 _Bool simulation_get_heed_decostops(void);
57 SDecoinfo* simulation_decoplaner(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2);
58 SDecoinfo* simulation_decoplaner_Bachelorarbeit_VPM(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2);
59 void simulation_gas_consumption(uint16_t *outputConsumptionList, uint16_t depth_meter, uint16_t dive_time_minutes, SDecoinfo *decoInfoInput, uint8_t gasConsumTravelInput, uint8_t gasConsumDecoInput, const uint8_t *gasChangeListDepthGas20x2);
60 void simulation_helper_change_points(SSimDataSummary *outputSummary, uint16_t depth_meter, uint16_t dive_time_minutes, SDecoinfo *decoInfoInput, const uint8_t *gasChangeListDepthGas20x2);
61
62
63 void Sim_Descend (void);
64 void Sim_Ascend (void);
65 void Sim_Divetime (void);
66 void Sim_Quit (void);
67
68
69 #endif /* SIMULATION_H */