Mercurial > public > ostc4
diff Discovery/Inc/simulation.h @ 983:7891160acde3 GasConsumption
Bugfix calculation of needed gas:
Sometimes a gas was not calculated because of it's change depth calculation. Rootcause was a problem in the setup of the gas change list. The old function collecting milestones like time to first stop etc. has been removed because after the deco compression the complete profile is available. Instead of doing another way of profile calculation the existing profil is now evaluated and the time stamps / gas consumption derived from there.
| author | Ideenmodellierer |
|---|---|
| date | Sun, 02 Mar 2025 21:43:08 +0100 |
| parents | 21949c88da90 |
| children | c317130aaafc |
line wrap: on
line diff
--- a/Discovery/Inc/simulation.h Sun Mar 02 21:42:45 2025 +0100 +++ b/Discovery/Inc/simulation.h Sun Mar 02 21:43:08 2025 +0100 @@ -30,6 +30,13 @@ #include "stm32f4xx_hal.h" #include "data_central.h" +#define GAS_CHANGE_LIST_ITEMS (10) +typedef struct +{ + uint8_t depth; + uint8_t gasId; +} SgasChangeList; + typedef struct { uint8_t depthMeterFirstStop; @@ -52,10 +59,10 @@ uint16_t simulation_get_aim_depth(void); _Bool simulation_get_heed_decostops(void); -SDecoinfo* simulation_decoplaner(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2); -SDecoinfo* simulation_decoplaner_Bachelorarbeit_VPM(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2); -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); -void simulation_helper_change_points(SSimDataSummary *outputSummary, uint16_t depth_meter, uint16_t dive_time_minutes, SDecoinfo *decoInfoInput, const uint8_t *gasChangeListDepthGas20x2); +SDecoinfo* simulation_decoplaner(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, SgasChangeList *pGasChangeList); +SDecoinfo* simulation_decoplaner_Bachelorarbeit_VPM(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, SgasChangeList *pGasChangeList); +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 SgasChangeList *pGasChangeList); +void simulation_helper_change_points(SSimDataSummary *outputSummary, uint16_t depth_meter, uint16_t dive_time_minutes, SDecoinfo *decoInfoInput, const SgasChangeList *pGasChangeList); void Sim_Descend (void);
