ALGO_MilkContent_ATY.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /**
  2. * @file ALGO_MilkContent_ATY.h
  3. *
  4. * @param Project ALGO_Algorithm_ATY_LIB
  5. *
  6. * @author ATY
  7. *
  8. * @copyright
  9. * - Copyright 2017 - 2025 MZ-ATY
  10. * - This code follows:
  11. * - MZ-ATY Various Contents Joint Statement -
  12. * <a href="https://mengze.top/MZ-ATY_VCJS">
  13. * https://mengze.top/MZ-ATY_VCJS</a>
  14. * - CC 4.0 BY-NC-SA -
  15. * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
  16. * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
  17. * - Your use will be deemed to have accepted the terms of this statement.
  18. *
  19. * @brief Familiar functions of MilkContent algorithm
  20. *
  21. * @version
  22. * - 1_01_221217 > ATY
  23. * -# Preliminary version, first Release
  24. ********************************************************************************
  25. */
  26. #ifndef __ALGO_MilkContent_ATY_H
  27. #define __ALGO_MilkContent_ATY_H
  28. #include "INCLUDE_ATY.h"
  29. #include "ALGO_Density_ATY.h"
  30. /******************************* For user *************************************/
  31. // #define __DEBUG_ALGO_MilkContent_ATY
  32. /******************************************************************************/
  33. #define PURE_WATER 1
  34. #define COW_MILK 2
  35. #define SHEEP_MILK 3
  36. #define UHT_MILK 4
  37. #define HUMAN_MILK 5
  38. #define CREAM 6
  39. #define WHEY 7
  40. // #define GOAT_MILK 8
  41. // #define BUFFALO_MILK 9
  42. // #define RECOVERED_MILK 10
  43. // #define PASTEURIZED_MILK 11
  44. // #define OTHER_MILK 12
  45. #define MILK_KIND_MAX 7
  46. typedef struct _MilkContent_S
  47. {
  48. float conFat;
  49. float conSnf;
  50. float conDensity; // md
  51. float conProtein; // dbz
  52. float conLactose; // rt
  53. float conSalts;
  54. float conWater;
  55. float conFreeze;
  56. float conTemperature;
  57. float conSC;
  58. float conPH;
  59. }MilkContent_S;
  60. typedef struct _MilkCoefficient_S
  61. {
  62. float coeProtein;
  63. float coeLactose;
  64. float coeSalts;
  65. float coeFreezeMul;
  66. float coeFreezePlus;
  67. float coeFreezePoint;
  68. // float coeSC;
  69. // float coePH;
  70. }MilkCoefficient_S;
  71. extern uint8_t detectContent_Milk;
  72. extern float dampAtRefT;
  73. extern float speedAtRefT;
  74. extern MilkContent_S milcDefault;
  75. void MilkDensityFatFromUS(float usSpeed, float usDamp, float refT, float offset);
  76. void MilkContentFromDensity(void);
  77. #define RefFat 5
  78. #endif /* __ALGO_MilkContent_ATY_H */
  79. /******************************** End Of File *********************************/