![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
for learning
main.cpp@65:a2d7c63419c2, 2020-04-14 (annotated)
- Committer:
- Lightvalve
- Date:
- Tue Apr 14 01:07:30 2020 +0000
- Revision:
- 65:a2d7c63419c2
- Parent:
- 64:6f1caa0993d0
- Child:
- 66:a8e6799dbce3
200414
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GiJeongKim | 0:51c43836c1d7 | 1 | #include "mbed.h" |
GiJeongKim | 0:51c43836c1d7 | 2 | #include "FastPWM.h" |
GiJeongKim | 0:51c43836c1d7 | 3 | #include "INIT_HW.h" |
jobuuu | 2:a1c0a37df760 | 4 | #include "function_CAN.h" |
GiJeongKim | 0:51c43836c1d7 | 5 | #include "SPI_EEP_ENC.h" |
GiJeongKim | 0:51c43836c1d7 | 6 | #include "I2C_AS5510.h" |
GiJeongKim | 0:51c43836c1d7 | 7 | #include "setting.h" |
Lightvalve | 11:82d8768d7351 | 8 | #include "function_utilities.h" |
Lightvalve | 16:903b5a4433b4 | 9 | #include "stm32f4xx_flash.h" |
Lightvalve | 65:a2d7c63419c2 | 10 | #include "FlashWriter.h" |
Lightvalve | 61:bc8c8270f0ab | 11 | |
Lightvalve | 61:bc8c8270f0ab | 12 | using namespace std; |
Lightvalve | 61:bc8c8270f0ab | 13 | Timer t; |
GiJeongKim | 0:51c43836c1d7 | 14 | |
Lightvalve | 31:66738bfecec5 | 15 | ///191008//// |
Lightvalve | 31:66738bfecec5 | 16 | |
jobuuu | 7:e9086c72bb22 | 17 | // dac & check /////////////////////////////////////////// |
GiJeongKim | 0:51c43836c1d7 | 18 | DigitalOut check(PC_2); |
GiJeongKim | 0:51c43836c1d7 | 19 | DigitalOut check_2(PC_3); |
GiJeongKim | 0:51c43836c1d7 | 20 | AnalogOut dac_1(PA_4); |
GiJeongKim | 0:51c43836c1d7 | 21 | AnalogOut dac_2(PA_5); |
Lightvalve | 14:8e7590227d22 | 22 | AnalogIn adc1(PC_4); //pressure_1 |
Lightvalve | 14:8e7590227d22 | 23 | AnalogIn adc2(PB_0); //pressure_2 |
Lightvalve | 14:8e7590227d22 | 24 | AnalogIn adc3(PC_1); //current |
GiJeongKim | 0:51c43836c1d7 | 25 | |
Lightvalve | 24:ef6e1092e9e6 | 26 | |
jobuuu | 7:e9086c72bb22 | 27 | // PWM /////////////////////////////////////////// |
Lightvalve | 30:8d561f16383b | 28 | float dtc_v=0.0f; |
Lightvalve | 30:8d561f16383b | 29 | float dtc_w=0.0f; |
GiJeongKim | 0:51c43836c1d7 | 30 | |
jobuuu | 7:e9086c72bb22 | 31 | // I2C /////////////////////////////////////////// |
GiJeongKim | 0:51c43836c1d7 | 32 | I2C i2c(PC_9,PA_8); // SDA, SCL (for K22F) |
GiJeongKim | 0:51c43836c1d7 | 33 | const int i2c_slave_addr1 = 0x56; |
GiJeongKim | 0:51c43836c1d7 | 34 | unsigned int value; // 10bit output of reading sensor AS5510 |
GiJeongKim | 0:51c43836c1d7 | 35 | |
jobuuu | 7:e9086c72bb22 | 36 | // SPI /////////////////////////////////////////// |
Lightvalve | 16:903b5a4433b4 | 37 | //SPI eeprom(PB_15, PB_14, PB_13); // EEPROM //(SPI_MOSI, SPI_MISO, SPI_SCK); |
Lightvalve | 16:903b5a4433b4 | 38 | //DigitalOut eeprom_cs(PB_12); |
Lightvalve | 16:903b5a4433b4 | 39 | //FlashWriter writer(6);//2부터 7까지 되는듯 아마 sector |
GiJeongKim | 0:51c43836c1d7 | 40 | SPI enc(PC_12,PC_11,PC_10); |
GiJeongKim | 0:51c43836c1d7 | 41 | DigitalOut enc_cs(PD_2); |
Lightvalve | 11:82d8768d7351 | 42 | DigitalOut LED(PA_15); |
GiJeongKim | 0:51c43836c1d7 | 43 | |
jobuuu | 7:e9086c72bb22 | 44 | // UART /////////////////////////////////////////// |
GiJeongKim | 0:51c43836c1d7 | 45 | Serial pc(PA_9,PA_10); // _ UART |
GiJeongKim | 0:51c43836c1d7 | 46 | |
jobuuu | 7:e9086c72bb22 | 47 | // CAN /////////////////////////////////////////// |
GiJeongKim | 0:51c43836c1d7 | 48 | CAN can(PB_8, PB_9, 1000000); |
GiJeongKim | 0:51c43836c1d7 | 49 | CANMessage msg; |
Lightvalve | 11:82d8768d7351 | 50 | void onMsgReceived() |
Lightvalve | 11:82d8768d7351 | 51 | { |
Lightvalve | 11:82d8768d7351 | 52 | CAN_RX_HANDLER(); |
Lightvalve | 11:82d8768d7351 | 53 | } |
jobuuu | 2:a1c0a37df760 | 54 | |
jobuuu | 7:e9086c72bb22 | 55 | // Variables /////////////////////////////////////////// |
jobuuu | 7:e9086c72bb22 | 56 | State pos; |
jobuuu | 7:e9086c72bb22 | 57 | State vel; |
jobuuu | 7:e9086c72bb22 | 58 | State Vout; |
jobuuu | 7:e9086c72bb22 | 59 | State torq; |
jobuuu | 7:e9086c72bb22 | 60 | State pres_A; |
jobuuu | 7:e9086c72bb22 | 61 | State pres_B; |
jobuuu | 7:e9086c72bb22 | 62 | State cur; |
Lightvalve | 14:8e7590227d22 | 63 | State valve_pos; |
Lightvalve | 14:8e7590227d22 | 64 | |
Lightvalve | 14:8e7590227d22 | 65 | State INIT_Vout; |
Lightvalve | 14:8e7590227d22 | 66 | State INIT_Valve_Pos; |
Lightvalve | 14:8e7590227d22 | 67 | State INIT_Pos; |
Lightvalve | 14:8e7590227d22 | 68 | State INIT_torq; |
jobuuu | 5:a4319f79457b | 69 | |
Lightvalve | 19:23b7c1ad8683 | 70 | extern int CID_RX_CMD; |
Lightvalve | 19:23b7c1ad8683 | 71 | extern int CID_RX_REF_POSITION; |
Lightvalve | 49:e7bcfc244d40 | 72 | extern int CID_RX_REF_VALVE_POS; |
Lightvalve | 45:35fa6884d0c6 | 73 | extern int CID_RX_REF_PWM; |
Lightvalve | 19:23b7c1ad8683 | 74 | |
Lightvalve | 19:23b7c1ad8683 | 75 | extern int CID_TX_INFO; |
Lightvalve | 19:23b7c1ad8683 | 76 | extern int CID_TX_POSITION; |
Lightvalve | 19:23b7c1ad8683 | 77 | extern int CID_TX_TORQUE; |
Lightvalve | 19:23b7c1ad8683 | 78 | extern int CID_TX_PRES; |
Lightvalve | 19:23b7c1ad8683 | 79 | extern int CID_TX_VOUT; |
Lightvalve | 19:23b7c1ad8683 | 80 | extern int CID_TX_VALVE_POSITION; |
Lightvalve | 19:23b7c1ad8683 | 81 | |
Lightvalve | 61:bc8c8270f0ab | 82 | |
Lightvalve | 61:bc8c8270f0ab | 83 | |
Lightvalve | 61:bc8c8270f0ab | 84 | |
jobuuu | 7:e9086c72bb22 | 85 | // ============================================================================= |
jobuuu | 7:e9086c72bb22 | 86 | // ============================================================================= |
jobuuu | 7:e9086c72bb22 | 87 | // ============================================================================= |
jobuuu | 7:e9086c72bb22 | 88 | |
Lightvalve | 12:6f2531038ea4 | 89 | /******************************************************************************* |
Lightvalve | 12:6f2531038ea4 | 90 | * REFERENCE MODE |
Lightvalve | 12:6f2531038ea4 | 91 | ******************************************************************************/ |
Lightvalve | 13:747daba9cf59 | 92 | enum _REFERENCE_MODE { |
Lightvalve | 13:747daba9cf59 | 93 | MODE_REF_NO_ACT = 0, //0 |
Lightvalve | 12:6f2531038ea4 | 94 | MODE_REF_DIRECT, //1 |
Lightvalve | 12:6f2531038ea4 | 95 | MODE_REF_COS_INC, //2 |
Lightvalve | 12:6f2531038ea4 | 96 | MODE_REF_LINE_INC, //3 |
Lightvalve | 12:6f2531038ea4 | 97 | MODE_REF_SIN_WAVE, //4 |
Lightvalve | 12:6f2531038ea4 | 98 | MODE_REF_SQUARE_WAVE, //5 |
Lightvalve | 12:6f2531038ea4 | 99 | }; |
Lightvalve | 12:6f2531038ea4 | 100 | |
Lightvalve | 12:6f2531038ea4 | 101 | /******************************************************************************* |
Lightvalve | 12:6f2531038ea4 | 102 | * CONTROL MODE |
Lightvalve | 12:6f2531038ea4 | 103 | ******************************************************************************/ |
Lightvalve | 13:747daba9cf59 | 104 | enum _CONTROL_MODE { |
Lightvalve | 12:6f2531038ea4 | 105 | //control mode |
Lightvalve | 12:6f2531038ea4 | 106 | MODE_NO_ACT = 0, //0 |
Lightvalve | 47:fdcb8bd86fd6 | 107 | MODE_VALVE_POSITION_CONTROL, //1 |
Lightvalve | 47:fdcb8bd86fd6 | 108 | MODE_JOINT_CONTROL, //2 |
Lightvalve | 50:3c630b5eba9f | 109 | |
Lightvalve | 47:fdcb8bd86fd6 | 110 | MODE_VALVE_OPEN_LOOP, //3 |
Lightvalve | 12:6f2531038ea4 | 111 | MODE_JOINT_POSITION_TORQUE_CONTROL_VALVE_POSITION, //4 |
Lightvalve | 12:6f2531038ea4 | 112 | MODE_VALVE_POSITION_TORQUE_CONTROL_LEARNING, //5 |
Lightvalve | 13:747daba9cf59 | 113 | |
Lightvalve | 12:6f2531038ea4 | 114 | MODE_JOINT_POSITION_PRES_CONTROL_PWM, //6 |
Lightvalve | 12:6f2531038ea4 | 115 | MODE_JOINT_POSITION_PRES_CONTROL_VALVE_POSITION, //7 |
Lightvalve | 12:6f2531038ea4 | 116 | MODE_VALVE_POSITION_PRES_CONTROL_LEARNING, //8 |
Lightvalve | 13:747daba9cf59 | 117 | |
Lightvalve | 12:6f2531038ea4 | 118 | MODE_TEST_CURRENT_CONTROL, //9 |
Lightvalve | 12:6f2531038ea4 | 119 | MODE_TEST_PWM_CONTROL, //10 |
Lightvalve | 21:e5f1a43ea6f9 | 120 | |
Lightvalve | 14:8e7590227d22 | 121 | MODE_CURRENT_CONTROL, //11 |
Lightvalve | 14:8e7590227d22 | 122 | MODE_JOINT_POSITION_TORQUE_CONTROL_CURRENT, //12 |
Lightvalve | 14:8e7590227d22 | 123 | MODE_JOINT_POSITION_PRES_CONTROL_CURRENT, //13 |
Lightvalve | 13:747daba9cf59 | 124 | |
Lightvalve | 12:6f2531038ea4 | 125 | //utility |
Lightvalve | 12:6f2531038ea4 | 126 | MODE_TORQUE_SENSOR_NULLING = 20, //20 |
Lightvalve | 12:6f2531038ea4 | 127 | MODE_VALVE_NULLING_AND_DEADZONE_SETTING, //21 |
Lightvalve | 12:6f2531038ea4 | 128 | MODE_FIND_HOME, //22 |
Lightvalve | 57:f4819de54e7a | 129 | MODE_VALVE_GAIN_SETTING, //23 |
Lightvalve | 12:6f2531038ea4 | 130 | MODE_PRESSURE_SENSOR_NULLING, //24 |
Lightvalve | 12:6f2531038ea4 | 131 | MODE_PRESSURE_SENSOR_CALIB, //25 |
Lightvalve | 12:6f2531038ea4 | 132 | MODE_ROTARY_FRICTION_TUNING, //26 |
Lightvalve | 13:747daba9cf59 | 133 | |
Lightvalve | 12:6f2531038ea4 | 134 | MODE_DDV_POS_VS_PWM_ID = 30, //30 |
Lightvalve | 12:6f2531038ea4 | 135 | MODE_DDV_DEADZONE_AND_CENTER, //31 |
Lightvalve | 12:6f2531038ea4 | 136 | MODE_DDV_POS_VS_FLOWRATE, //32 |
Lightvalve | 57:f4819de54e7a | 137 | MODE_SYSTEM_ID, //33 |
Lightvalve | 12:6f2531038ea4 | 138 | }; |
Lightvalve | 12:6f2531038ea4 | 139 | |
Lightvalve | 65:a2d7c63419c2 | 140 | void SystemClock_Config(void) |
Lightvalve | 65:a2d7c63419c2 | 141 | { |
Lightvalve | 65:a2d7c63419c2 | 142 | RCC_OscInitTypeDef RCC_OscInitStruct = {0}; |
Lightvalve | 65:a2d7c63419c2 | 143 | RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; |
Lightvalve | 65:a2d7c63419c2 | 144 | |
Lightvalve | 65:a2d7c63419c2 | 145 | /** Configure the main internal regulator output voltage |
Lightvalve | 65:a2d7c63419c2 | 146 | */ |
Lightvalve | 65:a2d7c63419c2 | 147 | __HAL_RCC_PWR_CLK_ENABLE(); |
Lightvalve | 65:a2d7c63419c2 | 148 | __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); |
Lightvalve | 65:a2d7c63419c2 | 149 | /** Initializes the CPU, AHB and APB busses clocks |
Lightvalve | 65:a2d7c63419c2 | 150 | */ |
Lightvalve | 65:a2d7c63419c2 | 151 | RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; |
Lightvalve | 65:a2d7c63419c2 | 152 | RCC_OscInitStruct.HSIState = RCC_HSI_ON; |
Lightvalve | 65:a2d7c63419c2 | 153 | RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; |
Lightvalve | 65:a2d7c63419c2 | 154 | RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; |
Lightvalve | 65:a2d7c63419c2 | 155 | RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; |
Lightvalve | 65:a2d7c63419c2 | 156 | RCC_OscInitStruct.PLL.PLLM = 8;//8 |
Lightvalve | 65:a2d7c63419c2 | 157 | RCC_OscInitStruct.PLL.PLLN = 180; //180 |
Lightvalve | 65:a2d7c63419c2 | 158 | RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; |
Lightvalve | 65:a2d7c63419c2 | 159 | RCC_OscInitStruct.PLL.PLLQ = 2; |
Lightvalve | 65:a2d7c63419c2 | 160 | RCC_OscInitStruct.PLL.PLLR = 2; |
Lightvalve | 65:a2d7c63419c2 | 161 | if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) |
Lightvalve | 65:a2d7c63419c2 | 162 | { |
Lightvalve | 65:a2d7c63419c2 | 163 | //Error_Handler(); |
Lightvalve | 65:a2d7c63419c2 | 164 | } |
Lightvalve | 65:a2d7c63419c2 | 165 | /** Activate the Over-Drive mode |
Lightvalve | 65:a2d7c63419c2 | 166 | */ |
Lightvalve | 65:a2d7c63419c2 | 167 | if (HAL_PWREx_EnableOverDrive() != HAL_OK) |
Lightvalve | 65:a2d7c63419c2 | 168 | { |
Lightvalve | 65:a2d7c63419c2 | 169 | //Error_Handler(); |
Lightvalve | 65:a2d7c63419c2 | 170 | } |
Lightvalve | 65:a2d7c63419c2 | 171 | /** Initializes the CPU, AHB and APB busses clocks |
Lightvalve | 65:a2d7c63419c2 | 172 | */ |
Lightvalve | 65:a2d7c63419c2 | 173 | RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |
Lightvalve | 65:a2d7c63419c2 | 174 | |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; |
Lightvalve | 65:a2d7c63419c2 | 175 | RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; |
Lightvalve | 65:a2d7c63419c2 | 176 | RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; |
Lightvalve | 65:a2d7c63419c2 | 177 | RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; |
Lightvalve | 65:a2d7c63419c2 | 178 | RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; |
Lightvalve | 65:a2d7c63419c2 | 179 | |
Lightvalve | 65:a2d7c63419c2 | 180 | if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) |
Lightvalve | 65:a2d7c63419c2 | 181 | { |
Lightvalve | 65:a2d7c63419c2 | 182 | //Error_Handler(); |
Lightvalve | 65:a2d7c63419c2 | 183 | } |
Lightvalve | 65:a2d7c63419c2 | 184 | } |
Lightvalve | 65:a2d7c63419c2 | 185 | |
Lightvalve | 65:a2d7c63419c2 | 186 | const float input[22] = { 0.052414f, 0.066907f, 0.085407f, 0.109023f, |
Lightvalve | 65:a2d7c63419c2 | 187 | 0.139169f, 0.177651f, 0.052414f, 0.066907f, 0.085407f, 0.109023f, |
Lightvalve | 65:a2d7c63419c2 | 188 | 0.139169f, 0.177651f, 0.052414f, 0.066907f, 0.085407f, 0.109023f, |
Lightvalve | 65:a2d7c63419c2 | 189 | 0.139169f, 0.177651f, 0.052414f, 0.066907f, 0.085407f, 0.109023f }; |
Lightvalve | 65:a2d7c63419c2 | 190 | |
Lightvalve | 65:a2d7c63419c2 | 191 | const float h1[22][32] = { { -0.02454003319144249f, 0.13071660697460175f, |
Lightvalve | 65:a2d7c63419c2 | 192 | 0.08675816655158997f, 0.1402530074119568f, -0.24982963502407074f, |
Lightvalve | 65:a2d7c63419c2 | 193 | 0.12202739715576172f, -0.13030944764614105f, -0.11353740841150284f, |
Lightvalve | 65:a2d7c63419c2 | 194 | -0.2542628347873688f, -0.04588286578655243f, -0.14282149076461792f, |
Lightvalve | 65:a2d7c63419c2 | 195 | -0.2201535552740097f, -0.18691661953926086f, 0.30389177799224854f, |
Lightvalve | 65:a2d7c63419c2 | 196 | -0.1729012429714203f, -0.12240276485681534f, -0.11355798691511154f, |
Lightvalve | 65:a2d7c63419c2 | 197 | 0.2349482625722885f, -0.24878336489200592f, 0.07184267044067383f, |
Lightvalve | 65:a2d7c63419c2 | 198 | -0.3221011161804199f, 0.08763179183006287f, -0.27257153391838074f, |
Lightvalve | 65:a2d7c63419c2 | 199 | -0.06490874290466309f, -0.06682667881250381f, 0.1505383551120758f, |
Lightvalve | 65:a2d7c63419c2 | 200 | -0.14478006958961487f, -0.07367490231990814f, 0.23569869995117188f, |
Lightvalve | 65:a2d7c63419c2 | 201 | -0.1539779156446457f, -0.1400003880262375f, 0.051764924079179764f }, { |
Lightvalve | 65:a2d7c63419c2 | 202 | -0.19842876493930817f, 0.18337926268577576f, 0.24467620253562927f, |
Lightvalve | 65:a2d7c63419c2 | 203 | -0.29177823662757874f, -0.08481606096029282f, 0.09983056783676147f, |
Lightvalve | 65:a2d7c63419c2 | 204 | 0.17972804605960846f, -0.07474377751350403f, -0.1711931675672531f, |
Lightvalve | 65:a2d7c63419c2 | 205 | 0.12607872486114502f, -0.21832025051116943f, -0.1755477339029312f, |
Lightvalve | 65:a2d7c63419c2 | 206 | -0.010855759494006634f, 0.2378554791212082f, 0.03758585453033447f, |
Lightvalve | 65:a2d7c63419c2 | 207 | -0.13797838985919952f, -0.15582887828350067f, 0.08006728440523148f, |
Lightvalve | 65:a2d7c63419c2 | 208 | 0.280606746673584f, 0.28338202834129333f, -0.06711727380752563f, |
Lightvalve | 65:a2d7c63419c2 | 209 | -0.09894979000091553f, -0.07788881659507751f, 0.22705963253974915f, |
Lightvalve | 65:a2d7c63419c2 | 210 | -0.0012174372095614672f, 0.240607351064682f, 0.1039358377456665f, |
Lightvalve | 65:a2d7c63419c2 | 211 | 0.18501906096935272f, -0.03155122324824333f, 0.08036407828330994f, |
Lightvalve | 65:a2d7c63419c2 | 212 | -0.20284514129161835f, 0.06699042022228241f }, { 0.14068114757537842f, |
Lightvalve | 65:a2d7c63419c2 | 213 | 0.13828633725643158f, -0.0034593045711517334f, 0.1392701119184494f, |
Lightvalve | 65:a2d7c63419c2 | 214 | 0.01057615876197815f, -0.007689331658184528f, 0.07328304648399353f, |
Lightvalve | 65:a2d7c63419c2 | 215 | -0.14162643253803253f, -0.04415355995297432f, 0.09164466708898544f, |
Lightvalve | 65:a2d7c63419c2 | 216 | 0.24845272302627563f, -0.05588914453983307f, -0.054479751735925674f, |
Lightvalve | 65:a2d7c63419c2 | 217 | 0.24456734955310822f, -0.2598671317100525f, -0.15801946818828583f, |
Lightvalve | 65:a2d7c63419c2 | 218 | 0.2817283868789673f, -0.19191598892211914f, 0.15788163244724274f, |
Lightvalve | 65:a2d7c63419c2 | 219 | 0.28144943714141846f, 0.14735294878482819f, -0.12544888257980347f, |
Lightvalve | 65:a2d7c63419c2 | 220 | 0.11103320121765137f, -0.20203278958797455f, 0.0017974432557821274f, |
Lightvalve | 65:a2d7c63419c2 | 221 | 0.1191059947013855f, -0.12710560858249664f, 0.1702873408794403f, |
Lightvalve | 65:a2d7c63419c2 | 222 | -0.09684925526380539f, 0.2480504810810089f, -0.28676652908325195f, |
Lightvalve | 65:a2d7c63419c2 | 223 | -0.17398564517498016f }, { 0.04844924807548523f, -0.06973694264888763f, |
Lightvalve | 65:a2d7c63419c2 | 224 | -0.1682211458683014f, -0.3513043522834778f, -0.22794683277606964f, |
Lightvalve | 65:a2d7c63419c2 | 225 | 0.08840374648571014f, 0.026485737413167953f, -0.3492684066295624f, |
Lightvalve | 65:a2d7c63419c2 | 226 | 0.1813228577375412f, 0.06481858342885971f, 0.11471711844205856f, |
Lightvalve | 65:a2d7c63419c2 | 227 | 0.1854662299156189f, -0.12381665408611298f, 0.35136616230010986f, |
Lightvalve | 65:a2d7c63419c2 | 228 | -0.10501053929328918f, -0.016016438603401184f, 0.03148011490702629f, |
Lightvalve | 65:a2d7c63419c2 | 229 | -0.17074286937713623f, -0.1689852625131607f, 0.1171770691871643f, |
Lightvalve | 65:a2d7c63419c2 | 230 | -0.23076696693897247f, -0.07204706966876984f, -0.12052477896213531f, |
Lightvalve | 65:a2d7c63419c2 | 231 | -0.23881052434444427f, -0.004284285008907318f, 0.11600598692893982f, |
Lightvalve | 65:a2d7c63419c2 | 232 | 0.10962119698524475f, -0.012203623540699482f, 0.33345603942871094f, |
Lightvalve | 65:a2d7c63419c2 | 233 | 0.1084047257900238f, 0.015447823330760002f, 0.1315833479166031f }, { |
Lightvalve | 65:a2d7c63419c2 | 234 | 0.12315890938043594f, 0.16742177307605743f, 0.0689031183719635f, |
Lightvalve | 65:a2d7c63419c2 | 235 | -0.29923000931739807f, -0.10478553920984268f, 0.0034702986013144255f, |
Lightvalve | 65:a2d7c63419c2 | 236 | -0.06286507844924927f, -0.3965417146682739f, -0.24317654967308044f, |
Lightvalve | 65:a2d7c63419c2 | 237 | 0.2535353899002075f, -0.18702425062656403f, 0.2042631357908249f, |
Lightvalve | 65:a2d7c63419c2 | 238 | 0.14613179862499237f, 0.2476590871810913f, -0.20543844997882843f, |
Lightvalve | 65:a2d7c63419c2 | 239 | 0.15613335371017456f, -0.024847690016031265f, -0.12820857763290405f, |
Lightvalve | 65:a2d7c63419c2 | 240 | 0.13289833068847656f, -0.033144671469926834f, 0.09313736855983734f, |
Lightvalve | 65:a2d7c63419c2 | 241 | 0.19325080513954163f, -0.20106908679008484f, -0.061102136969566345f, |
Lightvalve | 65:a2d7c63419c2 | 242 | -0.028910696506500244f, -0.2806609869003296f, 0.033241331577301025f, |
Lightvalve | 65:a2d7c63419c2 | 243 | -0.26521533727645874f, 0.33587634563446045f, -0.13370811939239502f, |
Lightvalve | 65:a2d7c63419c2 | 244 | 0.21700626611709595f, 0.008141759783029556f }, { 0.3156174421310425f, |
Lightvalve | 65:a2d7c63419c2 | 245 | 0.033245913684368134f, 0.24999621510505676f, 0.14565978944301605f, |
Lightvalve | 65:a2d7c63419c2 | 246 | 0.02309553697705269f, -0.05169738829135895f, -0.15119729936122894f, |
Lightvalve | 65:a2d7c63419c2 | 247 | -0.10350330173969269f, -0.3457512855529785f, 0.03809545189142227f, |
Lightvalve | 65:a2d7c63419c2 | 248 | 0.25342249870300293f, -0.19578632712364197f, -0.05333413928747177f, |
Lightvalve | 65:a2d7c63419c2 | 249 | 0.09492939710617065f, 0.17943906784057617f, -0.21144242584705353f, |
Lightvalve | 65:a2d7c63419c2 | 250 | -0.1867227405309677f, -0.23938390612602234f, -0.2632395327091217f, |
Lightvalve | 65:a2d7c63419c2 | 251 | 0.06656297296285629f, 0.0961865782737732f, -0.00792744755744934f, |
Lightvalve | 65:a2d7c63419c2 | 252 | 0.10312435030937195f, 0.27112916111946106f, -0.12544961273670197f, |
Lightvalve | 65:a2d7c63419c2 | 253 | 0.17053177952766418f, -0.23970040678977966f, 0.16830605268478394f, |
Lightvalve | 65:a2d7c63419c2 | 254 | 0.18481910228729248f, -0.0010759234428405762f, 0.049939122051000595f, |
Lightvalve | 65:a2d7c63419c2 | 255 | -0.059725455939769745f }, { 0.021065108478069305f, |
Lightvalve | 65:a2d7c63419c2 | 256 | -0.17225059866905212f, 0.1334478259086609f, 0.09036531299352646f, |
Lightvalve | 65:a2d7c63419c2 | 257 | 0.22687482833862305f, 0.03710803762078285f, -0.1765347123146057f, |
Lightvalve | 65:a2d7c63419c2 | 258 | 0.0036233423743396997f, -0.17170532047748566f, -0.11777474731206894f, |
Lightvalve | 65:a2d7c63419c2 | 259 | -0.054618652909994125f, -0.17656885087490082f, 0.052830975502729416f, |
Lightvalve | 65:a2d7c63419c2 | 260 | 0.10441931337118149f, -0.14971962571144104f, -0.24781031906604767f, |
Lightvalve | 65:a2d7c63419c2 | 261 | -0.023929525166749954f, -0.04490154981613159f, 0.2847473621368408f, |
Lightvalve | 65:a2d7c63419c2 | 262 | 0.014796234667301178f, -0.14429597556591034f, -0.14511936902999878f, |
Lightvalve | 65:a2d7c63419c2 | 263 | -0.21516084671020508f, -0.20089882612228394f, -0.10562898963689804f, |
Lightvalve | 65:a2d7c63419c2 | 264 | -0.12727710604667664f, -0.09228193759918213f, -0.08893769234418869f, |
Lightvalve | 65:a2d7c63419c2 | 265 | -0.12074583023786545f, -0.028564512729644775f, 0.008117200806736946f, |
Lightvalve | 65:a2d7c63419c2 | 266 | 0.08297917991876602f }, { 0.19532811641693115f, -0.05014912784099579f, |
Lightvalve | 65:a2d7c63419c2 | 267 | 0.13636812567710876f, 0.048916492611169815f, 0.26100409030914307f, |
Lightvalve | 65:a2d7c63419c2 | 268 | -0.17881926894187927f, 0.012918300926685333f, 0.06905974447727203f, |
Lightvalve | 65:a2d7c63419c2 | 269 | 0.16022373735904694f, 0.06287040561437607f, -0.1698886901140213f, |
Lightvalve | 65:a2d7c63419c2 | 270 | -0.3164767324924469f, 0.06106283515691757f, 0.05603136122226715f, |
Lightvalve | 65:a2d7c63419c2 | 271 | 0.04491907358169556f, 0.16258767247200012f, 0.06191227212548256f, |
Lightvalve | 65:a2d7c63419c2 | 272 | -0.2078513652086258f, -0.26503077149391174f, 0.019191648811101913f, |
Lightvalve | 65:a2d7c63419c2 | 273 | -0.06990422308444977f, 0.018576622009277344f, -0.10467308759689331f, |
Lightvalve | 65:a2d7c63419c2 | 274 | -0.023303329944610596f, 0.11910765618085861f, 0.014545410871505737f, |
Lightvalve | 65:a2d7c63419c2 | 275 | -0.2797531187534332f, -0.014093500562012196f, -0.09087783098220825f, |
Lightvalve | 65:a2d7c63419c2 | 276 | 0.003536820411682129f, -0.08422576636075974f, 0.20006318390369415f }, { |
Lightvalve | 65:a2d7c63419c2 | 277 | 0.03522654250264168f, -0.15291047096252441f, 0.11232474446296692f, |
Lightvalve | 65:a2d7c63419c2 | 278 | 0.08317171782255173f, 0.01103570032864809f, -0.23718038201332092f, |
Lightvalve | 65:a2d7c63419c2 | 279 | -0.043577663600444794f, -0.10673496872186661f, -0.08802048116922379f, |
Lightvalve | 65:a2d7c63419c2 | 280 | 0.06057487800717354f, -0.2207462638616562f, 0.21330848336219788f, |
Lightvalve | 65:a2d7c63419c2 | 281 | 0.06867198646068573f, 0.31874582171440125f, 0.19785529375076294f, |
Lightvalve | 65:a2d7c63419c2 | 282 | 0.11854913830757141f, 0.0048002502880990505f, 0.07107115536928177f, |
Lightvalve | 65:a2d7c63419c2 | 283 | 0.1471722573041916f, -0.021459000185132027f, -0.25434109568595886f, |
Lightvalve | 65:a2d7c63419c2 | 284 | -0.01829427480697632f, -0.2427632212638855f, 0.06919881701469421f, |
Lightvalve | 65:a2d7c63419c2 | 285 | -0.2938772141933441f, -0.06733335554599762f, -0.07296852767467499f, |
Lightvalve | 65:a2d7c63419c2 | 286 | 0.21985474228858948f, 0.27857765555381775f, -0.09769320487976074f, |
Lightvalve | 65:a2d7c63419c2 | 287 | -0.2202656865119934f, 0.06659334897994995f }, { -0.18176554143428802f, |
Lightvalve | 65:a2d7c63419c2 | 288 | 0.05808980390429497f, -0.2002866566181183f, 0.2209930419921875f, |
Lightvalve | 65:a2d7c63419c2 | 289 | 0.22003944218158722f, -0.12194468080997467f, 0.16832226514816284f, |
Lightvalve | 65:a2d7c63419c2 | 290 | -0.32419517636299133f, -0.31987497210502625f, 0.020202845335006714f, |
Lightvalve | 65:a2d7c63419c2 | 291 | -0.2701215445995331f, 0.15670055150985718f, 0.04660305753350258f, |
Lightvalve | 65:a2d7c63419c2 | 292 | 0.2134874314069748f, -0.21944394707679749f, -0.25474902987480164f, |
Lightvalve | 65:a2d7c63419c2 | 293 | 0.27780312299728394f, 0.28777045011520386f, 0.10909196734428406f, |
Lightvalve | 65:a2d7c63419c2 | 294 | -0.06471110135316849f, -0.1670646369457245f, 0.13422733545303345f, |
Lightvalve | 65:a2d7c63419c2 | 295 | -0.09569443762302399f, -0.2635143995285034f, -0.14163701236248016f, |
Lightvalve | 65:a2d7c63419c2 | 296 | 0.04615262150764465f, 0.11132439970970154f, 0.23280498385429382f, |
Lightvalve | 65:a2d7c63419c2 | 297 | 0.23840151727199554f, 0.24882283806800842f, 0.0529453419148922f, |
Lightvalve | 65:a2d7c63419c2 | 298 | 0.13884255290031433f }, { -0.10154614597558975f, -0.21454781293869019f, |
Lightvalve | 65:a2d7c63419c2 | 299 | -0.05455450713634491f, 0.2060181051492691f, -0.24331730604171753f, |
Lightvalve | 65:a2d7c63419c2 | 300 | -0.18322165310382843f, 0.08804970234632492f, -0.09168499708175659f, |
Lightvalve | 65:a2d7c63419c2 | 301 | -0.3127654492855072f, -0.20708662271499634f, -0.26258623600006104f, |
Lightvalve | 65:a2d7c63419c2 | 302 | -0.2734098434448242f, -0.1649116575717926f, 0.33747056126594543f, |
Lightvalve | 65:a2d7c63419c2 | 303 | 0.014040976762771606f, 0.23592090606689453f, -0.13581429421901703f, |
Lightvalve | 65:a2d7c63419c2 | 304 | -0.1899891048669815f, 0.19671878218650818f, -0.23027168214321136f, |
Lightvalve | 65:a2d7c63419c2 | 305 | 0.14086498320102692f, -0.20761027932167053f, 0.19642561674118042f, |
Lightvalve | 65:a2d7c63419c2 | 306 | 0.00928562879562378f, -0.07803404331207275f, 0.08413159847259521f, |
Lightvalve | 65:a2d7c63419c2 | 307 | 0.06599533557891846f, -0.2540142834186554f, 0.209262415766716f, |
Lightvalve | 65:a2d7c63419c2 | 308 | 0.0242612361907959f, -0.008453809656202793f, 0.13509076833724976f }, { |
Lightvalve | 65:a2d7c63419c2 | 309 | 0.19965791702270508f, 0.15909932553768158f, -0.2523933947086334f, |
Lightvalve | 65:a2d7c63419c2 | 310 | -0.024008844047784805f, -0.3288625478744507f, -0.3593894839286804f, |
Lightvalve | 65:a2d7c63419c2 | 311 | -0.10659854859113693f, -0.09668480604887009f, -0.25964510440826416f, |
Lightvalve | 65:a2d7c63419c2 | 312 | 0.24553023278713226f, 0.2584691643714905f, -0.13047806918621063f, |
Lightvalve | 65:a2d7c63419c2 | 313 | -0.045685749500989914f, -0.027066625654697418f, -0.24520277976989746f, |
Lightvalve | 65:a2d7c63419c2 | 314 | 0.2635043263435364f, 0.06614753603935242f, -0.14302769303321838f, |
Lightvalve | 65:a2d7c63419c2 | 315 | -0.22128811478614807f, -0.2489294409751892f, 0.2430250197649002f, |
Lightvalve | 65:a2d7c63419c2 | 316 | 0.1864563524723053f, -0.19150227308273315f, 0.26879218220710754f, |
Lightvalve | 65:a2d7c63419c2 | 317 | -0.3449307382106781f, 0.1727219521999359f, 0.2771519124507904f, |
Lightvalve | 65:a2d7c63419c2 | 318 | 0.08954040706157684f, 0.2631568908691406f, 0.12126106023788452f, |
Lightvalve | 65:a2d7c63419c2 | 319 | 0.12375504523515701f, -0.054388467222452164f }, { 0.19592446088790894f, |
Lightvalve | 65:a2d7c63419c2 | 320 | -0.34142163395881653f, 0.15802547335624695f, 0.18388450145721436f, |
Lightvalve | 65:a2d7c63419c2 | 321 | 0.031184343621134758f, -0.08831250667572021f, -0.20661622285842896f, |
Lightvalve | 65:a2d7c63419c2 | 322 | 0.06958860903978348f, -0.161506786942482f, 0.25045934319496155f, |
Lightvalve | 65:a2d7c63419c2 | 323 | -0.10389973968267441f, 0.21004287898540497f, -0.2358747273683548f, |
Lightvalve | 65:a2d7c63419c2 | 324 | -0.1947477161884308f, 0.05316495895385742f, -0.0015946561470627785f, |
Lightvalve | 65:a2d7c63419c2 | 325 | -0.15815018117427826f, 0.1855827420949936f, 0.01572786457836628f, |
Lightvalve | 65:a2d7c63419c2 | 326 | -0.2823503911495209f, -0.19912849366664886f, 0.022287487983703613f, |
Lightvalve | 65:a2d7c63419c2 | 327 | 0.01019778847694397f, -0.002432197332382202f, 0.1125744953751564f, |
Lightvalve | 65:a2d7c63419c2 | 328 | 0.024761438369750977f, 0.28052565455436707f, 0.06848252564668655f, |
Lightvalve | 65:a2d7c63419c2 | 329 | 0.07588296383619308f, -0.2828674018383026f, -0.1949537843465805f, |
Lightvalve | 65:a2d7c63419c2 | 330 | 0.0682394951581955f }, { -0.06400725990533829f, -0.039301756769418716f, |
Lightvalve | 65:a2d7c63419c2 | 331 | 0.05148342251777649f, 0.15645751357078552f, -0.015306415967643261f, |
Lightvalve | 65:a2d7c63419c2 | 332 | -0.027875764295458794f, 0.19478058815002441f, -0.1143186166882515f, |
Lightvalve | 65:a2d7c63419c2 | 333 | -0.11950938403606415f, 0.21234765648841858f, 0.2555554211139679f, |
Lightvalve | 65:a2d7c63419c2 | 334 | -0.05989915132522583f, 0.014815526083111763f, 0.12010202556848526f, |
Lightvalve | 65:a2d7c63419c2 | 335 | 0.08785843849182129f, 0.0018573424313217402f, -0.014310447499155998f, |
Lightvalve | 65:a2d7c63419c2 | 336 | 0.08359912782907486f, -0.05963675677776337f, 0.08984222263097763f, |
Lightvalve | 65:a2d7c63419c2 | 337 | -0.17661209404468536f, -0.01255887746810913f, 0.09742525219917297f, |
Lightvalve | 65:a2d7c63419c2 | 338 | -0.2715410590171814f, 0.019773131236433983f, -0.12170138955116272f, |
Lightvalve | 65:a2d7c63419c2 | 339 | 0.21204951405525208f, -0.0392717681825161f, 0.22050541639328003f, |
Lightvalve | 65:a2d7c63419c2 | 340 | 0.1981203556060791f, -0.12718753516674042f, 0.18615314364433289f }, { |
Lightvalve | 65:a2d7c63419c2 | 341 | 0.207803875207901f, -0.10612393915653229f, 0.2099064588546753f, |
Lightvalve | 65:a2d7c63419c2 | 342 | 0.048610176891088486f, -0.18356028199195862f, 0.05922550708055496f, |
Lightvalve | 65:a2d7c63419c2 | 343 | 0.09807947278022766f, 0.05448151379823685f, 0.00759892538189888f, |
Lightvalve | 65:a2d7c63419c2 | 344 | 0.008583632297813892f, -0.02326703630387783f, 0.03895118832588196f, |
Lightvalve | 65:a2d7c63419c2 | 345 | 0.142264261841774f, -0.17807096242904663f, 0.03243169188499451f, |
Lightvalve | 65:a2d7c63419c2 | 346 | 0.29156458377838135f, 0.16580337285995483f, -0.04512497037649155f, |
Lightvalve | 65:a2d7c63419c2 | 347 | 0.24243946373462677f, 0.19388025999069214f, 0.2613176107406616f, |
Lightvalve | 65:a2d7c63419c2 | 348 | 0.21572408080101013f, 0.021654754877090454f, 0.19459950923919678f, |
Lightvalve | 65:a2d7c63419c2 | 349 | -0.12517954409122467f, 0.1592874825000763f, 0.1632046103477478f, |
Lightvalve | 65:a2d7c63419c2 | 350 | -0.2606440782546997f, -0.08548226952552795f, -0.08548004925251007f, |
Lightvalve | 65:a2d7c63419c2 | 351 | -0.13906358182430267f, -0.16921734809875488f }, { -0.15630532801151276f, |
Lightvalve | 65:a2d7c63419c2 | 352 | 0.13156533241271973f, -0.11297933757305145f, 0.12861967086791992f, |
Lightvalve | 65:a2d7c63419c2 | 353 | -0.19767631590366364f, 0.1394348293542862f, -0.23108699917793274f, |
Lightvalve | 65:a2d7c63419c2 | 354 | 0.0800437331199646f, -0.21714667975902557f, 0.08518000692129135f, |
Lightvalve | 65:a2d7c63419c2 | 355 | -0.25191619992256165f, 0.23131662607192993f, 0.03946883976459503f, |
Lightvalve | 65:a2d7c63419c2 | 356 | -0.09874357283115387f, 0.2303425371646881f, -0.19213639199733734f, |
Lightvalve | 65:a2d7c63419c2 | 357 | 0.1962396651506424f, -0.10008331388235092f, -0.19810836017131805f, |
Lightvalve | 65:a2d7c63419c2 | 358 | -0.2060118019580841f, 0.14884798228740692f, 0.05755701661109924f, |
Lightvalve | 65:a2d7c63419c2 | 359 | -0.10641518235206604f, 0.0359015166759491f, 0.1892276555299759f, |
Lightvalve | 65:a2d7c63419c2 | 360 | -0.10104718804359436f, -0.10194158554077148f, 0.0636373832821846f, |
Lightvalve | 65:a2d7c63419c2 | 361 | -0.0030684147495776415f, 0.22902312874794006f, 0.13050015270709991f, |
Lightvalve | 65:a2d7c63419c2 | 362 | 0.13367223739624023f }, { 0.17304399609565735f, -0.11803605407476425f, |
Lightvalve | 65:a2d7c63419c2 | 363 | 0.1952093541622162f, -0.058706384152173996f, 0.07460742443799973f, |
Lightvalve | 65:a2d7c63419c2 | 364 | -0.08487367630004883f, 0.2371104210615158f, -0.27557069063186646f, |
Lightvalve | 65:a2d7c63419c2 | 365 | 0.20663458108901978f, 0.1713942438364029f, -0.27339255809783936f, |
Lightvalve | 65:a2d7c63419c2 | 366 | -0.041794922202825546f, 0.0006373148644343019f, 0.022903289645910263f, |
Lightvalve | 65:a2d7c63419c2 | 367 | -0.03237643837928772f, 0.1001778319478035f, 0.1372859627008438f, |
Lightvalve | 65:a2d7c63419c2 | 368 | 0.2195289433002472f, 0.1444065421819687f, -0.16924221813678741f, |
Lightvalve | 65:a2d7c63419c2 | 369 | 0.17550763487815857f, 0.24889472126960754f, -0.005206882953643799f, |
Lightvalve | 65:a2d7c63419c2 | 370 | -0.09046423435211182f, -0.19790777564048767f, -0.23666583001613617f, |
Lightvalve | 65:a2d7c63419c2 | 371 | -0.04738515615463257f, 0.19731944799423218f, 0.18761177361011505f, |
Lightvalve | 65:a2d7c63419c2 | 372 | -0.12751927971839905f, -0.307704359292984f, -0.1543550342321396f }, { |
Lightvalve | 65:a2d7c63419c2 | 373 | 0.32603657245635986f, -0.3041064739227295f, 0.25856587290763855f, |
Lightvalve | 65:a2d7c63419c2 | 374 | -0.2557964324951172f, -0.3466465473175049f, -0.3196622133255005f, |
Lightvalve | 65:a2d7c63419c2 | 375 | 0.12455102801322937f, -0.11209218949079514f, 0.001982415560632944f, |
Lightvalve | 65:a2d7c63419c2 | 376 | 0.06973601132631302f, 0.14987079799175262f, -0.20265568792819977f, |
Lightvalve | 65:a2d7c63419c2 | 377 | 0.21144899725914001f, -0.10064118355512619f, 0.09263011813163757f, |
Lightvalve | 65:a2d7c63419c2 | 378 | 0.2236812561750412f, 0.11661216616630554f, 0.06638764590024948f, |
Lightvalve | 65:a2d7c63419c2 | 379 | -0.09710270911455154f, -0.1529141068458557f, 0.2093910574913025f, |
Lightvalve | 65:a2d7c63419c2 | 380 | -0.21584033966064453f, 0.008751243352890015f, 0.06805345416069031f, |
Lightvalve | 65:a2d7c63419c2 | 381 | -0.2336517572402954f, 0.01942119002342224f, 0.08388552069664001f, |
Lightvalve | 65:a2d7c63419c2 | 382 | 0.07689709961414337f, -0.1510092169046402f, 0.2813257873058319f, |
Lightvalve | 65:a2d7c63419c2 | 383 | -0.2768191695213318f, -0.037080224603414536f }, { |
Lightvalve | 65:a2d7c63419c2 | 384 | -0.003318269969895482f, 0.08421637862920761f, -0.016360998153686523f, |
Lightvalve | 65:a2d7c63419c2 | 385 | -0.12425577640533447f, -0.35029125213623047f, 0.16315333545207977f, |
Lightvalve | 65:a2d7c63419c2 | 386 | 0.1867244839668274f, 0.04439976066350937f, -0.1956385225057602f, |
Lightvalve | 65:a2d7c63419c2 | 387 | 0.12546296417713165f, 0.14696259796619415f, 0.031027860939502716f, |
Lightvalve | 65:a2d7c63419c2 | 388 | 0.13122601807117462f, 0.28269803524017334f, 0.09633612632751465f, |
Lightvalve | 65:a2d7c63419c2 | 389 | -0.15478374063968658f, 0.22323313355445862f, -0.0710759162902832f, |
Lightvalve | 65:a2d7c63419c2 | 390 | -0.27780935168266296f, 0.053979892283678055f, -0.015637023374438286f, |
Lightvalve | 65:a2d7c63419c2 | 391 | -0.1954222172498703f, -0.0505031943321228f, 0.24318388104438782f, |
Lightvalve | 65:a2d7c63419c2 | 392 | -0.2976081073284149f, -0.10191759467124939f, -0.07833482325077057f, |
Lightvalve | 65:a2d7c63419c2 | 393 | -0.288814902305603f, 0.040884505957365036f, 0.138712078332901f, |
Lightvalve | 65:a2d7c63419c2 | 394 | 0.20733070373535156f, -0.29824215173721313f }, { -0.18242500722408295f, |
Lightvalve | 65:a2d7c63419c2 | 395 | -0.3011151850223541f, -0.18937499821186066f, 0.21996764838695526f, |
Lightvalve | 65:a2d7c63419c2 | 396 | 0.08294257521629333f, 0.19795776903629303f, -0.2721400856971741f, |
Lightvalve | 65:a2d7c63419c2 | 397 | -0.2665696442127228f, -0.1749664843082428f, -0.11208948493003845f, |
Lightvalve | 65:a2d7c63419c2 | 398 | -0.12227600067853928f, 0.13757038116455078f, 0.15364645421504974f, |
Lightvalve | 65:a2d7c63419c2 | 399 | -0.1376083493232727f, 0.14986392855644226f, 0.27994680404663086f, |
Lightvalve | 65:a2d7c63419c2 | 400 | 0.11594970524311066f, -0.0993688553571701f, 0.08206108957529068f, |
Lightvalve | 65:a2d7c63419c2 | 401 | -0.30797436833381653f, 0.1478293389081955f, 0.029855877161026f, |
Lightvalve | 65:a2d7c63419c2 | 402 | 0.037324488162994385f, -0.16034488379955292f, -0.22942794859409332f, |
Lightvalve | 65:a2d7c63419c2 | 403 | -0.07402129471302032f, 0.01556810736656189f, 0.07635907083749771f, |
Lightvalve | 65:a2d7c63419c2 | 404 | 0.1468832641839981f, 0.2229032814502716f, 0.2030598223209381f, |
Lightvalve | 65:a2d7c63419c2 | 405 | 0.011082095094025135f }, { -0.031403448432683945f, -0.179839089512825f, |
Lightvalve | 65:a2d7c63419c2 | 406 | -0.061174169182777405f, 0.08824600279331207f, -0.05152688920497894f, |
Lightvalve | 65:a2d7c63419c2 | 407 | 0.09737619012594223f, -0.019338518381118774f, -0.149160236120224f, |
Lightvalve | 65:a2d7c63419c2 | 408 | -0.17775475978851318f, 0.20135465264320374f, -0.26330751180648804f, |
Lightvalve | 65:a2d7c63419c2 | 409 | -0.20573703944683075f, -0.18354615569114685f, 0.2306104153394699f, |
Lightvalve | 65:a2d7c63419c2 | 410 | -0.12902851402759552f, -0.32519760727882385f, -0.18613660335540771f, |
Lightvalve | 65:a2d7c63419c2 | 411 | -0.04431162402033806f, 0.07692430913448334f, 0.2852676808834076f, |
Lightvalve | 65:a2d7c63419c2 | 412 | 0.18445321917533875f, -0.1602698266506195f, 0.1428212821483612f, |
Lightvalve | 65:a2d7c63419c2 | 413 | 0.24115940928459167f, -0.15170736610889435f, 0.2710312306880951f, |
Lightvalve | 65:a2d7c63419c2 | 414 | -0.08893628418445587f, 0.08192634582519531f, 0.1068575456738472f, |
Lightvalve | 65:a2d7c63419c2 | 415 | -0.2417295277118683f, 0.018182098865509033f, 0.011811523698270321f }, { |
Lightvalve | 65:a2d7c63419c2 | 416 | 0.1185283288359642f, -0.1314961016178131f, -0.2746659219264984f, |
Lightvalve | 65:a2d7c63419c2 | 417 | 0.018920723348855972f, 0.11404602974653244f, 0.14093975722789764f, |
Lightvalve | 65:a2d7c63419c2 | 418 | -0.1613728106021881f, 0.010870097205042839f, 0.05537481606006622f, |
Lightvalve | 65:a2d7c63419c2 | 419 | -0.1315172165632248f, -0.18558558821678162f, -0.12937135994434357f, |
Lightvalve | 65:a2d7c63419c2 | 420 | -0.20973187685012817f, 0.1692427098751068f, -0.045904770493507385f, |
Lightvalve | 65:a2d7c63419c2 | 421 | 0.1710028052330017f, 0.01777065359055996f, 0.29331231117248535f, |
Lightvalve | 65:a2d7c63419c2 | 422 | -0.12049029022455215f, 0.04678349569439888f, -0.25235429406166077f, |
Lightvalve | 65:a2d7c63419c2 | 423 | -0.033619701862335205f, -0.042226120829582214f, -0.27914759516716003f, |
Lightvalve | 65:a2d7c63419c2 | 424 | 0.006846277974545956f, 0.08922392129898071f, 0.171451598405838f, |
Lightvalve | 65:a2d7c63419c2 | 425 | 0.050000399351119995f, -0.04939000681042671f, -0.2795959711074829f, |
Lightvalve | 65:a2d7c63419c2 | 426 | 0.26425138115882874f, -0.2566368877887726f }, }; |
Lightvalve | 65:a2d7c63419c2 | 427 | |
Lightvalve | 65:a2d7c63419c2 | 428 | const float h2[32][32] = { { -0.13349971175193787f, -0.10295046865940094f, |
Lightvalve | 65:a2d7c63419c2 | 429 | -0.04925942420959473f, 0.005893866065889597f, -0.12596699595451355f, |
Lightvalve | 65:a2d7c63419c2 | 430 | 0.2987118661403656f, 0.07975713163614273f, 0.06396704912185669f, |
Lightvalve | 65:a2d7c63419c2 | 431 | -0.30411389470100403f, -0.10008957982063293f, 0.014623122289776802f, |
Lightvalve | 65:a2d7c63419c2 | 432 | -0.0538821816444397f, 0.048359375447034836f, 0.24325567483901978f, |
Lightvalve | 65:a2d7c63419c2 | 433 | 0.10184130072593689f, -0.24775750935077667f, 0.07803884148597717f, |
Lightvalve | 65:a2d7c63419c2 | 434 | -0.21483641862869263f, 0.17120853066444397f, 0.00830860622227192f, |
Lightvalve | 65:a2d7c63419c2 | 435 | -0.29617825150489807f, -0.22132611274719238f, -0.23983746767044067f, |
Lightvalve | 65:a2d7c63419c2 | 436 | -0.28275105357170105f, -0.3873054087162018f, 0.30998873710632324f, |
Lightvalve | 65:a2d7c63419c2 | 437 | -0.4226490557193756f, -0.11779281497001648f, 0.23828622698783875f, |
Lightvalve | 65:a2d7c63419c2 | 438 | 0.11771553754806519f, -0.37041905522346497f, -0.30605563521385193f }, { |
Lightvalve | 65:a2d7c63419c2 | 439 | -0.16083313524723053f, 0.002147972583770752f, -0.04321768879890442f, |
Lightvalve | 65:a2d7c63419c2 | 440 | 0.20690490305423737f, 0.022892558947205544f, 0.008302271366119385f, |
Lightvalve | 65:a2d7c63419c2 | 441 | -0.20543429255485535f, -0.08731026947498322f, 0.24677053093910217f, |
Lightvalve | 65:a2d7c63419c2 | 442 | 0.048597872257232666f, 0.20651067793369293f, 0.16381694376468658f, |
Lightvalve | 65:a2d7c63419c2 | 443 | 0.28672969341278076f, -0.3506166338920593f, 0.06659439951181412f, |
Lightvalve | 65:a2d7c63419c2 | 444 | 0.04734180495142937f, 0.03125026077032089f, -0.2737269401550293f, |
Lightvalve | 65:a2d7c63419c2 | 445 | -0.21843840181827545f, 0.3144419193267822f, 0.10113385319709778f, |
Lightvalve | 65:a2d7c63419c2 | 446 | 0.14034439623355865f, -0.16832955181598663f, 0.33271604776382446f, |
Lightvalve | 65:a2d7c63419c2 | 447 | 0.19579239189624786f, 0.14696596562862396f, 0.06076221913099289f, |
Lightvalve | 65:a2d7c63419c2 | 448 | 0.24354417622089386f, -0.28620439767837524f, -0.0511949360370636f, |
Lightvalve | 65:a2d7c63419c2 | 449 | 0.2096933126449585f, 0.040742650628089905f }, { -0.1579037755727768f, |
Lightvalve | 65:a2d7c63419c2 | 450 | 0.28447648882865906f, -0.1789936125278473f, 0.20799604058265686f, |
Lightvalve | 65:a2d7c63419c2 | 451 | 0.025723248720169067f, 0.17740526795387268f, -0.1666354387998581f, |
Lightvalve | 65:a2d7c63419c2 | 452 | -0.06060470640659332f, -0.017253071069717407f, -0.2790656089782715f, |
Lightvalve | 65:a2d7c63419c2 | 453 | -0.16800916194915771f, -0.2990717589855194f, 0.07126197218894958f, |
Lightvalve | 65:a2d7c63419c2 | 454 | -0.08032660186290741f, -0.1799015998840332f, -0.1891922950744629f, |
Lightvalve | 65:a2d7c63419c2 | 455 | 0.2556300461292267f, 0.2080206573009491f, -0.24888339638710022f, |
Lightvalve | 65:a2d7c63419c2 | 456 | 0.27691522240638733f, -0.21319638192653656f, -0.14012537896633148f, |
Lightvalve | 65:a2d7c63419c2 | 457 | -0.30466505885124207f, -0.013728171586990356f, -0.1629670113325119f, |
Lightvalve | 65:a2d7c63419c2 | 458 | 0.2530798614025116f, 0.0633285641670227f, 0.0011726915836334229f, |
Lightvalve | 65:a2d7c63419c2 | 459 | -0.14820529520511627f, 0.2823629677295685f, 0.10884168744087219f, |
Lightvalve | 65:a2d7c63419c2 | 460 | -0.2637729346752167f }, { -0.12927524745464325f, -0.01806354522705078f, |
Lightvalve | 65:a2d7c63419c2 | 461 | -0.23058539628982544f, -0.030255556106567383f, -0.6437712907791138f, |
Lightvalve | 65:a2d7c63419c2 | 462 | -0.17983144521713257f, 0.12746267020702362f, 0.08151327818632126f, |
Lightvalve | 65:a2d7c63419c2 | 463 | -0.06944303214550018f, 0.09271347522735596f, -0.0808296874165535f, |
Lightvalve | 65:a2d7c63419c2 | 464 | -0.24855418503284454f, -0.11665885150432587f, 0.12946322560310364f, |
Lightvalve | 65:a2d7c63419c2 | 465 | -0.0930287167429924f, -0.3423658609390259f, 0.10996055603027344f, |
Lightvalve | 65:a2d7c63419c2 | 466 | 0.24023392796516418f, 0.2942558825016022f, -0.17709596455097198f, |
Lightvalve | 65:a2d7c63419c2 | 467 | -0.1255558878183365f, -0.2134709507226944f, -0.06394433975219727f, |
Lightvalve | 65:a2d7c63419c2 | 468 | -0.24457648396492004f, 0.10029968619346619f, -0.2400282919406891f, |
Lightvalve | 65:a2d7c63419c2 | 469 | 0.11666780710220337f, -0.14067168533802032f, -0.22396358847618103f, |
Lightvalve | 65:a2d7c63419c2 | 470 | 0.2546447217464447f, -0.002586635062471032f, 0.04970479756593704f }, { |
Lightvalve | 65:a2d7c63419c2 | 471 | -0.18258020281791687f, 0.2506926953792572f, -0.0804666131734848f, |
Lightvalve | 65:a2d7c63419c2 | 472 | 0.05040470138192177f, 0.02259594015777111f, -0.23578980565071106f, |
Lightvalve | 65:a2d7c63419c2 | 473 | -0.09264150261878967f, 0.0013416205765679479f, 0.043158918619155884f, |
Lightvalve | 65:a2d7c63419c2 | 474 | -0.2690317630767822f, 0.04383622854948044f, -0.25736406445503235f, |
Lightvalve | 65:a2d7c63419c2 | 475 | -0.21347089111804962f, -0.19318343698978424f, -0.21244710683822632f, |
Lightvalve | 65:a2d7c63419c2 | 476 | -0.13572444021701813f, -0.1285906583070755f, 0.15626338124275208f, |
Lightvalve | 65:a2d7c63419c2 | 477 | -0.050212472677230835f, 0.0982573851943016f, 0.11135826259851456f, |
Lightvalve | 65:a2d7c63419c2 | 478 | 0.06453899294137955f, 0.19172045588493347f, -0.22890380024909973f, |
Lightvalve | 65:a2d7c63419c2 | 479 | -0.12237071990966797f, 0.09743352234363556f, 0.10070990025997162f, |
Lightvalve | 65:a2d7c63419c2 | 480 | 0.28772199153900146f, 0.2695164978504181f, -0.16498444974422455f, |
Lightvalve | 65:a2d7c63419c2 | 481 | 0.014173826202750206f, -0.2047310173511505f }, { -0.19158349931240082f, |
Lightvalve | 65:a2d7c63419c2 | 482 | -0.004258692264556885f, 0.032371193170547485f, -0.3141036927700043f, |
Lightvalve | 65:a2d7c63419c2 | 483 | -0.026762403547763824f, -0.29336631298065186f, 0.08645252138376236f, |
Lightvalve | 65:a2d7c63419c2 | 484 | -0.16367173194885254f, -0.03548547625541687f, 0.08825305104255676f, |
Lightvalve | 65:a2d7c63419c2 | 485 | -0.16509909927845f, 0.22309480607509613f, -0.22282296419143677f, |
Lightvalve | 65:a2d7c63419c2 | 486 | 0.2915789783000946f, -0.24179422855377197f, -0.19140881299972534f, |
Lightvalve | 65:a2d7c63419c2 | 487 | 0.21163100004196167f, 0.24713221192359924f, 0.28102827072143555f, |
Lightvalve | 65:a2d7c63419c2 | 488 | 0.25016462802886963f, 0.020191945135593414f, 0.19882827997207642f, |
Lightvalve | 65:a2d7c63419c2 | 489 | -0.1307595670223236f, -0.059169698506593704f, 0.2300402969121933f, |
Lightvalve | 65:a2d7c63419c2 | 490 | -0.261514276266098f, 0.22954094409942627f, -0.12279488891363144f, |
Lightvalve | 65:a2d7c63419c2 | 491 | 0.05800282955169678f, -0.26823562383651733f, 0.16349054872989655f, |
Lightvalve | 65:a2d7c63419c2 | 492 | 0.1337476223707199f }, { -0.21433322131633759f, -0.1279313862323761f, |
Lightvalve | 65:a2d7c63419c2 | 493 | -0.11171227693557739f, 0.27164509892463684f, -0.26441383361816406f, |
Lightvalve | 65:a2d7c63419c2 | 494 | 0.2845393121242523f, 0.07359254360198975f, -0.20844537019729614f, |
Lightvalve | 65:a2d7c63419c2 | 495 | -0.26620519161224365f, 0.17144301533699036f, -0.061109013855457306f, |
Lightvalve | 65:a2d7c63419c2 | 496 | -0.19284695386886597f, 0.29584869742393494f, -0.02723398245871067f, |
Lightvalve | 65:a2d7c63419c2 | 497 | -0.11244286596775055f, 0.0967603325843811f, -0.16153597831726074f, |
Lightvalve | 65:a2d7c63419c2 | 498 | 0.18742787837982178f, -0.13470113277435303f, 0.12359786033630371f, |
Lightvalve | 65:a2d7c63419c2 | 499 | 0.0469309501349926f, 0.02421507239341736f, -0.07988794147968292f, |
Lightvalve | 65:a2d7c63419c2 | 500 | -0.15143592655658722f, -0.18177983164787292f, 0.1452380120754242f, |
Lightvalve | 65:a2d7c63419c2 | 501 | 0.2337561547756195f, -0.17263798415660858f, -0.11822041869163513f, |
Lightvalve | 65:a2d7c63419c2 | 502 | 0.19546762108802795f, -0.16657039523124695f, -0.033323969691991806f }, { |
Lightvalve | 65:a2d7c63419c2 | 503 | 0.29264822602272034f, 0.11346611380577087f, 0.04012581706047058f, |
Lightvalve | 65:a2d7c63419c2 | 504 | -0.0461408905684948f, 0.225418359041214f, -0.05009126663208008f, |
Lightvalve | 65:a2d7c63419c2 | 505 | 0.013211707584559917f, 0.004197537899017334f, 0.2864855229854584f, |
Lightvalve | 65:a2d7c63419c2 | 506 | 0.01006925106048584f, -0.010690944269299507f, 0.11204484105110168f, |
Lightvalve | 65:a2d7c63419c2 | 507 | -0.16305525600910187f, -0.09700464457273483f, 0.08624142408370972f, |
Lightvalve | 65:a2d7c63419c2 | 508 | -0.3024343252182007f, -0.29751643538475037f, 0.2706601917743683f, |
Lightvalve | 65:a2d7c63419c2 | 509 | 0.19159749150276184f, -0.1787676364183426f, 0.07430826127529144f, |
Lightvalve | 65:a2d7c63419c2 | 510 | 0.05496254935860634f, -0.07979777455329895f, 0.16874255239963531f, |
Lightvalve | 65:a2d7c63419c2 | 511 | -0.37327951192855835f, 0.09258365631103516f, 0.44089770317077637f, |
Lightvalve | 65:a2d7c63419c2 | 512 | -0.042961325496435165f, -0.14135785400867462f, 0.07403197884559631f, |
Lightvalve | 65:a2d7c63419c2 | 513 | 0.09825335443019867f, 0.07322394847869873f }, { 0.28564146161079407f, |
Lightvalve | 65:a2d7c63419c2 | 514 | 0.2890130579471588f, -0.021617114543914795f, 0.08250059932470322f, |
Lightvalve | 65:a2d7c63419c2 | 515 | 0.3030112683773041f, 0.07065775990486145f, -0.236245796084404f, |
Lightvalve | 65:a2d7c63419c2 | 516 | -0.2608001232147217f, 0.29470762610435486f, -0.06864601373672485f, |
Lightvalve | 65:a2d7c63419c2 | 517 | 0.2483109086751938f, -0.20344071090221405f, 0.2957691252231598f, |
Lightvalve | 65:a2d7c63419c2 | 518 | -0.13390012085437775f, 0.19158922135829926f, 0.3726794719696045f, |
Lightvalve | 65:a2d7c63419c2 | 519 | 0.02077532187104225f, 0.06025278568267822f, 0.05459544435143471f, |
Lightvalve | 65:a2d7c63419c2 | 520 | 0.41055813431739807f, 0.32145416736602783f, 0.030043581500649452f, |
Lightvalve | 65:a2d7c63419c2 | 521 | 0.28743305802345276f, 0.19736182689666748f, 0.1656898558139801f, |
Lightvalve | 65:a2d7c63419c2 | 522 | -0.28868207335472107f, -0.039911627769470215f, -0.006442106794565916f, |
Lightvalve | 65:a2d7c63419c2 | 523 | 0.2501918375492096f, -0.14010676741600037f, -0.10169651359319687f, |
Lightvalve | 65:a2d7c63419c2 | 524 | -0.15317825973033905f }, { 0.2615049183368683f, 0.08643358945846558f, |
Lightvalve | 65:a2d7c63419c2 | 525 | -0.29237738251686096f, -0.2458128184080124f, 0.20376496016979218f, |
Lightvalve | 65:a2d7c63419c2 | 526 | -0.0771239846944809f, 0.1555452048778534f, -0.15540927648544312f, |
Lightvalve | 65:a2d7c63419c2 | 527 | 0.18755429983139038f, -0.07031691074371338f, -0.06268419325351715f, |
Lightvalve | 65:a2d7c63419c2 | 528 | -0.041090548038482666f, 0.042330075055360794f, 0.27333545684814453f, |
Lightvalve | 65:a2d7c63419c2 | 529 | -0.008807391859591007f, 0.1133832335472107f, -0.040624819695949554f, |
Lightvalve | 65:a2d7c63419c2 | 530 | -0.2859399914741516f, -0.26647016406059265f, -0.2497035712003708f, |
Lightvalve | 65:a2d7c63419c2 | 531 | 0.09534543007612228f, 0.09418291598558426f, -0.2307620644569397f, |
Lightvalve | 65:a2d7c63419c2 | 532 | 0.055859606713056564f, -0.07496815174818039f, -0.19647599756717682f, |
Lightvalve | 65:a2d7c63419c2 | 533 | 0.02131301537156105f, 0.09323979169130325f, 0.2113950550556183f, |
Lightvalve | 65:a2d7c63419c2 | 534 | 0.0796298086643219f, -0.06491973996162415f, -0.3819006681442261f }, { |
Lightvalve | 65:a2d7c63419c2 | 535 | 0.19981321692466736f, 0.1956864297389984f, -0.033508092164993286f, |
Lightvalve | 65:a2d7c63419c2 | 536 | -0.22838544845581055f, -0.12505969405174255f, 0.026693344116210938f, |
Lightvalve | 65:a2d7c63419c2 | 537 | 0.07720576971769333f, 0.14285165071487427f, -0.17670965194702148f, |
Lightvalve | 65:a2d7c63419c2 | 538 | 0.17403557896614075f, -0.22244372963905334f, 0.1680217683315277f, |
Lightvalve | 65:a2d7c63419c2 | 539 | -0.1060299277305603f, 0.1071399599313736f, -0.11092887073755264f, |
Lightvalve | 65:a2d7c63419c2 | 540 | -0.05349590629339218f, 0.03990337252616882f, 0.0716913640499115f, |
Lightvalve | 65:a2d7c63419c2 | 541 | 0.22807641327381134f, -0.13356927037239075f, 0.1965365707874298f, |
Lightvalve | 65:a2d7c63419c2 | 542 | 0.1245347261428833f, 0.07470300793647766f, 0.1796993613243103f, |
Lightvalve | 65:a2d7c63419c2 | 543 | -0.004812136758118868f, 0.10351252555847168f, -0.057905394583940506f, |
Lightvalve | 65:a2d7c63419c2 | 544 | -0.18869787454605103f, 0.13817378878593445f, 0.17853263020515442f, |
Lightvalve | 65:a2d7c63419c2 | 545 | -0.027914874255657196f, -0.02365732006728649f }, { -0.2546439468860626f, |
Lightvalve | 65:a2d7c63419c2 | 546 | -0.09556084871292114f, 0.12328919768333435f, 0.03998832777142525f, |
Lightvalve | 65:a2d7c63419c2 | 547 | -0.30052247643470764f, 0.24699172377586365f, -0.32009536027908325f, |
Lightvalve | 65:a2d7c63419c2 | 548 | -0.11670328676700592f, 0.17735600471496582f, 0.009893029928207397f, |
Lightvalve | 65:a2d7c63419c2 | 549 | 0.26776403188705444f, 0.19816415011882782f, -0.05558810010552406f, |
Lightvalve | 65:a2d7c63419c2 | 550 | -0.19641350209712982f, 0.3241870105266571f, -0.0002136280236300081f, |
Lightvalve | 65:a2d7c63419c2 | 551 | -0.015536589547991753f, 0.10842388868331909f, 0.2418537586927414f, |
Lightvalve | 65:a2d7c63419c2 | 552 | 0.25024867057800293f, -0.0643463209271431f, -0.06727208197116852f, |
Lightvalve | 65:a2d7c63419c2 | 553 | 0.09996896982192993f, 0.08140590041875839f, -0.12102364748716354f, |
Lightvalve | 65:a2d7c63419c2 | 554 | 0.09566594660282135f, 0.026901600882411003f, 0.24559487402439117f, |
Lightvalve | 65:a2d7c63419c2 | 555 | -0.288028746843338f, -0.2434448003768921f, 0.1651056408882141f, |
Lightvalve | 65:a2d7c63419c2 | 556 | 0.23462900519371033f }, { -0.08816954493522644f, 0.2728963792324066f, |
Lightvalve | 65:a2d7c63419c2 | 557 | -0.07170480489730835f, 0.08861888200044632f, -0.08407828211784363f, |
Lightvalve | 65:a2d7c63419c2 | 558 | 0.20119628310203552f, -0.021976735442876816f, 0.020944571122527122f, |
Lightvalve | 65:a2d7c63419c2 | 559 | -0.15294449031352997f, -0.038666754961013794f, -0.1334909051656723f, |
Lightvalve | 65:a2d7c63419c2 | 560 | 0.2502269148826599f, 0.20107106864452362f, -0.2309870719909668f, |
Lightvalve | 65:a2d7c63419c2 | 561 | 0.26465773582458496f, 0.09385055303573608f, -0.0016800533048808575f, |
Lightvalve | 65:a2d7c63419c2 | 562 | 0.21900424361228943f, 0.22734272480010986f, 0.15115073323249817f, |
Lightvalve | 65:a2d7c63419c2 | 563 | -0.3155216872692108f, 0.03708222880959511f, -0.19714993238449097f, |
Lightvalve | 65:a2d7c63419c2 | 564 | 0.18521378934383392f, 0.10345728695392609f, 0.21989409625530243f, |
Lightvalve | 65:a2d7c63419c2 | 565 | -0.008119909092783928f, -0.27566710114479065f, 0.18573936820030212f, |
Lightvalve | 65:a2d7c63419c2 | 566 | 0.15478622913360596f, 0.03387163206934929f, -0.09682217240333557f }, { |
Lightvalve | 65:a2d7c63419c2 | 567 | 0.14700931310653687f, 0.1833711564540863f, -0.0858893096446991f, |
Lightvalve | 65:a2d7c63419c2 | 568 | 0.03548716753721237f, -0.03290480375289917f, 0.2733006179332733f, |
Lightvalve | 65:a2d7c63419c2 | 569 | -0.00011049837485188618f, -0.1723647564649582f, 0.000652611255645752f, |
Lightvalve | 65:a2d7c63419c2 | 570 | -0.22920364141464233f, 0.03385178744792938f, -0.11219978332519531f, |
Lightvalve | 65:a2d7c63419c2 | 571 | 0.23820827901363373f, 0.33258119225502014f, 0.05578869208693504f, |
Lightvalve | 65:a2d7c63419c2 | 572 | -0.21240083873271942f, -0.07963520288467407f, 0.14483880996704102f, |
Lightvalve | 65:a2d7c63419c2 | 573 | -0.18910400569438934f, -0.1327388882637024f, -0.024066906422376633f, |
Lightvalve | 65:a2d7c63419c2 | 574 | 0.2018621563911438f, -0.2228696048259735f, 0.2577541768550873f, |
Lightvalve | 65:a2d7c63419c2 | 575 | -0.16621330380439758f, 0.06491447985172272f, -0.09694764763116837f, |
Lightvalve | 65:a2d7c63419c2 | 576 | 0.19547560811042786f, -0.011228948831558228f, 0.26896968483924866f, |
Lightvalve | 65:a2d7c63419c2 | 577 | -0.360990971326828f, -0.2201414704322815f }, { -0.23982827365398407f, |
Lightvalve | 65:a2d7c63419c2 | 578 | 0.03880670666694641f, -0.013682037591934204f, -0.11685100197792053f, |
Lightvalve | 65:a2d7c63419c2 | 579 | -0.020662933588027954f, 0.30190005898475647f, -0.14934301376342773f, |
Lightvalve | 65:a2d7c63419c2 | 580 | -0.15993990004062653f, 0.1152651309967041f, -0.11991468071937561f, |
Lightvalve | 65:a2d7c63419c2 | 581 | -0.15497799217700958f, 0.11116543412208557f, -0.2045515924692154f, |
Lightvalve | 65:a2d7c63419c2 | 582 | 0.2403949797153473f, -0.21275603771209717f, 0.05732181668281555f, |
Lightvalve | 65:a2d7c63419c2 | 583 | -0.2770107090473175f, 0.088544100522995f, 0.19012078642845154f, |
Lightvalve | 65:a2d7c63419c2 | 584 | -0.07119561731815338f, -0.18914666771888733f, -0.10413256287574768f, |
Lightvalve | 65:a2d7c63419c2 | 585 | -0.16050675511360168f, 0.11598068475723267f, -0.03151249885559082f, |
Lightvalve | 65:a2d7c63419c2 | 586 | -0.1937510371208191f, 0.18474078178405762f, 0.19502457976341248f, |
Lightvalve | 65:a2d7c63419c2 | 587 | 0.22045472264289856f, -0.29474368691444397f, 0.09864541888237f, |
Lightvalve | 65:a2d7c63419c2 | 588 | 0.06054645776748657f }, { -0.1617974042892456f, 0.1317739188671112f, |
Lightvalve | 65:a2d7c63419c2 | 589 | 0.03260180354118347f, -0.19948318600654602f, -0.0928228572010994f, |
Lightvalve | 65:a2d7c63419c2 | 590 | -0.1987132430076599f, -0.1755896806716919f, 0.11372503638267517f, |
Lightvalve | 65:a2d7c63419c2 | 591 | 0.05445769429206848f, 0.07657262682914734f, -0.18663887679576874f, |
Lightvalve | 65:a2d7c63419c2 | 592 | -0.23218511044979095f, 0.2056141495704651f, 0.03608625754714012f, |
Lightvalve | 65:a2d7c63419c2 | 593 | 0.33959874510765076f, -0.3019200563430786f, -0.25386664271354675f, |
Lightvalve | 65:a2d7c63419c2 | 594 | -0.18997573852539062f, -0.06610497832298279f, -0.1891406625509262f, |
Lightvalve | 65:a2d7c63419c2 | 595 | -0.10423542559146881f, -0.11639183014631271f, -0.3044300675392151f, |
Lightvalve | 65:a2d7c63419c2 | 596 | 0.2589237689971924f, -0.06821785122156143f, 0.17655706405639648f, |
Lightvalve | 65:a2d7c63419c2 | 597 | 0.1661142259836197f, -0.24122722446918488f, -0.0006675124168395996f, |
Lightvalve | 65:a2d7c63419c2 | 598 | -0.2239055633544922f, -0.0723206177353859f, 0.2102394998073578f }, { |
Lightvalve | 65:a2d7c63419c2 | 599 | 0.036086976528167725f, -0.062024205923080444f, 0.10704237222671509f, |
Lightvalve | 65:a2d7c63419c2 | 600 | -0.1612134575843811f, -0.1631729155778885f, 0.1497061848640442f, |
Lightvalve | 65:a2d7c63419c2 | 601 | 0.03271482139825821f, 0.27597710490226746f, -0.23304778337478638f, |
Lightvalve | 65:a2d7c63419c2 | 602 | -0.035415440797805786f, 0.1086379662156105f, 0.07746559381484985f, |
Lightvalve | 65:a2d7c63419c2 | 603 | 0.13613636791706085f, 0.09150157123804092f, 0.25167548656463623f, |
Lightvalve | 65:a2d7c63419c2 | 604 | -0.24342824518680573f, -0.027234435081481934f, 0.19620582461357117f, |
Lightvalve | 65:a2d7c63419c2 | 605 | 0.44021302461624146f, -0.23242811858654022f, -0.05763920396566391f, |
Lightvalve | 65:a2d7c63419c2 | 606 | -0.09912444651126862f, -0.19671492278575897f, -0.33463647961616516f, |
Lightvalve | 65:a2d7c63419c2 | 607 | -0.40228715538978577f, -0.000608850852586329f, 0.06298207491636276f, |
Lightvalve | 65:a2d7c63419c2 | 608 | 0.39882805943489075f, -0.2531542181968689f, 0.24004116654396057f, |
Lightvalve | 65:a2d7c63419c2 | 609 | -0.30925723910331726f, -0.26930177211761475f }, { 0.1379433274269104f, |
Lightvalve | 65:a2d7c63419c2 | 610 | -0.16078773140907288f, 0.11784148216247559f, 0.20431241393089294f, |
Lightvalve | 65:a2d7c63419c2 | 611 | 0.29410573840141296f, 0.19759181141853333f, 0.09952005743980408f, |
Lightvalve | 65:a2d7c63419c2 | 612 | 0.1544932872056961f, 0.040603965520858765f, -0.2119520902633667f, |
Lightvalve | 65:a2d7c63419c2 | 613 | 0.18040086328983307f, -0.38904741406440735f, -0.046765703707933426f, |
Lightvalve | 65:a2d7c63419c2 | 614 | 0.13744039833545685f, -0.3137235641479492f, 0.05679671838879585f, |
Lightvalve | 65:a2d7c63419c2 | 615 | 0.1565159410238266f, 0.2297056019306183f, 0.032699450850486755f, |
Lightvalve | 65:a2d7c63419c2 | 616 | 0.20715069770812988f, -0.016263214871287346f, -0.3025153875350952f, |
Lightvalve | 65:a2d7c63419c2 | 617 | 0.26029130816459656f, 0.42276427149772644f, 0.2875830829143524f, |
Lightvalve | 65:a2d7c63419c2 | 618 | -0.12763257324695587f, -0.20330224931240082f, -0.07699788361787796f, |
Lightvalve | 65:a2d7c63419c2 | 619 | -0.08671019971370697f, -0.019541800022125244f, 0.4000849425792694f, |
Lightvalve | 65:a2d7c63419c2 | 620 | 0.17512208223342896f }, { 0.09298902750015259f, 0.2841971218585968f, |
Lightvalve | 65:a2d7c63419c2 | 621 | -0.0814327746629715f, -0.010091223753988743f, -0.12308911234140396f, |
Lightvalve | 65:a2d7c63419c2 | 622 | 0.11057800054550171f, -0.1737426221370697f, 0.20642486214637756f, |
Lightvalve | 65:a2d7c63419c2 | 623 | -0.2925014793872833f, 0.022429823875427246f, -0.06304851174354553f, |
Lightvalve | 65:a2d7c63419c2 | 624 | -0.07166500389575958f, -0.26361000537872314f, 0.050878144800662994f, |
Lightvalve | 65:a2d7c63419c2 | 625 | 0.189671128988266f, 0.30893731117248535f, 0.1296386420726776f, |
Lightvalve | 65:a2d7c63419c2 | 626 | 0.027322769165039062f, 0.29731038212776184f, 0.14744597673416138f, |
Lightvalve | 65:a2d7c63419c2 | 627 | 0.2998683750629425f, 0.08306887000799179f, 0.06231796741485596f, |
Lightvalve | 65:a2d7c63419c2 | 628 | 0.3401893973350525f, -0.004573390819132328f, 0.18759925663471222f, |
Lightvalve | 65:a2d7c63419c2 | 629 | -0.16945621371269226f, 0.01625938154757023f, 0.14345040917396545f, |
Lightvalve | 65:a2d7c63419c2 | 630 | -0.11986468732357025f, -0.21137407422065735f, 0.1280972957611084f }, { |
Lightvalve | 65:a2d7c63419c2 | 631 | -0.14775772392749786f, 0.29651907086372375f, 0.02990397810935974f, |
Lightvalve | 65:a2d7c63419c2 | 632 | -0.06818585097789764f, 0.1993788629770279f, -0.22813674807548523f, |
Lightvalve | 65:a2d7c63419c2 | 633 | 0.16850803792476654f, 0.24565419554710388f, -0.2325194776058197f, |
Lightvalve | 65:a2d7c63419c2 | 634 | -0.2458522766828537f, -0.017307782545685768f, -0.12818260490894318f, |
Lightvalve | 65:a2d7c63419c2 | 635 | -0.17801909148693085f, -0.2504909038543701f, 0.1731644719839096f, |
Lightvalve | 65:a2d7c63419c2 | 636 | 0.18156693875789642f, 0.23218704760074615f, 0.11064860224723816f, |
Lightvalve | 65:a2d7c63419c2 | 637 | -0.15070302784442902f, 0.10314767062664032f, 0.3309069275856018f, |
Lightvalve | 65:a2d7c63419c2 | 638 | -0.28518369793891907f, -0.07374785840511322f, 0.05567348375916481f, |
Lightvalve | 65:a2d7c63419c2 | 639 | -0.01467915065586567f, -0.3420534133911133f, -0.21914657950401306f, |
Lightvalve | 65:a2d7c63419c2 | 640 | 0.23488031327724457f, -0.2205982804298401f, 0.28094157576560974f, |
Lightvalve | 65:a2d7c63419c2 | 641 | -0.15506510436534882f, 0.07852166146039963f }, { 0.2703488767147064f, |
Lightvalve | 65:a2d7c63419c2 | 642 | -0.16041381657123566f, 0.12738299369812012f, -0.045484237372875214f, |
Lightvalve | 65:a2d7c63419c2 | 643 | 0.06815514713525772f, 0.1861400008201599f, -0.15391220152378082f, |
Lightvalve | 65:a2d7c63419c2 | 644 | 0.28177282214164734f, 0.1474648416042328f, -0.23766008019447327f, |
Lightvalve | 65:a2d7c63419c2 | 645 | 0.025048013776540756f, 0.06622862070798874f, 0.09594401717185974f, |
Lightvalve | 65:a2d7c63419c2 | 646 | -0.1663329154253006f, -0.10072105377912521f, -0.044219132512807846f, |
Lightvalve | 65:a2d7c63419c2 | 647 | -0.2531753182411194f, 0.08700510859489441f, -0.26066508889198303f, |
Lightvalve | 65:a2d7c63419c2 | 648 | 0.07304855436086655f, -0.13394378125667572f, 0.22174499928951263f, |
Lightvalve | 65:a2d7c63419c2 | 649 | -0.18301571905612946f, -0.16244065761566162f, -0.004656728822737932f, |
Lightvalve | 65:a2d7c63419c2 | 650 | 0.2568950057029724f, 0.15513287484645844f, -0.2911604344844818f, |
Lightvalve | 65:a2d7c63419c2 | 651 | 0.08541131019592285f, 0.08213254809379578f, -0.258662611246109f, |
Lightvalve | 65:a2d7c63419c2 | 652 | 0.04998021572828293f }, { -0.06283275783061981f, -0.26753589510917664f, |
Lightvalve | 65:a2d7c63419c2 | 653 | -0.10381917655467987f, -0.13344663381576538f, 0.2644997537136078f, |
Lightvalve | 65:a2d7c63419c2 | 654 | 0.2204643189907074f, 0.2924788296222687f, -0.17931663990020752f, |
Lightvalve | 65:a2d7c63419c2 | 655 | -0.09078609943389893f, -0.17306232452392578f, 0.02247890830039978f, |
Lightvalve | 65:a2d7c63419c2 | 656 | -0.26996222138404846f, 0.22075030207633972f, -0.3029964864253998f, |
Lightvalve | 65:a2d7c63419c2 | 657 | 0.21873190999031067f, -0.0030784308910369873f, 0.18228653073310852f, |
Lightvalve | 65:a2d7c63419c2 | 658 | 0.09971508383750916f, -0.242676243185997f, -0.1424383968114853f, |
Lightvalve | 65:a2d7c63419c2 | 659 | 0.19031599164009094f, 0.3004438579082489f, -0.23650792241096497f, |
Lightvalve | 65:a2d7c63419c2 | 660 | -0.2683113217353821f, 0.29957786202430725f, 0.08561205863952637f, |
Lightvalve | 65:a2d7c63419c2 | 661 | -0.1366746425628662f, -0.15950153768062592f, -0.07675467431545258f, |
Lightvalve | 65:a2d7c63419c2 | 662 | -0.2218506634235382f, -0.2795913517475128f, 0.1869203746318817f }, { |
Lightvalve | 65:a2d7c63419c2 | 663 | 0.2003176510334015f, -0.27792131900787354f, 0.055196613073349f, |
Lightvalve | 65:a2d7c63419c2 | 664 | -0.27959588170051575f, 0.18430876731872559f, -0.05316638946533203f, |
Lightvalve | 65:a2d7c63419c2 | 665 | 0.16156336665153503f, -0.18850930035114288f, 0.09482413530349731f, |
Lightvalve | 65:a2d7c63419c2 | 666 | 0.021483391523361206f, 0.009039878845214844f, 0.1586727499961853f, |
Lightvalve | 65:a2d7c63419c2 | 667 | 0.11457142233848572f, 0.2876913249492645f, -0.24802550673484802f, |
Lightvalve | 65:a2d7c63419c2 | 668 | 0.14089101552963257f, -0.06842575967311859f, -0.10107968747615814f, |
Lightvalve | 65:a2d7c63419c2 | 669 | 0.06239110231399536f, -0.2528536915779114f, -0.27538973093032837f, |
Lightvalve | 65:a2d7c63419c2 | 670 | 0.15457189083099365f, -0.15549622476100922f, 0.20245882868766785f, |
Lightvalve | 65:a2d7c63419c2 | 671 | 0.08544808626174927f, 0.22650876641273499f, -0.05268847942352295f, |
Lightvalve | 65:a2d7c63419c2 | 672 | 0.20387354493141174f, 0.24724552035331726f, 0.21444126963615417f, |
Lightvalve | 65:a2d7c63419c2 | 673 | 0.05186706781387329f, -0.11084021627902985f }, { -0.19810965657234192f, |
Lightvalve | 65:a2d7c63419c2 | 674 | 0.2745245397090912f, 0.1767616868019104f, 0.19752147793769836f, |
Lightvalve | 65:a2d7c63419c2 | 675 | 0.0650932788848877f, 0.29138168692588806f, -0.29061684012413025f, |
Lightvalve | 65:a2d7c63419c2 | 676 | 0.010446667671203613f, 0.025284886360168457f, -0.10202452540397644f, |
Lightvalve | 65:a2d7c63419c2 | 677 | -0.10358673334121704f, 0.14746251702308655f, 0.15136101841926575f, |
Lightvalve | 65:a2d7c63419c2 | 678 | 0.04500553011894226f, -0.2497977316379547f, -0.29277902841567993f, |
Lightvalve | 65:a2d7c63419c2 | 679 | 0.02556520700454712f, -0.09509801864624023f, 0.16731274127960205f, |
Lightvalve | 65:a2d7c63419c2 | 680 | -0.25266408920288086f, -0.3004688322544098f, -0.19769597053527832f, |
Lightvalve | 65:a2d7c63419c2 | 681 | -0.14847496151924133f, 0.3053832948207855f, 0.07563886046409607f, |
Lightvalve | 65:a2d7c63419c2 | 682 | -0.10258816182613373f, -0.060128673911094666f, 0.0016401112079620361f, |
Lightvalve | 65:a2d7c63419c2 | 683 | -0.29647189378738403f, -0.18869297206401825f, 0.05497395992279053f, |
Lightvalve | 65:a2d7c63419c2 | 684 | 0.16092956066131592f }, { -0.011267274618148804f, -0.25281068682670593f, |
Lightvalve | 65:a2d7c63419c2 | 685 | -0.10565309226512909f, -0.10787995159626007f, 0.23997481167316437f, |
Lightvalve | 65:a2d7c63419c2 | 686 | 0.011940985918045044f, 0.10584557056427002f, -0.22430141270160675f, |
Lightvalve | 65:a2d7c63419c2 | 687 | -0.06814777851104736f, -0.24531681835651398f, -0.07618588954210281f, |
Lightvalve | 65:a2d7c63419c2 | 688 | 0.12015970051288605f, 0.0185067281126976f, 0.002306112553924322f, |
Lightvalve | 65:a2d7c63419c2 | 689 | 0.17718534171581268f, 0.3006735146045685f, 0.1760181039571762f, |
Lightvalve | 65:a2d7c63419c2 | 690 | 0.04417389631271362f, 0.20160885155200958f, 0.16602091491222382f, |
Lightvalve | 65:a2d7c63419c2 | 691 | 0.2585296034812927f, -0.027029002085328102f, -0.2520882785320282f, |
Lightvalve | 65:a2d7c63419c2 | 692 | 0.29521048069000244f, 0.25318053364753723f, 0.05056742578744888f, |
Lightvalve | 65:a2d7c63419c2 | 693 | 0.22924767434597015f, -0.03404907137155533f, -0.18211489915847778f, |
Lightvalve | 65:a2d7c63419c2 | 694 | -0.15127526223659515f, 0.18461528420448303f, 0.2534249424934387f }, { |
Lightvalve | 65:a2d7c63419c2 | 695 | -0.10580866038799286f, -0.17215237021446228f, -0.01352420449256897f, |
Lightvalve | 65:a2d7c63419c2 | 696 | -0.13443149626255035f, -0.10265451669692993f, -0.2169143706560135f, |
Lightvalve | 65:a2d7c63419c2 | 697 | 0.30098411440849304f, -0.2986297905445099f, 0.07908004522323608f, |
Lightvalve | 65:a2d7c63419c2 | 698 | -0.30061498284339905f, 0.10424068570137024f, -0.018799901008605957f, |
Lightvalve | 65:a2d7c63419c2 | 699 | -0.18665757775306702f, 0.005998075008392334f, -0.2969498336315155f, |
Lightvalve | 65:a2d7c63419c2 | 700 | 0.18525955080986023f, 0.2379322350025177f, 0.15184926986694336f, |
Lightvalve | 65:a2d7c63419c2 | 701 | 0.215760737657547f, -0.19088758528232574f, 0.08620095252990723f, |
Lightvalve | 65:a2d7c63419c2 | 702 | 0.019999295473098755f, -0.0752219706773758f, 0.11181813478469849f, |
Lightvalve | 65:a2d7c63419c2 | 703 | 0.1881926953792572f, 0.2210972011089325f, 0.13236162066459656f, |
Lightvalve | 65:a2d7c63419c2 | 704 | -0.06690356135368347f, -0.18345263600349426f, -0.14861416816711426f, |
Lightvalve | 65:a2d7c63419c2 | 705 | 0.08577704429626465f, -0.09683996438980103f }, { 0.03951254487037659f, |
Lightvalve | 65:a2d7c63419c2 | 706 | 0.23604217171669006f, 0.012746036052703857f, -0.12561996281147003f, |
Lightvalve | 65:a2d7c63419c2 | 707 | -0.1283164620399475f, 0.25823846459388733f, 0.10610169172286987f, |
Lightvalve | 65:a2d7c63419c2 | 708 | 0.22718152403831482f, 0.1749366819858551f, 0.007794857025146484f, |
Lightvalve | 65:a2d7c63419c2 | 709 | 0.11289489269256592f, 0.2725127637386322f, -0.13616766035556793f, |
Lightvalve | 65:a2d7c63419c2 | 710 | -0.03546282649040222f, -0.1685536652803421f, -0.24492129683494568f, |
Lightvalve | 65:a2d7c63419c2 | 711 | 0.15760570764541626f, 0.017505377531051636f, -0.273531436920166f, |
Lightvalve | 65:a2d7c63419c2 | 712 | -0.005667984485626221f, 0.18370777368545532f, -0.023328542709350586f, |
Lightvalve | 65:a2d7c63419c2 | 713 | 0.2379932701587677f, -0.048420339822769165f, 0.10376441478729248f, |
Lightvalve | 65:a2d7c63419c2 | 714 | -0.295401930809021f, -0.20498433709144592f, 0.22346952557563782f, |
Lightvalve | 65:a2d7c63419c2 | 715 | -0.26649031043052673f, -0.08466874063014984f, 0.23347875475883484f, |
Lightvalve | 65:a2d7c63419c2 | 716 | -0.03380200266838074f }, { 0.3014208972454071f, -0.11652402579784393f, |
Lightvalve | 65:a2d7c63419c2 | 717 | 0.24921879172325134f, 0.16919833421707153f, -0.33012309670448303f, |
Lightvalve | 65:a2d7c63419c2 | 718 | -0.19414515793323517f, -0.031346261501312256f, -0.11968852579593658f, |
Lightvalve | 65:a2d7c63419c2 | 719 | 0.23963233828544617f, 0.21321198344230652f, -0.04236738383769989f, |
Lightvalve | 65:a2d7c63419c2 | 720 | -0.04909612983465195f, -0.15507397055625916f, 0.041283149272203445f, |
Lightvalve | 65:a2d7c63419c2 | 721 | -0.0798816904425621f, -0.16132454574108124f, -0.22342979907989502f, |
Lightvalve | 65:a2d7c63419c2 | 722 | 0.2487291395664215f, -0.275277704000473f, -0.1761859953403473f, |
Lightvalve | 65:a2d7c63419c2 | 723 | -0.1089298352599144f, 0.14958830177783966f, -0.09928475320339203f, |
Lightvalve | 65:a2d7c63419c2 | 724 | -0.18516667187213898f, -0.11554347723722458f, 0.2378307580947876f, |
Lightvalve | 65:a2d7c63419c2 | 725 | 0.042566750198602676f, -0.09927814453840256f, -0.03476092219352722f, |
Lightvalve | 65:a2d7c63419c2 | 726 | 0.2736774981021881f, 0.01615159772336483f, -0.08927445858716965f }, { |
Lightvalve | 65:a2d7c63419c2 | 727 | -0.17075178027153015f, 0.009595632553100586f, 0.2466227114200592f, |
Lightvalve | 65:a2d7c63419c2 | 728 | 0.033388618379831314f, -0.34659287333488464f, -0.2819134294986725f, |
Lightvalve | 65:a2d7c63419c2 | 729 | -0.07840541750192642f, -0.15331926941871643f, -0.2516406178474426f, |
Lightvalve | 65:a2d7c63419c2 | 730 | 0.012286126613616943f, 0.20758569240570068f, -0.2048848569393158f, |
Lightvalve | 65:a2d7c63419c2 | 731 | -0.12051127851009369f, 0.10427423566579819f, 0.0999673530459404f, |
Lightvalve | 65:a2d7c63419c2 | 732 | 0.028271911665797234f, -0.24087269604206085f, -0.048499464988708496f, |
Lightvalve | 65:a2d7c63419c2 | 733 | -0.20961162447929382f, 0.10103815048933029f, -0.2312844693660736f, |
Lightvalve | 65:a2d7c63419c2 | 734 | -0.22412340342998505f, -0.031352698802948f, 0.27904242277145386f, |
Lightvalve | 65:a2d7c63419c2 | 735 | -0.11300363391637802f, -0.16207841038703918f, -0.33752813935279846f, |
Lightvalve | 65:a2d7c63419c2 | 736 | 0.3786945641040802f, -0.07090267539024353f, -0.23986908793449402f, |
Lightvalve | 65:a2d7c63419c2 | 737 | -0.30680611729621887f, -0.0811222642660141f }, { -0.01348048448562622f, |
Lightvalve | 65:a2d7c63419c2 | 738 | 0.08233943581581116f, 0.18838337063789368f, 0.21852442622184753f, |
Lightvalve | 65:a2d7c63419c2 | 739 | -0.04740855097770691f, 0.19177213311195374f, -0.0060100555419921875f, |
Lightvalve | 65:a2d7c63419c2 | 740 | 0.20933791995048523f, 0.06356173753738403f, 0.063028484582901f, |
Lightvalve | 65:a2d7c63419c2 | 741 | 0.09440034627914429f, 0.29559019207954407f, -0.2545689642429352f, |
Lightvalve | 65:a2d7c63419c2 | 742 | -0.09652335941791534f, -0.2841038703918457f, -0.03553757071495056f, |
Lightvalve | 65:a2d7c63419c2 | 743 | 0.02329021692276001f, -0.08720272779464722f, -0.0750999003648758f, |
Lightvalve | 65:a2d7c63419c2 | 744 | -0.10468094050884247f, -0.03761094808578491f, -0.030853450298309326f, |
Lightvalve | 65:a2d7c63419c2 | 745 | 0.2112145721912384f, 0.2599640190601349f, -0.2969062626361847f, |
Lightvalve | 65:a2d7c63419c2 | 746 | -0.13667742908000946f, 0.24173608422279358f, 0.09566575288772583f, |
Lightvalve | 65:a2d7c63419c2 | 747 | 0.021116197109222412f, -0.005982398986816406f, -0.26417285203933716f, |
Lightvalve | 65:a2d7c63419c2 | 748 | 0.1879688799381256f }, { -0.1763739138841629f, -0.17203155159950256f, |
Lightvalve | 65:a2d7c63419c2 | 749 | 0.0620841383934021f, -0.04815051332116127f, -0.08886270225048065f, |
Lightvalve | 65:a2d7c63419c2 | 750 | -0.19284456968307495f, 0.09443464875221252f, 0.1472807228565216f, |
Lightvalve | 65:a2d7c63419c2 | 751 | -0.21029016375541687f, 0.2210421860218048f, -0.26095423102378845f, |
Lightvalve | 65:a2d7c63419c2 | 752 | 0.23557153344154358f, -0.07677116990089417f, -0.16641905903816223f, |
Lightvalve | 65:a2d7c63419c2 | 753 | -0.16725768148899078f, -0.2004043012857437f, 0.08218716084957123f, |
Lightvalve | 65:a2d7c63419c2 | 754 | -0.29308468103408813f, -0.057871971279382706f, -0.07429885864257812f, |
Lightvalve | 65:a2d7c63419c2 | 755 | 0.2029605507850647f, -0.19719278812408447f, -0.22302524745464325f, |
Lightvalve | 65:a2d7c63419c2 | 756 | 0.2192145586013794f, -0.13908077776432037f, 0.2019682675600052f, |
Lightvalve | 65:a2d7c63419c2 | 757 | -0.028201768174767494f, 0.08898906409740448f, 0.17976179718971252f, |
Lightvalve | 65:a2d7c63419c2 | 758 | -0.22928372025489807f, 0.3000858724117279f, 0.08501409739255905f }, { |
Lightvalve | 65:a2d7c63419c2 | 759 | -0.09888127446174622f, -0.22750279307365417f, -0.22503364086151123f, |
Lightvalve | 65:a2d7c63419c2 | 760 | -0.0014225258491933346f, -0.012498408555984497f, -0.24329537153244019f, |
Lightvalve | 65:a2d7c63419c2 | 761 | -0.09442851692438126f, 0.08175003528594971f, -0.016126900911331177f, |
Lightvalve | 65:a2d7c63419c2 | 762 | 0.06972584128379822f, 0.05360379442572594f, 0.22432491183280945f, |
Lightvalve | 65:a2d7c63419c2 | 763 | -0.031845152378082275f, -0.2877633273601532f, 0.18349257111549377f, |
Lightvalve | 65:a2d7c63419c2 | 764 | 0.19327174127101898f, -0.09216172993183136f, 0.04617339372634888f, |
Lightvalve | 65:a2d7c63419c2 | 765 | -0.09483018517494202f, -0.07904840260744095f, -0.035641368478536606f, |
Lightvalve | 65:a2d7c63419c2 | 766 | -0.2887636721134186f, -0.06047184765338898f, -0.3070217967033386f, |
Lightvalve | 65:a2d7c63419c2 | 767 | 4.397468364913948e-05f, -0.19100867211818695f, 0.28239238262176514f, |
Lightvalve | 65:a2d7c63419c2 | 768 | -0.2758784890174866f, -0.16326025128364563f, 0.11664235591888428f, |
Lightvalve | 65:a2d7c63419c2 | 769 | -0.03823475539684296f, 0.11660117655992508f }, |
Lightvalve | 65:a2d7c63419c2 | 770 | |
Lightvalve | 65:a2d7c63419c2 | 771 | }; |
Lightvalve | 65:a2d7c63419c2 | 772 | |
Lightvalve | 65:a2d7c63419c2 | 773 | const float h3[32][32] = { { -0.13349971175193787f, -0.10295046865940094f, |
Lightvalve | 65:a2d7c63419c2 | 774 | -0.04925942420959473f, 0.005893866065889597f, -0.12596699595451355f, |
Lightvalve | 65:a2d7c63419c2 | 775 | 0.2987118661403656f, 0.07975713163614273f, 0.06396704912185669f, |
Lightvalve | 65:a2d7c63419c2 | 776 | -0.30411389470100403f, -0.10008957982063293f, 0.014623122289776802f, |
Lightvalve | 65:a2d7c63419c2 | 777 | -0.0538821816444397f, 0.048359375447034836f, 0.24325567483901978f, |
Lightvalve | 65:a2d7c63419c2 | 778 | 0.10184130072593689f, -0.24775750935077667f, 0.07803884148597717f, |
Lightvalve | 65:a2d7c63419c2 | 779 | -0.21483641862869263f, 0.17120853066444397f, 0.00830860622227192f, |
Lightvalve | 65:a2d7c63419c2 | 780 | -0.29617825150489807f, -0.22132611274719238f, -0.23983746767044067f, |
Lightvalve | 65:a2d7c63419c2 | 781 | -0.28275105357170105f, -0.3873054087162018f, 0.30998873710632324f, |
Lightvalve | 65:a2d7c63419c2 | 782 | -0.4226490557193756f, -0.11779281497001648f, 0.23828622698783875f, |
Lightvalve | 65:a2d7c63419c2 | 783 | 0.11771553754806519f, -0.37041905522346497f, -0.30605563521385193f }, { |
Lightvalve | 65:a2d7c63419c2 | 784 | -0.16083313524723053f, 0.002147972583770752f, -0.04321768879890442f, |
Lightvalve | 65:a2d7c63419c2 | 785 | 0.20690490305423737f, 0.022892558947205544f, 0.008302271366119385f, |
Lightvalve | 65:a2d7c63419c2 | 786 | -0.20543429255485535f, -0.08731026947498322f, 0.24677053093910217f, |
Lightvalve | 65:a2d7c63419c2 | 787 | 0.048597872257232666f, 0.20651067793369293f, 0.16381694376468658f, |
Lightvalve | 65:a2d7c63419c2 | 788 | 0.28672969341278076f, -0.3506166338920593f, 0.06659439951181412f, |
Lightvalve | 65:a2d7c63419c2 | 789 | 0.04734180495142937f, 0.03125026077032089f, -0.2737269401550293f, |
Lightvalve | 65:a2d7c63419c2 | 790 | -0.21843840181827545f, 0.3144419193267822f, 0.10113385319709778f, |
Lightvalve | 65:a2d7c63419c2 | 791 | 0.14034439623355865f, -0.16832955181598663f, 0.33271604776382446f, |
Lightvalve | 65:a2d7c63419c2 | 792 | 0.19579239189624786f, 0.14696596562862396f, 0.06076221913099289f, |
Lightvalve | 65:a2d7c63419c2 | 793 | 0.24354417622089386f, -0.28620439767837524f, -0.0511949360370636f, |
Lightvalve | 65:a2d7c63419c2 | 794 | 0.2096933126449585f, 0.040742650628089905f }, { -0.1579037755727768f, |
Lightvalve | 65:a2d7c63419c2 | 795 | 0.28447648882865906f, -0.1789936125278473f, 0.20799604058265686f, |
Lightvalve | 65:a2d7c63419c2 | 796 | 0.025723248720169067f, 0.17740526795387268f, -0.1666354387998581f, |
Lightvalve | 65:a2d7c63419c2 | 797 | -0.06060470640659332f, -0.017253071069717407f, -0.2790656089782715f, |
Lightvalve | 65:a2d7c63419c2 | 798 | -0.16800916194915771f, -0.2990717589855194f, 0.07126197218894958f, |
Lightvalve | 65:a2d7c63419c2 | 799 | -0.08032660186290741f, -0.1799015998840332f, -0.1891922950744629f, |
Lightvalve | 65:a2d7c63419c2 | 800 | 0.2556300461292267f, 0.2080206573009491f, -0.24888339638710022f, |
Lightvalve | 65:a2d7c63419c2 | 801 | 0.27691522240638733f, -0.21319638192653656f, -0.14012537896633148f, |
Lightvalve | 65:a2d7c63419c2 | 802 | -0.30466505885124207f, -0.013728171586990356f, -0.1629670113325119f, |
Lightvalve | 65:a2d7c63419c2 | 803 | 0.2530798614025116f, 0.0633285641670227f, 0.0011726915836334229f, |
Lightvalve | 65:a2d7c63419c2 | 804 | -0.14820529520511627f, 0.2823629677295685f, 0.10884168744087219f, |
Lightvalve | 65:a2d7c63419c2 | 805 | -0.2637729346752167f }, { -0.12927524745464325f, -0.01806354522705078f, |
Lightvalve | 65:a2d7c63419c2 | 806 | -0.23058539628982544f, -0.030255556106567383f, -0.6437712907791138f, |
Lightvalve | 65:a2d7c63419c2 | 807 | -0.17983144521713257f, 0.12746267020702362f, 0.08151327818632126f, |
Lightvalve | 65:a2d7c63419c2 | 808 | -0.06944303214550018f, 0.09271347522735596f, -0.0808296874165535f, |
Lightvalve | 65:a2d7c63419c2 | 809 | -0.24855418503284454f, -0.11665885150432587f, 0.12946322560310364f, |
Lightvalve | 65:a2d7c63419c2 | 810 | -0.0930287167429924f, -0.3423658609390259f, 0.10996055603027344f, |
Lightvalve | 65:a2d7c63419c2 | 811 | 0.24023392796516418f, 0.2942558825016022f, -0.17709596455097198f, |
Lightvalve | 65:a2d7c63419c2 | 812 | -0.1255558878183365f, -0.2134709507226944f, -0.06394433975219727f, |
Lightvalve | 65:a2d7c63419c2 | 813 | -0.24457648396492004f, 0.10029968619346619f, -0.2400282919406891f, |
Lightvalve | 65:a2d7c63419c2 | 814 | 0.11666780710220337f, -0.14067168533802032f, -0.22396358847618103f, |
Lightvalve | 65:a2d7c63419c2 | 815 | 0.2546447217464447f, -0.002586635062471032f, 0.04970479756593704f }, { |
Lightvalve | 65:a2d7c63419c2 | 816 | -0.18258020281791687f, 0.2506926953792572f, -0.0804666131734848f, |
Lightvalve | 65:a2d7c63419c2 | 817 | 0.05040470138192177f, 0.02259594015777111f, -0.23578980565071106f, |
Lightvalve | 65:a2d7c63419c2 | 818 | -0.09264150261878967f, 0.0013416205765679479f, 0.043158918619155884f, |
Lightvalve | 65:a2d7c63419c2 | 819 | -0.2690317630767822f, 0.04383622854948044f, -0.25736406445503235f, |
Lightvalve | 65:a2d7c63419c2 | 820 | -0.21347089111804962f, -0.19318343698978424f, -0.21244710683822632f, |
Lightvalve | 65:a2d7c63419c2 | 821 | -0.13572444021701813f, -0.1285906583070755f, 0.15626338124275208f, |
Lightvalve | 65:a2d7c63419c2 | 822 | -0.050212472677230835f, 0.0982573851943016f, 0.11135826259851456f, |
Lightvalve | 65:a2d7c63419c2 | 823 | 0.06453899294137955f, 0.19172045588493347f, -0.22890380024909973f, |
Lightvalve | 65:a2d7c63419c2 | 824 | -0.12237071990966797f, 0.09743352234363556f, 0.10070990025997162f, |
Lightvalve | 65:a2d7c63419c2 | 825 | 0.28772199153900146f, 0.2695164978504181f, -0.16498444974422455f, |
Lightvalve | 65:a2d7c63419c2 | 826 | 0.014173826202750206f, -0.2047310173511505f }, { -0.19158349931240082f, |
Lightvalve | 65:a2d7c63419c2 | 827 | -0.004258692264556885f, 0.032371193170547485f, -0.3141036927700043f, |
Lightvalve | 65:a2d7c63419c2 | 828 | -0.026762403547763824f, -0.29336631298065186f, 0.08645252138376236f, |
Lightvalve | 65:a2d7c63419c2 | 829 | -0.16367173194885254f, -0.03548547625541687f, 0.08825305104255676f, |
Lightvalve | 65:a2d7c63419c2 | 830 | -0.16509909927845f, 0.22309480607509613f, -0.22282296419143677f, |
Lightvalve | 65:a2d7c63419c2 | 831 | 0.2915789783000946f, -0.24179422855377197f, -0.19140881299972534f, |
Lightvalve | 65:a2d7c63419c2 | 832 | 0.21163100004196167f, 0.24713221192359924f, 0.28102827072143555f, |
Lightvalve | 65:a2d7c63419c2 | 833 | 0.25016462802886963f, 0.020191945135593414f, 0.19882827997207642f, |
Lightvalve | 65:a2d7c63419c2 | 834 | -0.1307595670223236f, -0.059169698506593704f, 0.2300402969121933f, |
Lightvalve | 65:a2d7c63419c2 | 835 | -0.261514276266098f, 0.22954094409942627f, -0.12279488891363144f, |
Lightvalve | 65:a2d7c63419c2 | 836 | 0.05800282955169678f, -0.26823562383651733f, 0.16349054872989655f, |
Lightvalve | 65:a2d7c63419c2 | 837 | 0.1337476223707199f }, { -0.21433322131633759f, -0.1279313862323761f, |
Lightvalve | 65:a2d7c63419c2 | 838 | -0.11171227693557739f, 0.27164509892463684f, -0.26441383361816406f, |
Lightvalve | 65:a2d7c63419c2 | 839 | 0.2845393121242523f, 0.07359254360198975f, -0.20844537019729614f, |
Lightvalve | 65:a2d7c63419c2 | 840 | -0.26620519161224365f, 0.17144301533699036f, -0.061109013855457306f, |
Lightvalve | 65:a2d7c63419c2 | 841 | -0.19284695386886597f, 0.29584869742393494f, -0.02723398245871067f, |
Lightvalve | 65:a2d7c63419c2 | 842 | -0.11244286596775055f, 0.0967603325843811f, -0.16153597831726074f, |
Lightvalve | 65:a2d7c63419c2 | 843 | 0.18742787837982178f, -0.13470113277435303f, 0.12359786033630371f, |
Lightvalve | 65:a2d7c63419c2 | 844 | 0.0469309501349926f, 0.02421507239341736f, -0.07988794147968292f, |
Lightvalve | 65:a2d7c63419c2 | 845 | -0.15143592655658722f, -0.18177983164787292f, 0.1452380120754242f, |
Lightvalve | 65:a2d7c63419c2 | 846 | 0.2337561547756195f, -0.17263798415660858f, -0.11822041869163513f, |
Lightvalve | 65:a2d7c63419c2 | 847 | 0.19546762108802795f, -0.16657039523124695f, -0.033323969691991806f }, { |
Lightvalve | 65:a2d7c63419c2 | 848 | 0.29264822602272034f, 0.11346611380577087f, 0.04012581706047058f, |
Lightvalve | 65:a2d7c63419c2 | 849 | -0.0461408905684948f, 0.225418359041214f, -0.05009126663208008f, |
Lightvalve | 65:a2d7c63419c2 | 850 | 0.013211707584559917f, 0.004197537899017334f, 0.2864855229854584f, |
Lightvalve | 65:a2d7c63419c2 | 851 | 0.01006925106048584f, -0.010690944269299507f, 0.11204484105110168f, |
Lightvalve | 65:a2d7c63419c2 | 852 | -0.16305525600910187f, -0.09700464457273483f, 0.08624142408370972f, |
Lightvalve | 65:a2d7c63419c2 | 853 | -0.3024343252182007f, -0.29751643538475037f, 0.2706601917743683f, |
Lightvalve | 65:a2d7c63419c2 | 854 | 0.19159749150276184f, -0.1787676364183426f, 0.07430826127529144f, |
Lightvalve | 65:a2d7c63419c2 | 855 | 0.05496254935860634f, -0.07979777455329895f, 0.16874255239963531f, |
Lightvalve | 65:a2d7c63419c2 | 856 | -0.37327951192855835f, 0.09258365631103516f, 0.44089770317077637f, |
Lightvalve | 65:a2d7c63419c2 | 857 | -0.042961325496435165f, -0.14135785400867462f, 0.07403197884559631f, |
Lightvalve | 65:a2d7c63419c2 | 858 | 0.09825335443019867f, 0.07322394847869873f }, { 0.28564146161079407f, |
Lightvalve | 65:a2d7c63419c2 | 859 | 0.2890130579471588f, -0.021617114543914795f, 0.08250059932470322f, |
Lightvalve | 65:a2d7c63419c2 | 860 | 0.3030112683773041f, 0.07065775990486145f, -0.236245796084404f, |
Lightvalve | 65:a2d7c63419c2 | 861 | -0.2608001232147217f, 0.29470762610435486f, -0.06864601373672485f, |
Lightvalve | 65:a2d7c63419c2 | 862 | 0.2483109086751938f, -0.20344071090221405f, 0.2957691252231598f, |
Lightvalve | 65:a2d7c63419c2 | 863 | -0.13390012085437775f, 0.19158922135829926f, 0.3726794719696045f, |
Lightvalve | 65:a2d7c63419c2 | 864 | 0.02077532187104225f, 0.06025278568267822f, 0.05459544435143471f, |
Lightvalve | 65:a2d7c63419c2 | 865 | 0.41055813431739807f, 0.32145416736602783f, 0.030043581500649452f, |
Lightvalve | 65:a2d7c63419c2 | 866 | 0.28743305802345276f, 0.19736182689666748f, 0.1656898558139801f, |
Lightvalve | 65:a2d7c63419c2 | 867 | -0.28868207335472107f, -0.039911627769470215f, -0.006442106794565916f, |
Lightvalve | 65:a2d7c63419c2 | 868 | 0.2501918375492096f, -0.14010676741600037f, -0.10169651359319687f, |
Lightvalve | 65:a2d7c63419c2 | 869 | -0.15317825973033905f }, { 0.2615049183368683f, 0.08643358945846558f, |
Lightvalve | 65:a2d7c63419c2 | 870 | -0.29237738251686096f, -0.2458128184080124f, 0.20376496016979218f, |
Lightvalve | 65:a2d7c63419c2 | 871 | -0.0771239846944809f, 0.1555452048778534f, -0.15540927648544312f, |
Lightvalve | 65:a2d7c63419c2 | 872 | 0.18755429983139038f, -0.07031691074371338f, -0.06268419325351715f, |
Lightvalve | 65:a2d7c63419c2 | 873 | -0.041090548038482666f, 0.042330075055360794f, 0.27333545684814453f, |
Lightvalve | 65:a2d7c63419c2 | 874 | -0.008807391859591007f, 0.1133832335472107f, -0.040624819695949554f, |
Lightvalve | 65:a2d7c63419c2 | 875 | -0.2859399914741516f, -0.26647016406059265f, -0.2497035712003708f, |
Lightvalve | 65:a2d7c63419c2 | 876 | 0.09534543007612228f, 0.09418291598558426f, -0.2307620644569397f, |
Lightvalve | 65:a2d7c63419c2 | 877 | 0.055859606713056564f, -0.07496815174818039f, -0.19647599756717682f, |
Lightvalve | 65:a2d7c63419c2 | 878 | 0.02131301537156105f, 0.09323979169130325f, 0.2113950550556183f, |
Lightvalve | 65:a2d7c63419c2 | 879 | 0.0796298086643219f, -0.06491973996162415f, -0.3819006681442261f }, { |
Lightvalve | 65:a2d7c63419c2 | 880 | 0.19981321692466736f, 0.1956864297389984f, -0.033508092164993286f, |
Lightvalve | 65:a2d7c63419c2 | 881 | -0.22838544845581055f, -0.12505969405174255f, 0.026693344116210938f, |
Lightvalve | 65:a2d7c63419c2 | 882 | 0.07720576971769333f, 0.14285165071487427f, -0.17670965194702148f, |
Lightvalve | 65:a2d7c63419c2 | 883 | 0.17403557896614075f, -0.22244372963905334f, 0.1680217683315277f, |
Lightvalve | 65:a2d7c63419c2 | 884 | -0.1060299277305603f, 0.1071399599313736f, -0.11092887073755264f, |
Lightvalve | 65:a2d7c63419c2 | 885 | -0.05349590629339218f, 0.03990337252616882f, 0.0716913640499115f, |
Lightvalve | 65:a2d7c63419c2 | 886 | 0.22807641327381134f, -0.13356927037239075f, 0.1965365707874298f, |
Lightvalve | 65:a2d7c63419c2 | 887 | 0.1245347261428833f, 0.07470300793647766f, 0.1796993613243103f, |
Lightvalve | 65:a2d7c63419c2 | 888 | -0.004812136758118868f, 0.10351252555847168f, -0.057905394583940506f, |
Lightvalve | 65:a2d7c63419c2 | 889 | -0.18869787454605103f, 0.13817378878593445f, 0.17853263020515442f, |
Lightvalve | 65:a2d7c63419c2 | 890 | -0.027914874255657196f, -0.02365732006728649f }, { -0.2546439468860626f, |
Lightvalve | 65:a2d7c63419c2 | 891 | -0.09556084871292114f, 0.12328919768333435f, 0.03998832777142525f, |
Lightvalve | 65:a2d7c63419c2 | 892 | -0.30052247643470764f, 0.24699172377586365f, -0.32009536027908325f, |
Lightvalve | 65:a2d7c63419c2 | 893 | -0.11670328676700592f, 0.17735600471496582f, 0.009893029928207397f, |
Lightvalve | 65:a2d7c63419c2 | 894 | 0.26776403188705444f, 0.19816415011882782f, -0.05558810010552406f, |
Lightvalve | 65:a2d7c63419c2 | 895 | -0.19641350209712982f, 0.3241870105266571f, -0.0002136280236300081f, |
Lightvalve | 65:a2d7c63419c2 | 896 | -0.015536589547991753f, 0.10842388868331909f, 0.2418537586927414f, |
Lightvalve | 65:a2d7c63419c2 | 897 | 0.25024867057800293f, -0.0643463209271431f, -0.06727208197116852f, |
Lightvalve | 65:a2d7c63419c2 | 898 | 0.09996896982192993f, 0.08140590041875839f, -0.12102364748716354f, |
Lightvalve | 65:a2d7c63419c2 | 899 | 0.09566594660282135f, 0.026901600882411003f, 0.24559487402439117f, |
Lightvalve | 65:a2d7c63419c2 | 900 | -0.288028746843338f, -0.2434448003768921f, 0.1651056408882141f, |
Lightvalve | 65:a2d7c63419c2 | 901 | 0.23462900519371033f }, { -0.08816954493522644f, 0.2728963792324066f, |
Lightvalve | 65:a2d7c63419c2 | 902 | -0.07170480489730835f, 0.08861888200044632f, -0.08407828211784363f, |
Lightvalve | 65:a2d7c63419c2 | 903 | 0.20119628310203552f, -0.021976735442876816f, 0.020944571122527122f, |
Lightvalve | 65:a2d7c63419c2 | 904 | -0.15294449031352997f, -0.038666754961013794f, -0.1334909051656723f, |
Lightvalve | 65:a2d7c63419c2 | 905 | 0.2502269148826599f, 0.20107106864452362f, -0.2309870719909668f, |
Lightvalve | 65:a2d7c63419c2 | 906 | 0.26465773582458496f, 0.09385055303573608f, -0.0016800533048808575f, |
Lightvalve | 65:a2d7c63419c2 | 907 | 0.21900424361228943f, 0.22734272480010986f, 0.15115073323249817f, |
Lightvalve | 65:a2d7c63419c2 | 908 | -0.3155216872692108f, 0.03708222880959511f, -0.19714993238449097f, |
Lightvalve | 65:a2d7c63419c2 | 909 | 0.18521378934383392f, 0.10345728695392609f, 0.21989409625530243f, |
Lightvalve | 65:a2d7c63419c2 | 910 | -0.008119909092783928f, -0.27566710114479065f, 0.18573936820030212f, |
Lightvalve | 65:a2d7c63419c2 | 911 | 0.15478622913360596f, 0.03387163206934929f, -0.09682217240333557f }, { |
Lightvalve | 65:a2d7c63419c2 | 912 | 0.14700931310653687f, 0.1833711564540863f, -0.0858893096446991f, |
Lightvalve | 65:a2d7c63419c2 | 913 | 0.03548716753721237f, -0.03290480375289917f, 0.2733006179332733f, |
Lightvalve | 65:a2d7c63419c2 | 914 | -0.00011049837485188618f, -0.1723647564649582f, 0.000652611255645752f, |
Lightvalve | 65:a2d7c63419c2 | 915 | -0.22920364141464233f, 0.03385178744792938f, -0.11219978332519531f, |
Lightvalve | 65:a2d7c63419c2 | 916 | 0.23820827901363373f, 0.33258119225502014f, 0.05578869208693504f, |
Lightvalve | 65:a2d7c63419c2 | 917 | -0.21240083873271942f, -0.07963520288467407f, 0.14483880996704102f, |
Lightvalve | 65:a2d7c63419c2 | 918 | -0.18910400569438934f, -0.1327388882637024f, -0.024066906422376633f, |
Lightvalve | 65:a2d7c63419c2 | 919 | 0.2018621563911438f, -0.2228696048259735f, 0.2577541768550873f, |
Lightvalve | 65:a2d7c63419c2 | 920 | -0.16621330380439758f, 0.06491447985172272f, -0.09694764763116837f, |
Lightvalve | 65:a2d7c63419c2 | 921 | 0.19547560811042786f, -0.011228948831558228f, 0.26896968483924866f, |
Lightvalve | 65:a2d7c63419c2 | 922 | -0.360990971326828f, -0.2201414704322815f }, { -0.23982827365398407f, |
Lightvalve | 65:a2d7c63419c2 | 923 | 0.03880670666694641f, -0.013682037591934204f, -0.11685100197792053f, |
Lightvalve | 65:a2d7c63419c2 | 924 | -0.020662933588027954f, 0.30190005898475647f, -0.14934301376342773f, |
Lightvalve | 65:a2d7c63419c2 | 925 | -0.15993990004062653f, 0.1152651309967041f, -0.11991468071937561f, |
Lightvalve | 65:a2d7c63419c2 | 926 | -0.15497799217700958f, 0.11116543412208557f, -0.2045515924692154f, |
Lightvalve | 65:a2d7c63419c2 | 927 | 0.2403949797153473f, -0.21275603771209717f, 0.05732181668281555f, |
Lightvalve | 65:a2d7c63419c2 | 928 | -0.2770107090473175f, 0.088544100522995f, 0.19012078642845154f, |
Lightvalve | 65:a2d7c63419c2 | 929 | -0.07119561731815338f, -0.18914666771888733f, -0.10413256287574768f, |
Lightvalve | 65:a2d7c63419c2 | 930 | -0.16050675511360168f, 0.11598068475723267f, -0.03151249885559082f, |
Lightvalve | 65:a2d7c63419c2 | 931 | -0.1937510371208191f, 0.18474078178405762f, 0.19502457976341248f, |
Lightvalve | 65:a2d7c63419c2 | 932 | 0.22045472264289856f, -0.29474368691444397f, 0.09864541888237f, |
Lightvalve | 65:a2d7c63419c2 | 933 | 0.06054645776748657f }, { -0.1617974042892456f, 0.1317739188671112f, |
Lightvalve | 65:a2d7c63419c2 | 934 | 0.03260180354118347f, -0.19948318600654602f, -0.0928228572010994f, |
Lightvalve | 65:a2d7c63419c2 | 935 | -0.1987132430076599f, -0.1755896806716919f, 0.11372503638267517f, |
Lightvalve | 65:a2d7c63419c2 | 936 | 0.05445769429206848f, 0.07657262682914734f, -0.18663887679576874f, |
Lightvalve | 65:a2d7c63419c2 | 937 | -0.23218511044979095f, 0.2056141495704651f, 0.03608625754714012f, |
Lightvalve | 65:a2d7c63419c2 | 938 | 0.33959874510765076f, -0.3019200563430786f, -0.25386664271354675f, |
Lightvalve | 65:a2d7c63419c2 | 939 | -0.18997573852539062f, -0.06610497832298279f, -0.1891406625509262f, |
Lightvalve | 65:a2d7c63419c2 | 940 | -0.10423542559146881f, -0.11639183014631271f, -0.3044300675392151f, |
Lightvalve | 65:a2d7c63419c2 | 941 | 0.2589237689971924f, -0.06821785122156143f, 0.17655706405639648f, |
Lightvalve | 65:a2d7c63419c2 | 942 | 0.1661142259836197f, -0.24122722446918488f, -0.0006675124168395996f, |
Lightvalve | 65:a2d7c63419c2 | 943 | -0.2239055633544922f, -0.0723206177353859f, 0.2102394998073578f }, { |
Lightvalve | 65:a2d7c63419c2 | 944 | 0.036086976528167725f, -0.062024205923080444f, 0.10704237222671509f, |
Lightvalve | 65:a2d7c63419c2 | 945 | -0.1612134575843811f, -0.1631729155778885f, 0.1497061848640442f, |
Lightvalve | 65:a2d7c63419c2 | 946 | 0.03271482139825821f, 0.27597710490226746f, -0.23304778337478638f, |
Lightvalve | 65:a2d7c63419c2 | 947 | -0.035415440797805786f, 0.1086379662156105f, 0.07746559381484985f, |
Lightvalve | 65:a2d7c63419c2 | 948 | 0.13613636791706085f, 0.09150157123804092f, 0.25167548656463623f, |
Lightvalve | 65:a2d7c63419c2 | 949 | -0.24342824518680573f, -0.027234435081481934f, 0.19620582461357117f, |
Lightvalve | 65:a2d7c63419c2 | 950 | 0.44021302461624146f, -0.23242811858654022f, -0.05763920396566391f, |
Lightvalve | 65:a2d7c63419c2 | 951 | -0.09912444651126862f, -0.19671492278575897f, -0.33463647961616516f, |
Lightvalve | 65:a2d7c63419c2 | 952 | -0.40228715538978577f, -0.000608850852586329f, 0.06298207491636276f, |
Lightvalve | 65:a2d7c63419c2 | 953 | 0.39882805943489075f, -0.2531542181968689f, 0.24004116654396057f, |
Lightvalve | 65:a2d7c63419c2 | 954 | -0.30925723910331726f, -0.26930177211761475f }, { 0.1379433274269104f, |
Lightvalve | 65:a2d7c63419c2 | 955 | -0.16078773140907288f, 0.11784148216247559f, 0.20431241393089294f, |
Lightvalve | 65:a2d7c63419c2 | 956 | 0.29410573840141296f, 0.19759181141853333f, 0.09952005743980408f, |
Lightvalve | 65:a2d7c63419c2 | 957 | 0.1544932872056961f, 0.040603965520858765f, -0.2119520902633667f, |
Lightvalve | 65:a2d7c63419c2 | 958 | 0.18040086328983307f, -0.38904741406440735f, -0.046765703707933426f, |
Lightvalve | 65:a2d7c63419c2 | 959 | 0.13744039833545685f, -0.3137235641479492f, 0.05679671838879585f, |
Lightvalve | 65:a2d7c63419c2 | 960 | 0.1565159410238266f, 0.2297056019306183f, 0.032699450850486755f, |
Lightvalve | 65:a2d7c63419c2 | 961 | 0.20715069770812988f, -0.016263214871287346f, -0.3025153875350952f, |
Lightvalve | 65:a2d7c63419c2 | 962 | 0.26029130816459656f, 0.42276427149772644f, 0.2875830829143524f, |
Lightvalve | 65:a2d7c63419c2 | 963 | -0.12763257324695587f, -0.20330224931240082f, -0.07699788361787796f, |
Lightvalve | 65:a2d7c63419c2 | 964 | -0.08671019971370697f, -0.019541800022125244f, 0.4000849425792694f, |
Lightvalve | 65:a2d7c63419c2 | 965 | 0.17512208223342896f }, { 0.09298902750015259f, 0.2841971218585968f, |
Lightvalve | 65:a2d7c63419c2 | 966 | -0.0814327746629715f, -0.010091223753988743f, -0.12308911234140396f, |
Lightvalve | 65:a2d7c63419c2 | 967 | 0.11057800054550171f, -0.1737426221370697f, 0.20642486214637756f, |
Lightvalve | 65:a2d7c63419c2 | 968 | -0.2925014793872833f, 0.022429823875427246f, -0.06304851174354553f, |
Lightvalve | 65:a2d7c63419c2 | 969 | -0.07166500389575958f, -0.26361000537872314f, 0.050878144800662994f, |
Lightvalve | 65:a2d7c63419c2 | 970 | 0.189671128988266f, 0.30893731117248535f, 0.1296386420726776f, |
Lightvalve | 65:a2d7c63419c2 | 971 | 0.027322769165039062f, 0.29731038212776184f, 0.14744597673416138f, |
Lightvalve | 65:a2d7c63419c2 | 972 | 0.2998683750629425f, 0.08306887000799179f, 0.06231796741485596f, |
Lightvalve | 65:a2d7c63419c2 | 973 | 0.3401893973350525f, -0.004573390819132328f, 0.18759925663471222f, |
Lightvalve | 65:a2d7c63419c2 | 974 | -0.16945621371269226f, 0.01625938154757023f, 0.14345040917396545f, |
Lightvalve | 65:a2d7c63419c2 | 975 | -0.11986468732357025f, -0.21137407422065735f, 0.1280972957611084f }, { |
Lightvalve | 65:a2d7c63419c2 | 976 | -0.14775772392749786f, 0.29651907086372375f, 0.02990397810935974f, |
Lightvalve | 65:a2d7c63419c2 | 977 | -0.06818585097789764f, 0.1993788629770279f, -0.22813674807548523f, |
Lightvalve | 65:a2d7c63419c2 | 978 | 0.16850803792476654f, 0.24565419554710388f, -0.2325194776058197f, |
Lightvalve | 65:a2d7c63419c2 | 979 | -0.2458522766828537f, -0.017307782545685768f, -0.12818260490894318f, |
Lightvalve | 65:a2d7c63419c2 | 980 | -0.17801909148693085f, -0.2504909038543701f, 0.1731644719839096f, |
Lightvalve | 65:a2d7c63419c2 | 981 | 0.18156693875789642f, 0.23218704760074615f, 0.11064860224723816f, |
Lightvalve | 65:a2d7c63419c2 | 982 | -0.15070302784442902f, 0.10314767062664032f, 0.3309069275856018f, |
Lightvalve | 65:a2d7c63419c2 | 983 | -0.28518369793891907f, -0.07374785840511322f, 0.05567348375916481f, |
Lightvalve | 65:a2d7c63419c2 | 984 | -0.01467915065586567f, -0.3420534133911133f, -0.21914657950401306f, |
Lightvalve | 65:a2d7c63419c2 | 985 | 0.23488031327724457f, -0.2205982804298401f, 0.28094157576560974f, |
Lightvalve | 65:a2d7c63419c2 | 986 | -0.15506510436534882f, 0.07852166146039963f }, { 0.2703488767147064f, |
Lightvalve | 65:a2d7c63419c2 | 987 | -0.16041381657123566f, 0.12738299369812012f, -0.045484237372875214f, |
Lightvalve | 65:a2d7c63419c2 | 988 | 0.06815514713525772f, 0.1861400008201599f, -0.15391220152378082f, |
Lightvalve | 65:a2d7c63419c2 | 989 | 0.28177282214164734f, 0.1474648416042328f, -0.23766008019447327f, |
Lightvalve | 65:a2d7c63419c2 | 990 | 0.025048013776540756f, 0.06622862070798874f, 0.09594401717185974f, |
Lightvalve | 65:a2d7c63419c2 | 991 | -0.1663329154253006f, -0.10072105377912521f, -0.044219132512807846f, |
Lightvalve | 65:a2d7c63419c2 | 992 | -0.2531753182411194f, 0.08700510859489441f, -0.26066508889198303f, |
Lightvalve | 65:a2d7c63419c2 | 993 | 0.07304855436086655f, -0.13394378125667572f, 0.22174499928951263f, |
Lightvalve | 65:a2d7c63419c2 | 994 | -0.18301571905612946f, -0.16244065761566162f, -0.004656728822737932f, |
Lightvalve | 65:a2d7c63419c2 | 995 | 0.2568950057029724f, 0.15513287484645844f, -0.2911604344844818f, |
Lightvalve | 65:a2d7c63419c2 | 996 | 0.08541131019592285f, 0.08213254809379578f, -0.258662611246109f, |
Lightvalve | 65:a2d7c63419c2 | 997 | 0.04998021572828293f }, { -0.06283275783061981f, -0.26753589510917664f, |
Lightvalve | 65:a2d7c63419c2 | 998 | -0.10381917655467987f, -0.13344663381576538f, 0.2644997537136078f, |
Lightvalve | 65:a2d7c63419c2 | 999 | 0.2204643189907074f, 0.2924788296222687f, -0.17931663990020752f, |
Lightvalve | 65:a2d7c63419c2 | 1000 | -0.09078609943389893f, -0.17306232452392578f, 0.02247890830039978f, |
Lightvalve | 65:a2d7c63419c2 | 1001 | -0.26996222138404846f, 0.22075030207633972f, -0.3029964864253998f, |
Lightvalve | 65:a2d7c63419c2 | 1002 | 0.21873190999031067f, -0.0030784308910369873f, 0.18228653073310852f, |
Lightvalve | 65:a2d7c63419c2 | 1003 | 0.09971508383750916f, -0.242676243185997f, -0.1424383968114853f, |
Lightvalve | 65:a2d7c63419c2 | 1004 | 0.19031599164009094f, 0.3004438579082489f, -0.23650792241096497f, |
Lightvalve | 65:a2d7c63419c2 | 1005 | -0.2683113217353821f, 0.29957786202430725f, 0.08561205863952637f, |
Lightvalve | 65:a2d7c63419c2 | 1006 | -0.1366746425628662f, -0.15950153768062592f, -0.07675467431545258f, |
Lightvalve | 65:a2d7c63419c2 | 1007 | -0.2218506634235382f, -0.2795913517475128f, 0.1869203746318817f }, { |
Lightvalve | 65:a2d7c63419c2 | 1008 | 0.2003176510334015f, -0.27792131900787354f, 0.055196613073349f, |
Lightvalve | 65:a2d7c63419c2 | 1009 | -0.27959588170051575f, 0.18430876731872559f, -0.05316638946533203f, |
Lightvalve | 65:a2d7c63419c2 | 1010 | 0.16156336665153503f, -0.18850930035114288f, 0.09482413530349731f, |
Lightvalve | 65:a2d7c63419c2 | 1011 | 0.021483391523361206f, 0.009039878845214844f, 0.1586727499961853f, |
Lightvalve | 65:a2d7c63419c2 | 1012 | 0.11457142233848572f, 0.2876913249492645f, -0.24802550673484802f, |
Lightvalve | 65:a2d7c63419c2 | 1013 | 0.14089101552963257f, -0.06842575967311859f, -0.10107968747615814f, |
Lightvalve | 65:a2d7c63419c2 | 1014 | 0.06239110231399536f, -0.2528536915779114f, -0.27538973093032837f, |
Lightvalve | 65:a2d7c63419c2 | 1015 | 0.15457189083099365f, -0.15549622476100922f, 0.20245882868766785f, |
Lightvalve | 65:a2d7c63419c2 | 1016 | 0.08544808626174927f, 0.22650876641273499f, -0.05268847942352295f, |
Lightvalve | 65:a2d7c63419c2 | 1017 | 0.20387354493141174f, 0.24724552035331726f, 0.21444126963615417f, |
Lightvalve | 65:a2d7c63419c2 | 1018 | 0.05186706781387329f, -0.11084021627902985f }, { -0.19810965657234192f, |
Lightvalve | 65:a2d7c63419c2 | 1019 | 0.2745245397090912f, 0.1767616868019104f, 0.19752147793769836f, |
Lightvalve | 65:a2d7c63419c2 | 1020 | 0.0650932788848877f, 0.29138168692588806f, -0.29061684012413025f, |
Lightvalve | 65:a2d7c63419c2 | 1021 | 0.010446667671203613f, 0.025284886360168457f, -0.10202452540397644f, |
Lightvalve | 65:a2d7c63419c2 | 1022 | -0.10358673334121704f, 0.14746251702308655f, 0.15136101841926575f, |
Lightvalve | 65:a2d7c63419c2 | 1023 | 0.04500553011894226f, -0.2497977316379547f, -0.29277902841567993f, |
Lightvalve | 65:a2d7c63419c2 | 1024 | 0.02556520700454712f, -0.09509801864624023f, 0.16731274127960205f, |
Lightvalve | 65:a2d7c63419c2 | 1025 | -0.25266408920288086f, -0.3004688322544098f, -0.19769597053527832f, |
Lightvalve | 65:a2d7c63419c2 | 1026 | -0.14847496151924133f, 0.3053832948207855f, 0.07563886046409607f, |
Lightvalve | 65:a2d7c63419c2 | 1027 | -0.10258816182613373f, -0.060128673911094666f, 0.0016401112079620361f, |
Lightvalve | 65:a2d7c63419c2 | 1028 | -0.29647189378738403f, -0.18869297206401825f, 0.05497395992279053f, |
Lightvalve | 65:a2d7c63419c2 | 1029 | 0.16092956066131592f }, { -0.011267274618148804f, -0.25281068682670593f, |
Lightvalve | 65:a2d7c63419c2 | 1030 | -0.10565309226512909f, -0.10787995159626007f, 0.23997481167316437f, |
Lightvalve | 65:a2d7c63419c2 | 1031 | 0.011940985918045044f, 0.10584557056427002f, -0.22430141270160675f, |
Lightvalve | 65:a2d7c63419c2 | 1032 | -0.06814777851104736f, -0.24531681835651398f, -0.07618588954210281f, |
Lightvalve | 65:a2d7c63419c2 | 1033 | 0.12015970051288605f, 0.0185067281126976f, 0.002306112553924322f, |
Lightvalve | 65:a2d7c63419c2 | 1034 | 0.17718534171581268f, 0.3006735146045685f, 0.1760181039571762f, |
Lightvalve | 65:a2d7c63419c2 | 1035 | 0.04417389631271362f, 0.20160885155200958f, 0.16602091491222382f, |
Lightvalve | 65:a2d7c63419c2 | 1036 | 0.2585296034812927f, -0.027029002085328102f, -0.2520882785320282f, |
Lightvalve | 65:a2d7c63419c2 | 1037 | 0.29521048069000244f, 0.25318053364753723f, 0.05056742578744888f, |
Lightvalve | 65:a2d7c63419c2 | 1038 | 0.22924767434597015f, -0.03404907137155533f, -0.18211489915847778f, |
Lightvalve | 65:a2d7c63419c2 | 1039 | -0.15127526223659515f, 0.18461528420448303f, 0.2534249424934387f }, { |
Lightvalve | 65:a2d7c63419c2 | 1040 | -0.10580866038799286f, -0.17215237021446228f, -0.01352420449256897f, |
Lightvalve | 65:a2d7c63419c2 | 1041 | -0.13443149626255035f, -0.10265451669692993f, -0.2169143706560135f, |
Lightvalve | 65:a2d7c63419c2 | 1042 | 0.30098411440849304f, -0.2986297905445099f, 0.07908004522323608f, |
Lightvalve | 65:a2d7c63419c2 | 1043 | -0.30061498284339905f, 0.10424068570137024f, -0.018799901008605957f, |
Lightvalve | 65:a2d7c63419c2 | 1044 | -0.18665757775306702f, 0.005998075008392334f, -0.2969498336315155f, |
Lightvalve | 65:a2d7c63419c2 | 1045 | 0.18525955080986023f, 0.2379322350025177f, 0.15184926986694336f, |
Lightvalve | 65:a2d7c63419c2 | 1046 | 0.215760737657547f, -0.19088758528232574f, 0.08620095252990723f, |
Lightvalve | 65:a2d7c63419c2 | 1047 | 0.019999295473098755f, -0.0752219706773758f, 0.11181813478469849f, |
Lightvalve | 65:a2d7c63419c2 | 1048 | 0.1881926953792572f, 0.2210972011089325f, 0.13236162066459656f, |
Lightvalve | 65:a2d7c63419c2 | 1049 | -0.06690356135368347f, -0.18345263600349426f, -0.14861416816711426f, |
Lightvalve | 65:a2d7c63419c2 | 1050 | 0.08577704429626465f, -0.09683996438980103f }, { 0.03951254487037659f, |
Lightvalve | 65:a2d7c63419c2 | 1051 | 0.23604217171669006f, 0.012746036052703857f, -0.12561996281147003f, |
Lightvalve | 65:a2d7c63419c2 | 1052 | -0.1283164620399475f, 0.25823846459388733f, 0.10610169172286987f, |
Lightvalve | 65:a2d7c63419c2 | 1053 | 0.22718152403831482f, 0.1749366819858551f, 0.007794857025146484f, |
Lightvalve | 65:a2d7c63419c2 | 1054 | 0.11289489269256592f, 0.2725127637386322f, -0.13616766035556793f, |
Lightvalve | 65:a2d7c63419c2 | 1055 | -0.03546282649040222f, -0.1685536652803421f, -0.24492129683494568f, |
Lightvalve | 65:a2d7c63419c2 | 1056 | 0.15760570764541626f, 0.017505377531051636f, -0.273531436920166f, |
Lightvalve | 65:a2d7c63419c2 | 1057 | -0.005667984485626221f, 0.18370777368545532f, -0.023328542709350586f, |
Lightvalve | 65:a2d7c63419c2 | 1058 | 0.2379932701587677f, -0.048420339822769165f, 0.10376441478729248f, |
Lightvalve | 65:a2d7c63419c2 | 1059 | -0.295401930809021f, -0.20498433709144592f, 0.22346952557563782f, |
Lightvalve | 65:a2d7c63419c2 | 1060 | -0.26649031043052673f, -0.08466874063014984f, 0.23347875475883484f, |
Lightvalve | 65:a2d7c63419c2 | 1061 | -0.03380200266838074f }, { 0.3014208972454071f, -0.11652402579784393f, |
Lightvalve | 65:a2d7c63419c2 | 1062 | 0.24921879172325134f, 0.16919833421707153f, -0.33012309670448303f, |
Lightvalve | 65:a2d7c63419c2 | 1063 | -0.19414515793323517f, -0.031346261501312256f, -0.11968852579593658f, |
Lightvalve | 65:a2d7c63419c2 | 1064 | 0.23963233828544617f, 0.21321198344230652f, -0.04236738383769989f, |
Lightvalve | 65:a2d7c63419c2 | 1065 | -0.04909612983465195f, -0.15507397055625916f, 0.041283149272203445f, |
Lightvalve | 65:a2d7c63419c2 | 1066 | -0.0798816904425621f, -0.16132454574108124f, -0.22342979907989502f, |
Lightvalve | 65:a2d7c63419c2 | 1067 | 0.2487291395664215f, -0.275277704000473f, -0.1761859953403473f, |
Lightvalve | 65:a2d7c63419c2 | 1068 | -0.1089298352599144f, 0.14958830177783966f, -0.09928475320339203f, |
Lightvalve | 65:a2d7c63419c2 | 1069 | -0.18516667187213898f, -0.11554347723722458f, 0.2378307580947876f, |
Lightvalve | 65:a2d7c63419c2 | 1070 | 0.042566750198602676f, -0.09927814453840256f, -0.03476092219352722f, |
Lightvalve | 65:a2d7c63419c2 | 1071 | 0.2736774981021881f, 0.01615159772336483f, -0.08927445858716965f }, { |
Lightvalve | 65:a2d7c63419c2 | 1072 | -0.17075178027153015f, 0.009595632553100586f, 0.2466227114200592f, |
Lightvalve | 65:a2d7c63419c2 | 1073 | 0.033388618379831314f, -0.34659287333488464f, -0.2819134294986725f, |
Lightvalve | 65:a2d7c63419c2 | 1074 | -0.07840541750192642f, -0.15331926941871643f, -0.2516406178474426f, |
Lightvalve | 65:a2d7c63419c2 | 1075 | 0.012286126613616943f, 0.20758569240570068f, -0.2048848569393158f, |
Lightvalve | 65:a2d7c63419c2 | 1076 | -0.12051127851009369f, 0.10427423566579819f, 0.0999673530459404f, |
Lightvalve | 65:a2d7c63419c2 | 1077 | 0.028271911665797234f, -0.24087269604206085f, -0.048499464988708496f, |
Lightvalve | 65:a2d7c63419c2 | 1078 | -0.20961162447929382f, 0.10103815048933029f, -0.2312844693660736f, |
Lightvalve | 65:a2d7c63419c2 | 1079 | -0.22412340342998505f, -0.031352698802948f, 0.27904242277145386f, |
Lightvalve | 65:a2d7c63419c2 | 1080 | -0.11300363391637802f, -0.16207841038703918f, -0.33752813935279846f, |
Lightvalve | 65:a2d7c63419c2 | 1081 | 0.3786945641040802f, -0.07090267539024353f, -0.23986908793449402f, |
Lightvalve | 65:a2d7c63419c2 | 1082 | -0.30680611729621887f, -0.0811222642660141f }, { -0.01348048448562622f, |
Lightvalve | 65:a2d7c63419c2 | 1083 | 0.08233943581581116f, 0.18838337063789368f, 0.21852442622184753f, |
Lightvalve | 65:a2d7c63419c2 | 1084 | -0.04740855097770691f, 0.19177213311195374f, -0.0060100555419921875f, |
Lightvalve | 65:a2d7c63419c2 | 1085 | 0.20933791995048523f, 0.06356173753738403f, 0.063028484582901f, |
Lightvalve | 65:a2d7c63419c2 | 1086 | 0.09440034627914429f, 0.29559019207954407f, -0.2545689642429352f, |
Lightvalve | 65:a2d7c63419c2 | 1087 | -0.09652335941791534f, -0.2841038703918457f, -0.03553757071495056f, |
Lightvalve | 65:a2d7c63419c2 | 1088 | 0.02329021692276001f, -0.08720272779464722f, -0.0750999003648758f, |
Lightvalve | 65:a2d7c63419c2 | 1089 | -0.10468094050884247f, -0.03761094808578491f, -0.030853450298309326f, |
Lightvalve | 65:a2d7c63419c2 | 1090 | 0.2112145721912384f, 0.2599640190601349f, -0.2969062626361847f, |
Lightvalve | 65:a2d7c63419c2 | 1091 | -0.13667742908000946f, 0.24173608422279358f, 0.09566575288772583f, |
Lightvalve | 65:a2d7c63419c2 | 1092 | 0.021116197109222412f, -0.005982398986816406f, -0.26417285203933716f, |
Lightvalve | 65:a2d7c63419c2 | 1093 | 0.1879688799381256f }, { -0.1763739138841629f, -0.17203155159950256f, |
Lightvalve | 65:a2d7c63419c2 | 1094 | 0.0620841383934021f, -0.04815051332116127f, -0.08886270225048065f, |
Lightvalve | 65:a2d7c63419c2 | 1095 | -0.19284456968307495f, 0.09443464875221252f, 0.1472807228565216f, |
Lightvalve | 65:a2d7c63419c2 | 1096 | -0.21029016375541687f, 0.2210421860218048f, -0.26095423102378845f, |
Lightvalve | 65:a2d7c63419c2 | 1097 | 0.23557153344154358f, -0.07677116990089417f, -0.16641905903816223f, |
Lightvalve | 65:a2d7c63419c2 | 1098 | -0.16725768148899078f, -0.2004043012857437f, 0.08218716084957123f, |
Lightvalve | 65:a2d7c63419c2 | 1099 | -0.29308468103408813f, -0.057871971279382706f, -0.07429885864257812f, |
Lightvalve | 65:a2d7c63419c2 | 1100 | 0.2029605507850647f, -0.19719278812408447f, -0.22302524745464325f, |
Lightvalve | 65:a2d7c63419c2 | 1101 | 0.2192145586013794f, -0.13908077776432037f, 0.2019682675600052f, |
Lightvalve | 65:a2d7c63419c2 | 1102 | -0.028201768174767494f, 0.08898906409740448f, 0.17976179718971252f, |
Lightvalve | 65:a2d7c63419c2 | 1103 | -0.22928372025489807f, 0.3000858724117279f, 0.08501409739255905f }, { |
Lightvalve | 65:a2d7c63419c2 | 1104 | -0.09888127446174622f, -0.22750279307365417f, -0.22503364086151123f, |
Lightvalve | 65:a2d7c63419c2 | 1105 | -0.0014225258491933346f, -0.012498408555984497f, -0.24329537153244019f, |
Lightvalve | 65:a2d7c63419c2 | 1106 | -0.09442851692438126f, 0.08175003528594971f, -0.016126900911331177f, |
Lightvalve | 65:a2d7c63419c2 | 1107 | 0.06972584128379822f, 0.05360379442572594f, 0.22432491183280945f, |
Lightvalve | 65:a2d7c63419c2 | 1108 | -0.031845152378082275f, -0.2877633273601532f, 0.18349257111549377f, |
Lightvalve | 65:a2d7c63419c2 | 1109 | 0.19327174127101898f, -0.09216172993183136f, 0.04617339372634888f, |
Lightvalve | 65:a2d7c63419c2 | 1110 | -0.09483018517494202f, -0.07904840260744095f, -0.035641368478536606f, |
Lightvalve | 65:a2d7c63419c2 | 1111 | -0.2887636721134186f, -0.06047184765338898f, -0.3070217967033386f, |
Lightvalve | 65:a2d7c63419c2 | 1112 | 4.397468364913948e-05f, -0.19100867211818695f, 0.28239238262176514f, |
Lightvalve | 65:a2d7c63419c2 | 1113 | -0.2758784890174866f, -0.16326025128364563f, 0.11664235591888428f, |
Lightvalve | 65:a2d7c63419c2 | 1114 | -0.03823475539684296f, 0.11660117655992508f }, |
Lightvalve | 65:a2d7c63419c2 | 1115 | |
Lightvalve | 65:a2d7c63419c2 | 1116 | }; |
Lightvalve | 65:a2d7c63419c2 | 1117 | |
Lightvalve | 65:a2d7c63419c2 | 1118 | const float hout[32] = { 0.3285340666770935f, 0.2858171761035919f, |
Lightvalve | 65:a2d7c63419c2 | 1119 | -0.36366742849349976f, -0.2632009983062744f, -0.25631460547447205f, |
Lightvalve | 65:a2d7c63419c2 | 1120 | 0.33468252420425415f, 0.002162247896194458f, 0.1081397533416748f, |
Lightvalve | 65:a2d7c63419c2 | 1121 | -0.19566167891025543f, -0.007266071625053883f, 0.1744336485862732f, |
Lightvalve | 65:a2d7c63419c2 | 1122 | -0.19491273164749146f, -0.16939763724803925f, 0.1573415994644165f, |
Lightvalve | 65:a2d7c63419c2 | 1123 | 0.2356991171836853f, -0.1462659239768982f, 0.09851181507110596f, |
Lightvalve | 65:a2d7c63419c2 | 1124 | -0.21499931812286377f, -0.013007339090108871f, -0.26934152841567993f, |
Lightvalve | 65:a2d7c63419c2 | 1125 | -0.10125408321619034f, 0.16949352622032166f, -0.2570975124835968f, |
Lightvalve | 65:a2d7c63419c2 | 1126 | -0.21437735855579376f, 0.2278641164302826f, 0.2520971894264221f, |
Lightvalve | 65:a2d7c63419c2 | 1127 | -0.38587644696235657f, -0.3990364372730255f, 0.24998146295547485f, |
Lightvalve | 65:a2d7c63419c2 | 1128 | -0.3257754445075989f, -0.41329723596572876f, -0.26551106572151184f }; |
Lightvalve | 65:a2d7c63419c2 | 1129 | |
Lightvalve | 65:a2d7c63419c2 | 1130 | const float b1[32] = { 0.6920363306999207f, 0.9509658217430115f, |
Lightvalve | 65:a2d7c63419c2 | 1131 | -1.7145336866378784f, 0.4119643270969391f, 1.0741286277770996f, |
Lightvalve | 65:a2d7c63419c2 | 1132 | 0.8546265363693237f, -0.07467586547136307f, 0.93145751953125f, |
Lightvalve | 65:a2d7c63419c2 | 1133 | 0.5193935036659241f, -0.8871728777885437f, 0.593039333820343f, |
Lightvalve | 65:a2d7c63419c2 | 1134 | 1.6031073331832886f, -0.33494266867637634f, -0.8010779023170471f, |
Lightvalve | 65:a2d7c63419c2 | 1135 | -1.087764859199524f, 1.1554406881332397f, 0.6632958650588989f, |
Lightvalve | 65:a2d7c63419c2 | 1136 | -0.224932461977005f, 0.26702749729156494f, 0.5859951972961426f, |
Lightvalve | 65:a2d7c63419c2 | 1137 | -0.31409698724746704f, -1.1118980646133423f, -1.6770726442337036f, |
Lightvalve | 65:a2d7c63419c2 | 1138 | -1.2263047695159912f, 2.018333911895752f, -2.0880801677703857f, |
Lightvalve | 65:a2d7c63419c2 | 1139 | -1.0489267110824585f, 0.7445360422134399f, 0.4031659960746765f, |
Lightvalve | 65:a2d7c63419c2 | 1140 | -1.0887231826782227f, 1.5438745021820068f, -0.4563482999801636f }; |
Lightvalve | 65:a2d7c63419c2 | 1141 | |
Lightvalve | 65:a2d7c63419c2 | 1142 | const float b2[32] = { -0.10466054826974869f, -0.7642630338668823f, |
Lightvalve | 65:a2d7c63419c2 | 1143 | -1.4564176797866821f, -0.528777003288269f, -0.7297643423080444f, |
Lightvalve | 65:a2d7c63419c2 | 1144 | 0.2625555098056793f, 0.389851450920105f, -0.33048292994499207f, |
Lightvalve | 65:a2d7c63419c2 | 1145 | -1.20063054561615f, -1.912178635597229f, 0.31253743171691895f, |
Lightvalve | 65:a2d7c63419c2 | 1146 | 0.6883504390716553f, -0.04988760128617287f, 2.26581072807312f, |
Lightvalve | 65:a2d7c63419c2 | 1147 | 0.13501279056072235f, 1.132785677909851f, -1.8237234354019165f, |
Lightvalve | 65:a2d7c63419c2 | 1148 | -1.5844906568527222f, 0.26375624537467957f, -0.23789723217487335f, |
Lightvalve | 65:a2d7c63419c2 | 1149 | 0.17283980548381805f, 0.3692796230316162f, 0.09335066378116608f, |
Lightvalve | 65:a2d7c63419c2 | 1150 | -1.0231001377105713f, 1.2738454341888428f, 1.44853675365448f, |
Lightvalve | 65:a2d7c63419c2 | 1151 | 0.9071134924888611f, 8.9274239144288e-05f, -0.6323830485343933f, |
Lightvalve | 65:a2d7c63419c2 | 1152 | -0.4208582937717438f, -1.1864360570907593f, -1.3916414976119995f }; |
Lightvalve | 65:a2d7c63419c2 | 1153 | |
Lightvalve | 65:a2d7c63419c2 | 1154 | const float b3[32] = { -1.963319182395935f, -0.4028509557247162f, |
Lightvalve | 65:a2d7c63419c2 | 1155 | 0.3184174597263336f, 0.1579766422510147f, 0.1897633820772171f, |
Lightvalve | 65:a2d7c63419c2 | 1156 | 0.866980791091919f, -0.45353031158447266f, -0.6562485098838806f, |
Lightvalve | 65:a2d7c63419c2 | 1157 | 0.5865635275840759f, 0.5033581852912903f, -0.14371006190776825f, |
Lightvalve | 65:a2d7c63419c2 | 1158 | 0.050810977816581726f, -0.5131177306175232f, 0.5688209533691406f, |
Lightvalve | 65:a2d7c63419c2 | 1159 | -1.1428403854370117f, -0.3598397970199585f, -1.3594286441802979f, |
Lightvalve | 65:a2d7c63419c2 | 1160 | -1.0192245244979858f, -0.2365882694721222f, 0.5294732451438904f, |
Lightvalve | 65:a2d7c63419c2 | 1161 | 1.530857801437378f, 1.2039998769760132f, -1.0573883056640625f, |
Lightvalve | 65:a2d7c63419c2 | 1162 | -0.7962622046470642f, 0.7248114347457886f, -0.36519983410835266f, |
Lightvalve | 65:a2d7c63419c2 | 1163 | -0.07752024382352829f, 0.767806887626648f, 0.2635451555252075f, |
Lightvalve | 65:a2d7c63419c2 | 1164 | -2.3236680030822754f, 0.06150589883327484f, 1.0375205278396606f }; |
Lightvalve | 65:a2d7c63419c2 | 1165 | |
Lightvalve | 65:a2d7c63419c2 | 1166 | const float bout[1] = { -0.3124803602695465f }; |
Lightvalve | 61:bc8c8270f0ab | 1167 | |
Lightvalve | 61:bc8c8270f0ab | 1168 | |
GiJeongKim | 0:51c43836c1d7 | 1169 | int main() |
GiJeongKim | 0:51c43836c1d7 | 1170 | { |
Lightvalve | 65:a2d7c63419c2 | 1171 | //F401_init84 myinit(0); |
Lightvalve | 65:a2d7c63419c2 | 1172 | //F401_init84 SystemClock_Config_84MHz_internal(); |
Lightvalve | 65:a2d7c63419c2 | 1173 | HAL_Init(); |
Lightvalve | 65:a2d7c63419c2 | 1174 | SystemClock_Config(); |
Lightvalve | 65:a2d7c63419c2 | 1175 | __HAL_RCC_SYSCFG_CLK_ENABLE(); |
Lightvalve | 65:a2d7c63419c2 | 1176 | __HAL_RCC_PWR_CLK_ENABLE(); |
Lightvalve | 65:a2d7c63419c2 | 1177 | HAL_IncTick(); |
Lightvalve | 65:a2d7c63419c2 | 1178 | |
jobuuu | 6:df07d3491e3a | 1179 | /********************************* |
jobuuu | 1:e04e563be5ce | 1180 | *** Initialization |
jobuuu | 6:df07d3491e3a | 1181 | *********************************/ |
Lightvalve | 57:f4819de54e7a | 1182 | LED = 1; |
Lightvalve | 61:bc8c8270f0ab | 1183 | pc.baud(9600); |
Lightvalve | 21:e5f1a43ea6f9 | 1184 | |
GiJeongKim | 0:51c43836c1d7 | 1185 | // i2c init |
Lightvalve | 8:5d2eebdad025 | 1186 | i2c.frequency(400 * 1000); // 0.4 mHz |
Lightvalve | 8:5d2eebdad025 | 1187 | wait_ms(2); // Power Up wait |
Lightvalve | 8:5d2eebdad025 | 1188 | look_for_hardware_i2c(); // Hardware present |
Lightvalve | 8:5d2eebdad025 | 1189 | init_as5510(i2c_slave_addr1); |
Lightvalve | 11:82d8768d7351 | 1190 | make_delay(); |
jobuuu | 2:a1c0a37df760 | 1191 | |
GiJeongKim | 0:51c43836c1d7 | 1192 | // // spi init |
Lightvalve | 16:903b5a4433b4 | 1193 | //eeprom.format(8,3); |
Lightvalve | 16:903b5a4433b4 | 1194 | //eeprom.frequency(5000000); //5M |
GiJeongKim | 0:51c43836c1d7 | 1195 | enc.format(8,0); |
GiJeongKim | 0:51c43836c1d7 | 1196 | enc.frequency(5000000); //5M |
Lightvalve | 11:82d8768d7351 | 1197 | make_delay(); |
Lightvalve | 21:e5f1a43ea6f9 | 1198 | |
Lightvalve | 16:903b5a4433b4 | 1199 | //rom |
Lightvalve | 19:23b7c1ad8683 | 1200 | ROM_CALL_DATA(); |
Lightvalve | 16:903b5a4433b4 | 1201 | make_delay(); |
Lightvalve | 13:747daba9cf59 | 1202 | |
GiJeongKim | 0:51c43836c1d7 | 1203 | // ADC init |
jobuuu | 5:a4319f79457b | 1204 | Init_ADC(); |
Lightvalve | 11:82d8768d7351 | 1205 | make_delay(); |
jobuuu | 2:a1c0a37df760 | 1206 | |
GiJeongKim | 0:51c43836c1d7 | 1207 | // Pwm init |
GiJeongKim | 0:51c43836c1d7 | 1208 | Init_PWM(); |
GiJeongKim | 0:51c43836c1d7 | 1209 | TIM4->CR1 ^= TIM_CR1_UDIS; |
Lightvalve | 11:82d8768d7351 | 1210 | make_delay(); |
Lightvalve | 13:747daba9cf59 | 1211 | |
Lightvalve | 11:82d8768d7351 | 1212 | // TMR3 init |
Lightvalve | 11:82d8768d7351 | 1213 | Init_TMR3(); |
Lightvalve | 11:82d8768d7351 | 1214 | TIM3->CR1 ^= TIM_CR1_UDIS; |
Lightvalve | 11:82d8768d7351 | 1215 | make_delay(); |
Lightvalve | 21:e5f1a43ea6f9 | 1216 | |
Lightvalve | 50:3c630b5eba9f | 1217 | // TMR2 init |
Lightvalve | 56:6f50d9d3bfee | 1218 | // Init_TMR2(); |
Lightvalve | 56:6f50d9d3bfee | 1219 | // TIM2->CR1 ^= TIM_CR1_UDIS; |
Lightvalve | 56:6f50d9d3bfee | 1220 | // make_delay(); |
Lightvalve | 21:e5f1a43ea6f9 | 1221 | |
GiJeongKim | 0:51c43836c1d7 | 1222 | // CAN |
jobuuu | 2:a1c0a37df760 | 1223 | can.attach(&CAN_RX_HANDLER); |
Lightvalve | 11:82d8768d7351 | 1224 | CAN_ID_INIT(); |
Lightvalve | 11:82d8768d7351 | 1225 | make_delay(); |
Lightvalve | 34:bb2ca2fc2a8e | 1226 | |
Lightvalve | 23:59218d4a256d | 1227 | //Timer priority |
Lightvalve | 23:59218d4a256d | 1228 | NVIC_SetPriority(TIM3_IRQn, 2); |
Lightvalve | 57:f4819de54e7a | 1229 | //NVIC_SetPriority(TIM2_IRQn, 3); |
Lightvalve | 54:647072f5307a | 1230 | NVIC_SetPriority(TIM4_IRQn, 3); |
Lightvalve | 34:bb2ca2fc2a8e | 1231 | |
Lightvalve | 23:59218d4a256d | 1232 | //can.reset(); |
Lightvalve | 19:23b7c1ad8683 | 1233 | can.filter(msg.id, 0xFFFFF000, CANStandard); |
Lightvalve | 34:bb2ca2fc2a8e | 1234 | |
GiJeongKim | 0:51c43836c1d7 | 1235 | // spi _ enc |
GiJeongKim | 0:51c43836c1d7 | 1236 | spi_enc_set_init(); |
Lightvalve | 11:82d8768d7351 | 1237 | make_delay(); |
Lightvalve | 13:747daba9cf59 | 1238 | |
Lightvalve | 11:82d8768d7351 | 1239 | //DAC init |
Lightvalve | 58:2eade98630e2 | 1240 | if (SENSING_MODE == 0) { |
Lightvalve | 58:2eade98630e2 | 1241 | dac_1 = TORQUE_VREF / 3.3f; |
Lightvalve | 58:2eade98630e2 | 1242 | dac_2 = 0.0f; |
Lightvalve | 58:2eade98630e2 | 1243 | } else if (SENSING_MODE == 1) { |
Lightvalve | 58:2eade98630e2 | 1244 | dac_1 = PRES_A_VREF / 3.3f; |
Lightvalve | 58:2eade98630e2 | 1245 | dac_2 = PRES_B_VREF / 3.3f; |
Lightvalve | 58:2eade98630e2 | 1246 | } |
Lightvalve | 11:82d8768d7351 | 1247 | make_delay(); |
Lightvalve | 13:747daba9cf59 | 1248 | |
Lightvalve | 19:23b7c1ad8683 | 1249 | for (int i=0; i<50; i++) { |
Lightvalve | 11:82d8768d7351 | 1250 | if(i%2==0) |
Lightvalve | 38:118df027d851 | 1251 | ID_index_array[i] = - i * 0.5f; |
Lightvalve | 11:82d8768d7351 | 1252 | else |
Lightvalve | 38:118df027d851 | 1253 | ID_index_array[i] = (i+1) * 0.5f; |
Lightvalve | 11:82d8768d7351 | 1254 | } |
Lightvalve | 61:bc8c8270f0ab | 1255 | |
Lightvalve | 61:bc8c8270f0ab | 1256 | |
jobuuu | 6:df07d3491e3a | 1257 | /************************************ |
jobuuu | 1:e04e563be5ce | 1258 | *** Program is operating! |
jobuuu | 6:df07d3491e3a | 1259 | *************************************/ |
GiJeongKim | 0:51c43836c1d7 | 1260 | while(1) { |
Lightvalve | 65:a2d7c63419c2 | 1261 | //if(timer_while==1000 && OPERATING_MODE==5) { |
Lightvalve | 65:a2d7c63419c2 | 1262 | if(timer_while==1000) { |
Lightvalve | 65:a2d7c63419c2 | 1263 | //i2c |
Lightvalve | 65:a2d7c63419c2 | 1264 | read_field(i2c_slave_addr1); |
Lightvalve | 65:a2d7c63419c2 | 1265 | if(DIR_VALVE_ENC < 0) value = 1023 - value; |
Lightvalve | 65:a2d7c63419c2 | 1266 | // if(LED==1) { |
Lightvalve | 65:a2d7c63419c2 | 1267 | // LED=0; |
Lightvalve | 65:a2d7c63419c2 | 1268 | // } else |
Lightvalve | 65:a2d7c63419c2 | 1269 | // LED = 1; |
Lightvalve | 65:a2d7c63419c2 | 1270 | timer_while = 0; |
Lightvalve | 65:a2d7c63419c2 | 1271 | } |
Lightvalve | 65:a2d7c63419c2 | 1272 | |
Lightvalve | 65:a2d7c63419c2 | 1273 | float output1[32] = { 0.0f }; |
Lightvalve | 65:a2d7c63419c2 | 1274 | float output2[32] = { 0.0f }; |
Lightvalve | 65:a2d7c63419c2 | 1275 | float output3[32] = { 0.0f }; |
Lightvalve | 65:a2d7c63419c2 | 1276 | float output = 0.0f; |
Lightvalve | 65:a2d7c63419c2 | 1277 | |
Lightvalve | 65:a2d7c63419c2 | 1278 | timer_while ++; |
Lightvalve | 65:a2d7c63419c2 | 1279 | |
Lightvalve | 65:a2d7c63419c2 | 1280 | // t.reset(); |
Lightvalve | 65:a2d7c63419c2 | 1281 | // t.start(); |
Lightvalve | 65:a2d7c63419c2 | 1282 | |
Lightvalve | 65:a2d7c63419c2 | 1283 | for (int index2 = 0; index2 < 32; index2++) { |
Lightvalve | 65:a2d7c63419c2 | 1284 | for (int index1 = 0; index1 < 22; index1++) { |
Lightvalve | 65:a2d7c63419c2 | 1285 | output1[index2] = output1[index2] |
Lightvalve | 65:a2d7c63419c2 | 1286 | + h1[index1][index2] * input[index1]; |
Lightvalve | 65:a2d7c63419c2 | 1287 | } |
Lightvalve | 65:a2d7c63419c2 | 1288 | output1[index2] = output1[index2] + b1[index2]; |
Lightvalve | 65:a2d7c63419c2 | 1289 | if (output1[index2] < 0) { |
Lightvalve | 65:a2d7c63419c2 | 1290 | output1[index2] = 0; |
Lightvalve | 65:a2d7c63419c2 | 1291 | } |
Lightvalve | 65:a2d7c63419c2 | 1292 | } |
Lightvalve | 65:a2d7c63419c2 | 1293 | |
Lightvalve | 65:a2d7c63419c2 | 1294 | for (int index2 = 0; index2 < 32; index2++) { |
Lightvalve | 65:a2d7c63419c2 | 1295 | for (int index1 = 0; index1 < 32; index1++) { |
Lightvalve | 65:a2d7c63419c2 | 1296 | output2[index2] = output2[index2] |
Lightvalve | 65:a2d7c63419c2 | 1297 | + h2[index1][index2] * output1[index1]; |
Lightvalve | 65:a2d7c63419c2 | 1298 | } |
Lightvalve | 65:a2d7c63419c2 | 1299 | output2[index2] = output2[index2] + b2[index2]; |
Lightvalve | 65:a2d7c63419c2 | 1300 | if (output2[index2] < 0) { |
Lightvalve | 65:a2d7c63419c2 | 1301 | output2[index2] = 0; |
Lightvalve | 65:a2d7c63419c2 | 1302 | } |
Lightvalve | 65:a2d7c63419c2 | 1303 | } |
Lightvalve | 65:a2d7c63419c2 | 1304 | |
Lightvalve | 65:a2d7c63419c2 | 1305 | for (int index2 = 0; index2 < 32; index2++) { |
Lightvalve | 65:a2d7c63419c2 | 1306 | for (int index1 = 0; index1 < 32; index1++) { |
Lightvalve | 65:a2d7c63419c2 | 1307 | output3[index2] = output3[index2] |
Lightvalve | 65:a2d7c63419c2 | 1308 | + h3[index1][index2] * output2[index1]; |
Lightvalve | 65:a2d7c63419c2 | 1309 | } |
Lightvalve | 65:a2d7c63419c2 | 1310 | output3[index2] = output3[index2] + b3[index2]; |
Lightvalve | 65:a2d7c63419c2 | 1311 | if (output3[index2] < 0) { |
Lightvalve | 65:a2d7c63419c2 | 1312 | output3[index2] = 0; |
Lightvalve | 65:a2d7c63419c2 | 1313 | } |
Lightvalve | 65:a2d7c63419c2 | 1314 | } |
Lightvalve | 65:a2d7c63419c2 | 1315 | |
Lightvalve | 65:a2d7c63419c2 | 1316 | for (int index2 = 0; index2 < 1; index2++) { |
Lightvalve | 65:a2d7c63419c2 | 1317 | for (int index1 = 0; index1 < 32; index1++) { |
Lightvalve | 65:a2d7c63419c2 | 1318 | output = output + hout[index2] * output3[index1]; |
Lightvalve | 65:a2d7c63419c2 | 1319 | } |
Lightvalve | 65:a2d7c63419c2 | 1320 | output = output + bout[index2]; |
Lightvalve | 65:a2d7c63419c2 | 1321 | output = 1.0f/(1.0f+exp(-output)); |
Lightvalve | 65:a2d7c63419c2 | 1322 | } |
Lightvalve | 62:b5452adfb2cd | 1323 | |
Lightvalve | 65:a2d7c63419c2 | 1324 | // t.stop(); |
Lightvalve | 65:a2d7c63419c2 | 1325 | |
Lightvalve | 65:a2d7c63419c2 | 1326 | //printf("NNoutput : %f\n", NNoutput); |
Lightvalve | 65:a2d7c63419c2 | 1327 | //printf("time : %f\n", t.read()); |
Lightvalve | 65:a2d7c63419c2 | 1328 | |
Lightvalve | 65:a2d7c63419c2 | 1329 | //wait(1); |
Lightvalve | 61:bc8c8270f0ab | 1330 | |
Lightvalve | 65:a2d7c63419c2 | 1331 | //if(timer_while%10000==0) |
Lightvalve | 65:a2d7c63419c2 | 1332 | if(LED==1) { |
Lightvalve | 65:a2d7c63419c2 | 1333 | LED=0; |
Lightvalve | 65:a2d7c63419c2 | 1334 | } else |
Lightvalve | 65:a2d7c63419c2 | 1335 | LED = 1; |
Lightvalve | 65:a2d7c63419c2 | 1336 | |
Lightvalve | 65:a2d7c63419c2 | 1337 | // CAN_TX_PWM((int16_t) (t.read() * 1000000.0f)); //1500 |
Lightvalve | 61:bc8c8270f0ab | 1338 | |
Lightvalve | 63:3c6869477483 | 1339 | // PWM_out = NNoutput * 24000.0f - 12000.0f; |
Lightvalve | 63:3c6869477483 | 1340 | // |
Lightvalve | 63:3c6869477483 | 1341 | // |
Lightvalve | 63:3c6869477483 | 1342 | // if (PWM_out>0.0f) { |
Lightvalve | 63:3c6869477483 | 1343 | // dtc_v=0.0f; |
Lightvalve | 63:3c6869477483 | 1344 | // dtc_w=PWM_out; |
Lightvalve | 63:3c6869477483 | 1345 | // } else { |
Lightvalve | 63:3c6869477483 | 1346 | // dtc_v=-PWM_out; |
Lightvalve | 63:3c6869477483 | 1347 | // dtc_w=0.0f; |
Lightvalve | 63:3c6869477483 | 1348 | // } |
Lightvalve | 63:3c6869477483 | 1349 | // |
Lightvalve | 63:3c6869477483 | 1350 | // //pwm |
Lightvalve | 63:3c6869477483 | 1351 | // TIM4->CCR2 = (PWM_ARR)*(1.0f-dtc_v); |
Lightvalve | 63:3c6869477483 | 1352 | // TIM4->CCR1 = (PWM_ARR)*(1.0f-dtc_w); |
Lightvalve | 62:b5452adfb2cd | 1353 | |
Lightvalve | 62:b5452adfb2cd | 1354 | |
Lightvalve | 61:bc8c8270f0ab | 1355 | |
GiJeongKim | 0:51c43836c1d7 | 1356 | } |
jobuuu | 1:e04e563be5ce | 1357 | } |
jobuuu | 1:e04e563be5ce | 1358 | |
Lightvalve | 33:91b17819ec30 | 1359 | float DDV_JOINT_POS_FF(float REF_JOINT_VEL) |
Lightvalve | 14:8e7590227d22 | 1360 | { |
Lightvalve | 14:8e7590227d22 | 1361 | |
Lightvalve | 13:747daba9cf59 | 1362 | int i = 0; |
Lightvalve | 48:889798ff9329 | 1363 | float Ref_Valve_Pos_FF = 0.0f; |
Lightvalve | 14:8e7590227d22 | 1364 | for(i=0; i<VALVE_POS_NUM; i++) { |
Lightvalve | 14:8e7590227d22 | 1365 | if(REF_JOINT_VEL >= min(JOINT_VEL[i],JOINT_VEL[i+1]) && REF_JOINT_VEL <= max(JOINT_VEL[i],JOINT_VEL[i+1])) { |
Lightvalve | 14:8e7590227d22 | 1366 | if(i==0) { |
Lightvalve | 50:3c630b5eba9f | 1367 | if(JOINT_VEL[i+1] == JOINT_VEL[i]) { |
Lightvalve | 57:f4819de54e7a | 1368 | Ref_Valve_Pos_FF = (float) VALVE_CENTER; |
Lightvalve | 50:3c630b5eba9f | 1369 | } else { |
Lightvalve | 57:f4819de54e7a | 1370 | Ref_Valve_Pos_FF = ((float) 10/(JOINT_VEL[i+1] - JOINT_VEL[i]) * (REF_JOINT_VEL - JOINT_VEL[i])) + (float) VALVE_CENTER; |
Lightvalve | 38:118df027d851 | 1371 | } |
Lightvalve | 14:8e7590227d22 | 1372 | } else { |
Lightvalve | 50:3c630b5eba9f | 1373 | if(JOINT_VEL[i+1] == JOINT_VEL[i-1]) { |
Lightvalve | 57:f4819de54e7a | 1374 | Ref_Valve_Pos_FF = (float) VALVE_CENTER; |
Lightvalve | 50:3c630b5eba9f | 1375 | } else { |
Lightvalve | 57:f4819de54e7a | 1376 | Ref_Valve_Pos_FF = ((float) 10*(ID_index_array[i+1] - ID_index_array[i-1])/(JOINT_VEL[i+1] - JOINT_VEL[i-1]) * (REF_JOINT_VEL - JOINT_VEL[i-1])) + (float) VALVE_CENTER + (float) (10*ID_index_array[i-1]); |
Lightvalve | 38:118df027d851 | 1377 | } |
Lightvalve | 13:747daba9cf59 | 1378 | } |
Lightvalve | 13:747daba9cf59 | 1379 | break; |
Lightvalve | 13:747daba9cf59 | 1380 | } |
Lightvalve | 13:747daba9cf59 | 1381 | } |
Lightvalve | 14:8e7590227d22 | 1382 | if(REF_JOINT_VEL > max(JOINT_VEL[VALVE_POS_NUM-1], JOINT_VEL[VALVE_POS_NUM-2])) { |
Lightvalve | 33:91b17819ec30 | 1383 | Ref_Valve_Pos_FF = (float) VALVE_MAX_POS; |
Lightvalve | 14:8e7590227d22 | 1384 | } else if(REF_JOINT_VEL < min(JOINT_VEL[VALVE_POS_NUM-1], JOINT_VEL[VALVE_POS_NUM-2])) { |
Lightvalve | 33:91b17819ec30 | 1385 | Ref_Valve_Pos_FF = (float) VALVE_MIN_POS; |
Lightvalve | 13:747daba9cf59 | 1386 | } |
Lightvalve | 36:a46e63505ed8 | 1387 | |
Lightvalve | 57:f4819de54e7a | 1388 | Ref_Valve_Pos_FF = (float) VELOCITY_COMP_GAIN * 0.01f * (float) (Ref_Valve_Pos_FF - (float) VALVE_CENTER); |
Lightvalve | 13:747daba9cf59 | 1389 | return Ref_Valve_Pos_FF; |
Lightvalve | 50:3c630b5eba9f | 1390 | |
Lightvalve | 13:747daba9cf59 | 1391 | } |
jobuuu | 6:df07d3491e3a | 1392 | |
jobuuu | 6:df07d3491e3a | 1393 | |
Lightvalve | 30:8d561f16383b | 1394 | void VALVE_POS_CONTROL(float REF_VALVE_POS) |
Lightvalve | 14:8e7590227d22 | 1395 | { |
Lightvalve | 13:747daba9cf59 | 1396 | int i = 0; |
Lightvalve | 13:747daba9cf59 | 1397 | |
Lightvalve | 38:118df027d851 | 1398 | if(REF_VALVE_POS > VALVE_MAX_POS) { |
Lightvalve | 38:118df027d851 | 1399 | REF_VALVE_POS = VALVE_MAX_POS; |
Lightvalve | 38:118df027d851 | 1400 | } else if(REF_VALVE_POS < VALVE_MIN_POS) { |
Lightvalve | 38:118df027d851 | 1401 | REF_VALVE_POS = VALVE_MIN_POS; |
Lightvalve | 38:118df027d851 | 1402 | } |
Lightvalve | 38:118df027d851 | 1403 | |
Lightvalve | 13:747daba9cf59 | 1404 | valve_pos_err = REF_VALVE_POS - value; |
Lightvalve | 13:747daba9cf59 | 1405 | valve_pos_err_diff = valve_pos_err - valve_pos_err_old; |
Lightvalve | 13:747daba9cf59 | 1406 | valve_pos_err_old = valve_pos_err; |
Lightvalve | 13:747daba9cf59 | 1407 | valve_pos_err_sum += valve_pos_err; |
Lightvalve | 13:747daba9cf59 | 1408 | if (valve_pos_err_sum > 1000) valve_pos_err_sum = 1000; |
Lightvalve | 13:747daba9cf59 | 1409 | if (valve_pos_err_sum<-1000) valve_pos_err_sum = -1000; |
Lightvalve | 13:747daba9cf59 | 1410 | |
Lightvalve | 13:747daba9cf59 | 1411 | VALVE_PWM_RAW_FB = P_GAIN_VALVE_POSITION * valve_pos_err + I_GAIN_VALVE_POSITION * valve_pos_err_sum + D_GAIN_VALVE_POSITION * valve_pos_err_diff; |
Lightvalve | 14:8e7590227d22 | 1412 | |
Lightvalve | 18:b8adf1582ea3 | 1413 | for(i=0; i<24; i++) { |
Lightvalve | 14:8e7590227d22 | 1414 | if(REF_VALVE_POS >= min(VALVE_POS_VS_PWM[i],VALVE_POS_VS_PWM[i+1]) && REF_VALVE_POS <= max(VALVE_POS_VS_PWM[i],VALVE_POS_VS_PWM[i+1])) { |
Lightvalve | 14:8e7590227d22 | 1415 | if(i==0) { |
Lightvalve | 48:889798ff9329 | 1416 | VALVE_PWM_RAW_FF = (float) 1000.0f / (float) (VALVE_POS_VS_PWM[i+1] - VALVE_POS_VS_PWM[i]) * ((float) REF_VALVE_POS - VALVE_POS_VS_PWM[i]); |
Lightvalve | 14:8e7590227d22 | 1417 | } else { |
Lightvalve | 48:889798ff9329 | 1418 | VALVE_PWM_RAW_FF = (float) 1000.0f* (float) (ID_index_array[i+1] - ID_index_array[i-1])/(VALVE_POS_VS_PWM[i+1] - VALVE_POS_VS_PWM[i-1]) * ((float) REF_VALVE_POS - VALVE_POS_VS_PWM[i-1]) + 1000.0f * (float) ID_index_array[i-1]; |
Lightvalve | 13:747daba9cf59 | 1419 | } |
Lightvalve | 13:747daba9cf59 | 1420 | break; |
Lightvalve | 13:747daba9cf59 | 1421 | } |
Lightvalve | 13:747daba9cf59 | 1422 | } |
Lightvalve | 59:f308b1656d9c | 1423 | Vout.ref = VALVE_PWM_RAW_FF + VALVE_PWM_RAW_FB; |
Lightvalve | 13:747daba9cf59 | 1424 | } |
Lightvalve | 13:747daba9cf59 | 1425 | |
Lightvalve | 14:8e7590227d22 | 1426 | #define LT_MAX_IDX 57 |
Lightvalve | 30:8d561f16383b | 1427 | float LT_PWM_duty[LT_MAX_IDX] = {-100.0f, -80.0f, -60.0f, -50.0f, -40.0f, -35.0f, -30.0f, -25.0f, -20.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1428 | -19.0f, -18.0f, -17.0f, -16.0f, -15.0f, -14.0f, -13.0f, -12.0f, -11.0f, -10.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1429 | -9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1430 | 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1431 | 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1432 | 25.0f, 30.0f, 35.0f, 40.0f, 50.0f, 60.0f, 80.0f, 100.0f |
Lightvalve | 34:bb2ca2fc2a8e | 1433 | }; // duty |
Lightvalve | 30:8d561f16383b | 1434 | float LT_Voltage_Output[LT_MAX_IDX] = {-321.4f, -291.3f, -261.5f, -246.8f, -231.7f, -223.9f, -216.1f, -207.9f, -198.8f, |
Lightvalve | 34:bb2ca2fc2a8e | 1435 | -196.9f, -195.0f, -192.5f, -188.8f, -184.5f, -180.2f, -175.9f, -171.5f, -166.3f, -161.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1436 | -156.0f, -149.5f, -139.0f, -126.0f, -107.0f, -87.5f, -64.0f, -38.5f, -9.4f, 0.0f, |
Lightvalve | 34:bb2ca2fc2a8e | 1437 | 12.0f, 43.5f, 69.0f, 94.0f, 114.0f, 132.0f, 146.0f, 155.5f, 162.3f, 168.2f, |
Lightvalve | 34:bb2ca2fc2a8e | 1438 | 173.1f, 178.2f, 182.8f, 187.4f, 191.8f, 196.0f, 199.7f, 201.9f, 203.8f, 205.6f, |
Lightvalve | 34:bb2ca2fc2a8e | 1439 | 214.6f, 222.5f, 230.4f, 238.2f, 253.3f, 268.0f, 297.6f, 327.7f |
Lightvalve | 34:bb2ca2fc2a8e | 1440 | }; // mV |
Lightvalve | 13:747daba9cf59 | 1441 | |
Lightvalve | 30:8d561f16383b | 1442 | float PWM_duty_byLT(float Ref_V) |
Lightvalve | 14:8e7590227d22 | 1443 | { |
Lightvalve | 30:8d561f16383b | 1444 | float PWM_duty = 0.0f; |
Lightvalve | 13:747daba9cf59 | 1445 | if(Ref_V<LT_Voltage_Output[0]) { |
Lightvalve | 30:8d561f16383b | 1446 | PWM_duty = (Ref_V-LT_Voltage_Output[0])/1.5f+LT_PWM_duty[0]; |
Lightvalve | 13:747daba9cf59 | 1447 | } else if (Ref_V>=LT_Voltage_Output[LT_MAX_IDX-1]) { |
Lightvalve | 30:8d561f16383b | 1448 | PWM_duty = (Ref_V-LT_Voltage_Output[LT_MAX_IDX-1])/1.5f+LT_PWM_duty[LT_MAX_IDX-1]; |
Lightvalve | 13:747daba9cf59 | 1449 | } else { |
Lightvalve | 13:747daba9cf59 | 1450 | int idx = 0; |
Lightvalve | 13:747daba9cf59 | 1451 | for(idx=0; idx<LT_MAX_IDX-1; idx++) { |
Lightvalve | 30:8d561f16383b | 1452 | float ini_x = LT_Voltage_Output[idx]; |
Lightvalve | 30:8d561f16383b | 1453 | float fin_x = LT_Voltage_Output[idx+1]; |
Lightvalve | 30:8d561f16383b | 1454 | float ini_y = LT_PWM_duty[idx]; |
Lightvalve | 30:8d561f16383b | 1455 | float fin_y = LT_PWM_duty[idx+1]; |
Lightvalve | 13:747daba9cf59 | 1456 | if(Ref_V>=ini_x && Ref_V<fin_x) { |
Lightvalve | 13:747daba9cf59 | 1457 | PWM_duty = (fin_y-ini_y)/(fin_x-ini_x)*(Ref_V-ini_x) + ini_y; |
Lightvalve | 13:747daba9cf59 | 1458 | break; |
Lightvalve | 13:747daba9cf59 | 1459 | } |
Lightvalve | 13:747daba9cf59 | 1460 | } |
Lightvalve | 13:747daba9cf59 | 1461 | } |
Lightvalve | 14:8e7590227d22 | 1462 | |
Lightvalve | 13:747daba9cf59 | 1463 | return PWM_duty; |
Lightvalve | 13:747daba9cf59 | 1464 | } |
jobuuu | 6:df07d3491e3a | 1465 | |
Lightvalve | 57:f4819de54e7a | 1466 | |
Lightvalve | 57:f4819de54e7a | 1467 | |
Lightvalve | 57:f4819de54e7a | 1468 | |
Lightvalve | 57:f4819de54e7a | 1469 | |
jobuuu | 2:a1c0a37df760 | 1470 | /******************************************************************************* |
jobuuu | 2:a1c0a37df760 | 1471 | TIMER INTERRUPT |
jobuuu | 2:a1c0a37df760 | 1472 | *******************************************************************************/ |
jobuuu | 2:a1c0a37df760 | 1473 | |
Lightvalve | 51:b46bed7fec80 | 1474 | float FREQ_TMR4 = (float)FREQ_20k; |
Lightvalve | 51:b46bed7fec80 | 1475 | float DT_TMR4 = (float)DT_20k; |
Lightvalve | 57:f4819de54e7a | 1476 | long CNT_TMR4 = 0; |
Lightvalve | 57:f4819de54e7a | 1477 | int TMR4_FREQ_10k = (int)FREQ_10k; |
jobuuu | 1:e04e563be5ce | 1478 | extern "C" void TIM4_IRQHandler(void) |
jobuuu | 1:e04e563be5ce | 1479 | { |
Lightvalve | 19:23b7c1ad8683 | 1480 | if (TIM4->SR & TIM_SR_UIF ) { |
Lightvalve | 21:e5f1a43ea6f9 | 1481 | |
Lightvalve | 21:e5f1a43ea6f9 | 1482 | /******************************************************* |
Lightvalve | 21:e5f1a43ea6f9 | 1483 | *** Sensor Read & Data Handling |
Lightvalve | 21:e5f1a43ea6f9 | 1484 | ********************************************************/ |
Lightvalve | 13:747daba9cf59 | 1485 | |
Lightvalve | 57:f4819de54e7a | 1486 | //Encoder |
Lightvalve | 57:f4819de54e7a | 1487 | if (CNT_TMR4 % (int) ((int) FREQ_TMR4/TMR4_FREQ_10k) == 0) { |
Lightvalve | 57:f4819de54e7a | 1488 | ENC_UPDATE(); |
Lightvalve | 57:f4819de54e7a | 1489 | } |
Lightvalve | 62:b5452adfb2cd | 1490 | |
Lightvalve | 63:3c6869477483 | 1491 | // for(int i=0; i<10; i++){ |
Lightvalve | 63:3c6869477483 | 1492 | // position_array[i] = position_array[i+1]; |
Lightvalve | 63:3c6869477483 | 1493 | // } |
Lightvalve | 63:3c6869477483 | 1494 | // position_array[10] = (pos.ref/(float)(ENC_PULSE_PER_POSITION)+10.0f)/90.0f; |
Lightvalve | 63:3c6869477483 | 1495 | // |
Lightvalve | 63:3c6869477483 | 1496 | // for(int i=0; i<5; i++){ |
Lightvalve | 63:3c6869477483 | 1497 | // input_array[i] = position_array[2*i+2] - (pos.ref/(float)(ENC_PULSE_PER_POSITION)+10.0f)/90.0f; |
Lightvalve | 63:3c6869477483 | 1498 | // } |
Lightvalve | 61:bc8c8270f0ab | 1499 | |
Lightvalve | 61:bc8c8270f0ab | 1500 | ADC1->CR2 |= 0x40000000; |
Lightvalve | 58:2eade98630e2 | 1501 | if (SENSING_MODE == 0) { |
Lightvalve | 58:2eade98630e2 | 1502 | // Torque Sensing (0~210)bar ============================================= |
Lightvalve | 58:2eade98630e2 | 1503 | float pres_A_new = (((float) ADC1->DR) - 2047.5f); |
Lightvalve | 58:2eade98630e2 | 1504 | double alpha_update_ft = 1.0f / (1.0f + FREQ_TMR4 / (2.0f * 3.14f * 100.0f)); // f_cutoff : 200Hz |
Lightvalve | 58:2eade98630e2 | 1505 | pres_A.sen = (1.0f - alpha_update_ft) * pres_A.sen + alpha_update_ft * pres_A_new; |
Lightvalve | 58:2eade98630e2 | 1506 | torq.sen = pres_A.sen / TORQUE_SENSOR_PULSE_PER_TORQUE; |
Lightvalve | 17:1865016ca2e7 | 1507 | |
Lightvalve | 58:2eade98630e2 | 1508 | } else if (SENSING_MODE == 1) { |
Lightvalve | 58:2eade98630e2 | 1509 | // Pressure Sensing (0~210)bar ============================================= |
Lightvalve | 58:2eade98630e2 | 1510 | float pres_A_new = (((float)ADC1->DR) - PRES_A_NULL); |
Lightvalve | 58:2eade98630e2 | 1511 | float pres_B_new = (((float)ADC2->DR) - PRES_B_NULL); |
Lightvalve | 58:2eade98630e2 | 1512 | double alpha_update_pres = 1.0f / (1.0f + FREQ_TMR4 / (2.0f * 3.14f * 200.0f)); // f_cutoff : 500Hz |
Lightvalve | 58:2eade98630e2 | 1513 | pres_A.sen = (1.0f - alpha_update_pres) * pres_A.sen + alpha_update_pres * pres_A_new; |
Lightvalve | 58:2eade98630e2 | 1514 | pres_B.sen = (1.0f - alpha_update_pres) * pres_B.sen + alpha_update_pres * pres_B_new; |
Lightvalve | 58:2eade98630e2 | 1515 | CUR_PRES_A_BAR = pres_A.sen / PRES_SENSOR_A_PULSE_PER_BAR; |
Lightvalve | 58:2eade98630e2 | 1516 | CUR_PRES_B_BAR = pres_B.sen / PRES_SENSOR_B_PULSE_PER_BAR; |
Lightvalve | 50:3c630b5eba9f | 1517 | |
Lightvalve | 58:2eade98630e2 | 1518 | if ((OPERATING_MODE & 0x01) == 0) { // Rotary Actuator |
Lightvalve | 58:2eade98630e2 | 1519 | torq.sen = (PISTON_AREA_A * CUR_PRES_A_BAR - PISTON_AREA_B * CUR_PRES_B_BAR) * 0.0001f; // mm^3*bar >> Nm |
Lightvalve | 58:2eade98630e2 | 1520 | } else if ((OPERATING_MODE & 0x01) == 1) { // Linear Actuator |
Lightvalve | 58:2eade98630e2 | 1521 | torq.sen = (PISTON_AREA_A * CUR_PRES_A_BAR - PISTON_AREA_B * CUR_PRES_B_BAR) * 0.1f; // mm^2*bar >> N |
Lightvalve | 58:2eade98630e2 | 1522 | } |
Lightvalve | 58:2eade98630e2 | 1523 | } |
Lightvalve | 61:bc8c8270f0ab | 1524 | |
Lightvalve | 58:2eade98630e2 | 1525 | // //Pressure sensor A |
Lightvalve | 58:2eade98630e2 | 1526 | // ADC1->CR2 |= 0x40000000; // adc _ 12bit |
Lightvalve | 58:2eade98630e2 | 1527 | // //while((ADC1->SR & 0b10)); |
Lightvalve | 58:2eade98630e2 | 1528 | // float alpha_update_pres_A = 1.0f/(1.0f + FREQ_TMR4/(2.0f*3.14f*100.0f)); |
Lightvalve | 58:2eade98630e2 | 1529 | // float pres_A_new = ((float)ADC1->DR); |
Lightvalve | 58:2eade98630e2 | 1530 | // pres_A.sen = pres_A.sen*(1.0f-alpha_update_pres_A)+pres_A_new*(alpha_update_pres_A); |
Lightvalve | 58:2eade98630e2 | 1531 | // torq.sen = - (pres_A.sen-2048.0f); //pulse -2047~2047 //SW just changed the sign to correct the direction of loadcell on LIGHT. Correct later. |
Lightvalve | 58:2eade98630e2 | 1532 | // |
Lightvalve | 58:2eade98630e2 | 1533 | // |
Lightvalve | 58:2eade98630e2 | 1534 | // //Pressure sensor B |
Lightvalve | 58:2eade98630e2 | 1535 | // float alpha_update_pres_B = 1.0f/(1.0f + FREQ_TMR4/(2.0f*3.14f*100.0f)); |
Lightvalve | 58:2eade98630e2 | 1536 | // float pres_B_new = ((float)ADC2->DR); |
Lightvalve | 58:2eade98630e2 | 1537 | // pres_B.sen = pres_B.sen*(1.0f-alpha_update_pres_B)+pres_B_new*(alpha_update_pres_B); |
Lightvalve | 58:2eade98630e2 | 1538 | // //torq.sen = pres_A.sen * (float) PISTON_AREA_A - pres_B.sen * (float) PISTON_AREA_B; |
Lightvalve | 17:1865016ca2e7 | 1539 | |
Lightvalve | 17:1865016ca2e7 | 1540 | |
Lightvalve | 21:e5f1a43ea6f9 | 1541 | //Current |
Lightvalve | 21:e5f1a43ea6f9 | 1542 | //ADC3->CR2 |= 0x40000000; // adc _ 12bit |
Lightvalve | 25:3e6b574cab5c | 1543 | //int raw_cur = ADC3->DR; |
Lightvalve | 21:e5f1a43ea6f9 | 1544 | //while((ADC3->SR & 0b10)); |
Lightvalve | 51:b46bed7fec80 | 1545 | float alpha_update_cur = 1.0f/(1.0f + FREQ_TMR4/(2.0f*3.14f*500.0f)); // f_cutoff : 500Hz |
Lightvalve | 30:8d561f16383b | 1546 | float cur_new = ((float)ADC3->DR-2048.0f)*20.0f/4096.0f; // unit : mA |
Lightvalve | 30:8d561f16383b | 1547 | cur.sen=cur.sen*(1.0f-alpha_update_cur)+cur_new*(alpha_update_cur); |
Lightvalve | 25:3e6b574cab5c | 1548 | //cur.sen = raw_cur; |
Lightvalve | 58:2eade98630e2 | 1549 | |
Lightvalve | 57:f4819de54e7a | 1550 | CNT_TMR4++; |
Lightvalve | 21:e5f1a43ea6f9 | 1551 | } |
Lightvalve | 11:82d8768d7351 | 1552 | TIM4->SR = 0x0; // reset the status register |
Lightvalve | 11:82d8768d7351 | 1553 | } |
Lightvalve | 19:23b7c1ad8683 | 1554 | |
Lightvalve | 19:23b7c1ad8683 | 1555 | |
Lightvalve | 18:b8adf1582ea3 | 1556 | int j =0; |
Lightvalve | 54:647072f5307a | 1557 | float FREQ_TMR3 = (float)FREQ_5k; |
Lightvalve | 48:889798ff9329 | 1558 | float DT_TMR3 = (float)DT_5k; |
Lightvalve | 45:35fa6884d0c6 | 1559 | int cnt_trans = 0; |
Lightvalve | 48:889798ff9329 | 1560 | double VALVE_POS_RAW_FORCE_FB_LOGGING = 0.0f; |
Lightvalve | 57:f4819de54e7a | 1561 | int can_rest =0; |
Lightvalve | 48:889798ff9329 | 1562 | |
Lightvalve | 11:82d8768d7351 | 1563 | extern "C" void TIM3_IRQHandler(void) |
Lightvalve | 21:e5f1a43ea6f9 | 1564 | { |
Lightvalve | 19:23b7c1ad8683 | 1565 | if (TIM3->SR & TIM_SR_UIF ) { |
Lightvalve | 57:f4819de54e7a | 1566 | |
Lightvalve | 57:f4819de54e7a | 1567 | if (((OPERATING_MODE&0b110)>>1) == 0) { |
Lightvalve | 57:f4819de54e7a | 1568 | K_v = 0.4f; // Moog (LPM >> mA) , 100bar |
Lightvalve | 57:f4819de54e7a | 1569 | mV_PER_mA = 500.0f; // 5000mV/10mA |
Lightvalve | 57:f4819de54e7a | 1570 | mV_PER_pulse = 0.5f; // 5000mV/10000pulse |
Lightvalve | 57:f4819de54e7a | 1571 | mA_PER_pulse = 0.001f; // 10mA/10000pulse |
Lightvalve | 57:f4819de54e7a | 1572 | } else if (((OPERATING_MODE&0b110)>>1) == 1) { |
Lightvalve | 57:f4819de54e7a | 1573 | K_v = 0.5f; // KNR (LPM >> mA) , 100bar |
Lightvalve | 57:f4819de54e7a | 1574 | mV_PER_mA = 166.6666f; // 5000mV/30mA |
Lightvalve | 57:f4819de54e7a | 1575 | mV_PER_pulse = 0.5f; // 5000mV/10000pulse |
Lightvalve | 57:f4819de54e7a | 1576 | mA_PER_pulse = 0.003f; // 30mA/10000pulse |
Lightvalve | 57:f4819de54e7a | 1577 | } |
Lightvalve | 50:3c630b5eba9f | 1578 | |
Lightvalve | 50:3c630b5eba9f | 1579 | if(MODE_POS_FT_TRANS == 1) { |
Lightvalve | 48:889798ff9329 | 1580 | alpha_trans = (float)(1.0f - cos(3.141592f * (float)cnt_trans * DT_TMR3 /3.0f))/2.0f; |
Lightvalve | 45:35fa6884d0c6 | 1581 | cnt_trans++; |
Lightvalve | 46:2694daea349b | 1582 | torq.err_sum = 0; |
Lightvalve | 48:889798ff9329 | 1583 | if((float)cnt_trans * DT_TMR3 > 3.0f) |
Lightvalve | 45:35fa6884d0c6 | 1584 | MODE_POS_FT_TRANS = 2; |
Lightvalve | 50:3c630b5eba9f | 1585 | } else if(MODE_POS_FT_TRANS == 3) { |
Lightvalve | 48:889798ff9329 | 1586 | alpha_trans = (float)(1.0f + cos(3.141592f * (float)cnt_trans * DT_TMR3 /3.0f))/2.0f; |
Lightvalve | 45:35fa6884d0c6 | 1587 | cnt_trans++; |
Lightvalve | 46:2694daea349b | 1588 | torq.err_sum = 0; |
Lightvalve | 48:889798ff9329 | 1589 | if((float) cnt_trans * DT_TMR3 > 3.0f ) |
Lightvalve | 45:35fa6884d0c6 | 1590 | MODE_POS_FT_TRANS = 0; |
Lightvalve | 50:3c630b5eba9f | 1591 | } else if(MODE_POS_FT_TRANS == 2) { |
Lightvalve | 58:2eade98630e2 | 1592 | alpha_trans = 1.0f; |
Lightvalve | 45:35fa6884d0c6 | 1593 | cnt_trans = 0; |
Lightvalve | 50:3c630b5eba9f | 1594 | } else { |
Lightvalve | 58:2eade98630e2 | 1595 | alpha_trans = 0.0f; |
Lightvalve | 45:35fa6884d0c6 | 1596 | cnt_trans = 0; |
Lightvalve | 45:35fa6884d0c6 | 1597 | } |
Lightvalve | 45:35fa6884d0c6 | 1598 | |
Lightvalve | 50:3c630b5eba9f | 1599 | |
Lightvalve | 57:f4819de54e7a | 1600 | int UTILITY_MODE = 0; |
Lightvalve | 57:f4819de54e7a | 1601 | int CONTROL_MODE = 0; |
Lightvalve | 58:2eade98630e2 | 1602 | |
Lightvalve | 57:f4819de54e7a | 1603 | if (CONTROL_UTILITY_MODE >= 20 || CONTROL_UTILITY_MODE == 0) { |
Lightvalve | 57:f4819de54e7a | 1604 | UTILITY_MODE = CONTROL_UTILITY_MODE; |
Lightvalve | 57:f4819de54e7a | 1605 | CONTROL_MODE = MODE_NO_ACT; |
Lightvalve | 57:f4819de54e7a | 1606 | } else { |
Lightvalve | 57:f4819de54e7a | 1607 | CONTROL_MODE = CONTROL_UTILITY_MODE; |
Lightvalve | 57:f4819de54e7a | 1608 | UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 57:f4819de54e7a | 1609 | } |
Lightvalve | 56:6f50d9d3bfee | 1610 | |
Lightvalve | 56:6f50d9d3bfee | 1611 | |
Lightvalve | 56:6f50d9d3bfee | 1612 | |
Lightvalve | 57:f4819de54e7a | 1613 | // UTILITY MODE ------------------------------------------------------------ |
Lightvalve | 56:6f50d9d3bfee | 1614 | |
Lightvalve | 57:f4819de54e7a | 1615 | switch (UTILITY_MODE) { |
Lightvalve | 57:f4819de54e7a | 1616 | case MODE_NO_ACT: { |
Lightvalve | 13:747daba9cf59 | 1617 | break; |
Lightvalve | 13:747daba9cf59 | 1618 | } |
Lightvalve | 14:8e7590227d22 | 1619 | |
Lightvalve | 14:8e7590227d22 | 1620 | case MODE_TORQUE_SENSOR_NULLING: { |
Lightvalve | 13:747daba9cf59 | 1621 | // DAC Voltage reference set |
Lightvalve | 14:8e7590227d22 | 1622 | if (TMR3_COUNT_TORQUE_NULL < TMR_FREQ_5k * 2) { |
Lightvalve | 15:bd0d12728506 | 1623 | CUR_TORQUE_sum += torq.sen; |
Lightvalve | 19:23b7c1ad8683 | 1624 | |
Lightvalve | 14:8e7590227d22 | 1625 | if (TMR3_COUNT_TORQUE_NULL % 10 == 0) { |
Lightvalve | 30:8d561f16383b | 1626 | CUR_TORQUE_mean = CUR_TORQUE_sum / 10.0f; |
Lightvalve | 13:747daba9cf59 | 1627 | CUR_TORQUE_sum = 0; |
Lightvalve | 14:8e7590227d22 | 1628 | |
Lightvalve | 59:f308b1656d9c | 1629 | TORQUE_VREF += 0.0003f * (0.0f - CUR_TORQUE_mean); |
Lightvalve | 19:23b7c1ad8683 | 1630 | |
Lightvalve | 30:8d561f16383b | 1631 | if (TORQUE_VREF > 3.3f) TORQUE_VREF = 3.3f; |
Lightvalve | 59:f308b1656d9c | 1632 | if (TORQUE_VREF < 0.0f) TORQUE_VREF = 0.0f; |
Lightvalve | 50:3c630b5eba9f | 1633 | |
Lightvalve | 16:903b5a4433b4 | 1634 | //spi_eeprom_write(RID_TORQUE_SENSOR_VREF, (int16_t) (TORQUE_VREF * 1000.0)); |
Lightvalve | 30:8d561f16383b | 1635 | dac_1 = TORQUE_VREF / 3.3f; |
Lightvalve | 13:747daba9cf59 | 1636 | } |
Lightvalve | 13:747daba9cf59 | 1637 | } else { |
Lightvalve | 58:2eade98630e2 | 1638 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 14:8e7590227d22 | 1639 | TMR3_COUNT_TORQUE_NULL = 0; |
Lightvalve | 13:747daba9cf59 | 1640 | CUR_TORQUE_sum = 0; |
Lightvalve | 13:747daba9cf59 | 1641 | CUR_TORQUE_mean = 0; |
Lightvalve | 19:23b7c1ad8683 | 1642 | |
Lightvalve | 16:903b5a4433b4 | 1643 | ROM_RESET_DATA(); |
Lightvalve | 19:23b7c1ad8683 | 1644 | |
Lightvalve | 30:8d561f16383b | 1645 | dac_1 = TORQUE_VREF / 3.3f; |
Lightvalve | 14:8e7590227d22 | 1646 | |
Lightvalve | 13:747daba9cf59 | 1647 | } |
Lightvalve | 14:8e7590227d22 | 1648 | TMR3_COUNT_TORQUE_NULL++; |
Lightvalve | 13:747daba9cf59 | 1649 | break; |
Lightvalve | 19:23b7c1ad8683 | 1650 | } |
Lightvalve | 14:8e7590227d22 | 1651 | |
Lightvalve | 50:3c630b5eba9f | 1652 | // case MODE_VALVE_NULLING_AND_DEADZONE_SETTING: { |
Lightvalve | 50:3c630b5eba9f | 1653 | // if (TMR3_COUNT_DEADZONE == 0) { |
Lightvalve | 50:3c630b5eba9f | 1654 | // if (pos_plus_end == pos_minus_end) need_enc_init = true; |
Lightvalve | 50:3c630b5eba9f | 1655 | // else temp_time = 0; |
Lightvalve | 50:3c630b5eba9f | 1656 | // } |
Lightvalve | 50:3c630b5eba9f | 1657 | // if (need_enc_init) { |
Lightvalve | 50:3c630b5eba9f | 1658 | // if (TMR3_COUNT_DEADZONE < (int) (0.5f * (float) TMR_FREQ_5k)) { |
Lightvalve | 50:3c630b5eba9f | 1659 | // V_out = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1660 | // pos_plus_end = pos.sen; |
Lightvalve | 50:3c630b5eba9f | 1661 | // } else if (TMR3_COUNT_DEADZONE < TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1662 | // V_out = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1663 | // pos_minus_end = pos.sen; |
Lightvalve | 50:3c630b5eba9f | 1664 | // } else if (TMR3_COUNT_DEADZONE == TMR_FREQ_5k) need_enc_init = false; |
Lightvalve | 50:3c630b5eba9f | 1665 | // temp_time = TMR_FREQ_5k; |
Lightvalve | 50:3c630b5eba9f | 1666 | // } |
Lightvalve | 50:3c630b5eba9f | 1667 | // |
Lightvalve | 50:3c630b5eba9f | 1668 | // if (temp_time <= TMR3_COUNT_DEADZONE && TMR3_COUNT_DEADZONE < (temp_time + TMR_FREQ_5k)) { |
Lightvalve | 50:3c630b5eba9f | 1669 | // V_out = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen); |
Lightvalve | 50:3c630b5eba9f | 1670 | // VALVE_CENTER = VALVE_DEADZONE_PLUS = VALVE_DEADZONE_MINUS = 0; |
Lightvalve | 50:3c630b5eba9f | 1671 | // |
Lightvalve | 50:3c630b5eba9f | 1672 | // } else if (temp_time <= TMR3_COUNT_DEADZONE && TMR3_COUNT_DEADZONE < (temp_time + (int) (1.9f * (float) TMR_FREQ_5k))) { |
Lightvalve | 50:3c630b5eba9f | 1673 | // V_out = 0; |
Lightvalve | 50:3c630b5eba9f | 1674 | // CUR_VELOCITY_sum += CUR_VELOCITY; |
Lightvalve | 50:3c630b5eba9f | 1675 | // } else if (TMR3_COUNT_DEADZONE == (temp_time + 2 * TMR_FREQ_5k)) { |
Lightvalve | 50:3c630b5eba9f | 1676 | // if (CUR_VELOCITY_sum == 0) DZ_dir = 1; |
Lightvalve | 50:3c630b5eba9f | 1677 | // else if (CUR_VELOCITY_sum > 0) DZ_dir = 1; |
Lightvalve | 50:3c630b5eba9f | 1678 | // else if (CUR_VELOCITY_sum < 0) DZ_dir = -1; |
Lightvalve | 50:3c630b5eba9f | 1679 | // else DZ_temp_cnt2 = DZ_end; |
Lightvalve | 50:3c630b5eba9f | 1680 | // CUR_VELOCITY_sum = 0; |
Lightvalve | 50:3c630b5eba9f | 1681 | // } else if (TMR3_COUNT_DEADZONE > (temp_time + 2 * TMR_FREQ_5k)) { |
Lightvalve | 50:3c630b5eba9f | 1682 | // if (TMR3_COUNT_DEADZONE > (temp_time + 10 * TMR_FREQ_5k)) DZ_temp_cnt2 = DZ_end; |
Lightvalve | 50:3c630b5eba9f | 1683 | // |
Lightvalve | 50:3c630b5eba9f | 1684 | // // Position of Dead Zone |
Lightvalve | 50:3c630b5eba9f | 1685 | // // (CUR_VELOCITY < 0) (CUR_VELOCITY == 0) (CUR_VELOCITY > 0) |
Lightvalve | 50:3c630b5eba9f | 1686 | // // | / | / |/ |
Lightvalve | 50:3c630b5eba9f | 1687 | // // | ______/ ___|___/ ______/| |
Lightvalve | 50:3c630b5eba9f | 1688 | // // |/ / | / | |
Lightvalve | 50:3c630b5eba9f | 1689 | // // /| / | / | |
Lightvalve | 50:3c630b5eba9f | 1690 | // // 0V 0V 0V |
Lightvalve | 50:3c630b5eba9f | 1691 | // |
Lightvalve | 50:3c630b5eba9f | 1692 | // if (DZ_temp_cnt2 < DZ_end) { |
Lightvalve | 50:3c630b5eba9f | 1693 | // if (TMR3_COUNT_DEADZONE % 20 != 0) { |
Lightvalve | 50:3c630b5eba9f | 1694 | // CUR_VELOCITY_sum += CUR_VELOCITY; |
Lightvalve | 50:3c630b5eba9f | 1695 | // } else { |
Lightvalve | 50:3c630b5eba9f | 1696 | // V_out -= DZ_dir; |
Lightvalve | 50:3c630b5eba9f | 1697 | // if (CUR_VELOCITY_sum * DZ_dir < 0) DZ_temp_cnt++; |
Lightvalve | 50:3c630b5eba9f | 1698 | // CUR_VELOCITY_sum = 0; |
Lightvalve | 50:3c630b5eba9f | 1699 | // } |
Lightvalve | 50:3c630b5eba9f | 1700 | // if (DZ_temp_cnt == 5) { |
Lightvalve | 50:3c630b5eba9f | 1701 | // if (DZ_dir >= 0) VALVE_DEADZONE_MINUS = (int16_t) V_out; |
Lightvalve | 50:3c630b5eba9f | 1702 | // else VALVE_DEADZONE_PLUS = (int16_t) V_out; |
Lightvalve | 50:3c630b5eba9f | 1703 | // DZ_dir = -DZ_dir; |
Lightvalve | 50:3c630b5eba9f | 1704 | // DZ_temp_cnt = 0; |
Lightvalve | 50:3c630b5eba9f | 1705 | // DZ_temp_cnt2++; |
Lightvalve | 50:3c630b5eba9f | 1706 | // } |
Lightvalve | 50:3c630b5eba9f | 1707 | // } else { |
Lightvalve | 50:3c630b5eba9f | 1708 | // TMR3_COUNT_DEADZONE = -1; |
Lightvalve | 50:3c630b5eba9f | 1709 | // VALVE_CENTER = VALVE_DEADZONE_PLUS / 2 + VALVE_DEADZONE_MINUS / 2; |
Lightvalve | 50:3c630b5eba9f | 1710 | // if (VALVE_DEADZONE_PLUS < VALVE_DEADZONE_MINUS) { |
Lightvalve | 50:3c630b5eba9f | 1711 | // VALVE_DEADZONE_PLUS = VALVE_CENTER; |
Lightvalve | 50:3c630b5eba9f | 1712 | // VALVE_DEADZONE_MINUS = VALVE_CENTER; |
Lightvalve | 50:3c630b5eba9f | 1713 | // } |
Lightvalve | 50:3c630b5eba9f | 1714 | // V_out = 0; |
Lightvalve | 50:3c630b5eba9f | 1715 | // |
Lightvalve | 50:3c630b5eba9f | 1716 | // ROM_RESET_DATA(); |
Lightvalve | 50:3c630b5eba9f | 1717 | // |
Lightvalve | 50:3c630b5eba9f | 1718 | // //spi_eeprom_write(RID_VALVE_DEADZONE_PLUS, VALVE_DEADZONE_PLUS); |
Lightvalve | 50:3c630b5eba9f | 1719 | // //spi_eeprom_write(RID_VALVE_DEADZONE_MINUS, VALVE_DEADZONE_MINUS); |
Lightvalve | 50:3c630b5eba9f | 1720 | // |
Lightvalve | 50:3c630b5eba9f | 1721 | // CONTROL_MODE = MODE_NO_ACT; |
Lightvalve | 50:3c630b5eba9f | 1722 | // DZ_temp_cnt2 = 0; |
Lightvalve | 50:3c630b5eba9f | 1723 | // } |
Lightvalve | 50:3c630b5eba9f | 1724 | // } |
Lightvalve | 50:3c630b5eba9f | 1725 | // TMR3_COUNT_DEADZONE++; |
Lightvalve | 50:3c630b5eba9f | 1726 | // break; |
Lightvalve | 50:3c630b5eba9f | 1727 | // } |
Lightvalve | 14:8e7590227d22 | 1728 | |
Lightvalve | 14:8e7590227d22 | 1729 | case MODE_FIND_HOME: { |
Lightvalve | 29:69f3f5445d6d | 1730 | if (FINDHOME_STAGE == FINDHOME_INIT) { |
Lightvalve | 14:8e7590227d22 | 1731 | cnt_findhome = 0; |
Lightvalve | 14:8e7590227d22 | 1732 | cnt_vel_findhome = 0; |
Lightvalve | 14:8e7590227d22 | 1733 | //REFERENCE_MODE = MODE_REF_NO_ACT; // Stop taking reference data from PODO |
Lightvalve | 59:f308b1656d9c | 1734 | pos.ref = pos.sen; |
Lightvalve | 59:f308b1656d9c | 1735 | vel.ref = 0.0f; |
Lightvalve | 29:69f3f5445d6d | 1736 | FINDHOME_STAGE = FINDHOME_GOTOLIMIT; |
Lightvalve | 29:69f3f5445d6d | 1737 | } else if (FINDHOME_STAGE == FINDHOME_GOTOLIMIT) { |
Lightvalve | 29:69f3f5445d6d | 1738 | int cnt_check_enc = (TMR_FREQ_5k/500); |
Lightvalve | 29:69f3f5445d6d | 1739 | if(cnt_findhome%cnt_check_enc == 0) { |
Lightvalve | 29:69f3f5445d6d | 1740 | FINDHOME_POSITION = pos.sen; |
Lightvalve | 29:69f3f5445d6d | 1741 | FINDHOME_VELOCITY = FINDHOME_POSITION - FINDHOME_POSITION_OLD; |
Lightvalve | 29:69f3f5445d6d | 1742 | FINDHOME_POSITION_OLD = FINDHOME_POSITION; |
Lightvalve | 29:69f3f5445d6d | 1743 | } |
Lightvalve | 29:69f3f5445d6d | 1744 | cnt_findhome++; |
Lightvalve | 14:8e7590227d22 | 1745 | |
Lightvalve | 29:69f3f5445d6d | 1746 | if (abs(FINDHOME_VELOCITY) <= 1) { |
Lightvalve | 29:69f3f5445d6d | 1747 | cnt_vel_findhome = cnt_vel_findhome + 1; |
Lightvalve | 29:69f3f5445d6d | 1748 | } else { |
Lightvalve | 29:69f3f5445d6d | 1749 | cnt_vel_findhome = 0; |
Lightvalve | 29:69f3f5445d6d | 1750 | } |
Lightvalve | 19:23b7c1ad8683 | 1751 | |
Lightvalve | 57:f4819de54e7a | 1752 | if ((cnt_vel_findhome < 3*TMR_FREQ_5k) && cnt_findhome < 10*TMR_FREQ_5k) { // wait for 3sec |
Lightvalve | 29:69f3f5445d6d | 1753 | //REFERENCE_MODE = MODE_REF_NO_ACT; |
Lightvalve | 59:f308b1656d9c | 1754 | if (HOMEPOS_OFFSET > 0) pos.ref = pos.ref + 2.0f; |
Lightvalve | 59:f308b1656d9c | 1755 | else pos.ref = pos.ref - 2.0f; |
Lightvalve | 61:bc8c8270f0ab | 1756 | |
Lightvalve | 59:f308b1656d9c | 1757 | // pos.err = pos.ref_home_pos - pos.sen; |
Lightvalve | 59:f308b1656d9c | 1758 | // float VALVE_POS_RAW_POS_FB = 0.0f; |
Lightvalve | 59:f308b1656d9c | 1759 | // VALVE_POS_RAW_POS_FB = (float) P_GAIN_JOINT_POSITION * pos.err/(float) ENC_PULSE_PER_POSITION * 0.01f; |
Lightvalve | 59:f308b1656d9c | 1760 | // valve_pos.ref = VALVE_POS_RAW_POS_FB + (float) VALVE_CENTER; |
Lightvalve | 59:f308b1656d9c | 1761 | // VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 61:bc8c8270f0ab | 1762 | |
Lightvalve | 59:f308b1656d9c | 1763 | CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 59:f308b1656d9c | 1764 | alpha_trans = 0.0f; |
Lightvalve | 61:bc8c8270f0ab | 1765 | |
Lightvalve | 34:bb2ca2fc2a8e | 1766 | |
Lightvalve | 29:69f3f5445d6d | 1767 | } else { |
Lightvalve | 29:69f3f5445d6d | 1768 | ENC_SET(HOMEPOS_OFFSET); |
Lightvalve | 29:69f3f5445d6d | 1769 | INIT_REF_POS = HOMEPOS_OFFSET; |
Lightvalve | 29:69f3f5445d6d | 1770 | REF_POSITION = 0; |
Lightvalve | 29:69f3f5445d6d | 1771 | REF_VELOCITY = 0; |
Lightvalve | 29:69f3f5445d6d | 1772 | FINDHOME_POSITION = 0; |
Lightvalve | 29:69f3f5445d6d | 1773 | FINDHOME_POSITION_OLD = 0; |
Lightvalve | 29:69f3f5445d6d | 1774 | FINDHOME_VELOCITY = 0; |
Lightvalve | 29:69f3f5445d6d | 1775 | cnt_findhome = 0; |
Lightvalve | 29:69f3f5445d6d | 1776 | cnt_vel_findhome = 0; |
Lightvalve | 29:69f3f5445d6d | 1777 | FINDHOME_STAGE = FINDHOME_ZEROPOSE; |
Lightvalve | 29:69f3f5445d6d | 1778 | } |
Lightvalve | 29:69f3f5445d6d | 1779 | } else if (FINDHOME_STAGE == FINDHOME_ZEROPOSE) { |
Lightvalve | 29:69f3f5445d6d | 1780 | int T_move = 2*TMR_FREQ_5k; |
Lightvalve | 59:f308b1656d9c | 1781 | pos.ref = (0.0f - (float)INIT_REF_POS)*0.5f*(1.0f - cos(3.14159f * (float)cnt_findhome / (float)T_move)) + (float)INIT_REF_POS; |
Lightvalve | 59:f308b1656d9c | 1782 | vel.ref = 0.0f; |
Lightvalve | 19:23b7c1ad8683 | 1783 | |
Lightvalve | 29:69f3f5445d6d | 1784 | // input for position control |
Lightvalve | 61:bc8c8270f0ab | 1785 | |
Lightvalve | 59:f308b1656d9c | 1786 | CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 59:f308b1656d9c | 1787 | alpha_trans = 0.0f; |
Lightvalve | 59:f308b1656d9c | 1788 | // pos.err = pos.ref - (float)pos.sen; |
Lightvalve | 59:f308b1656d9c | 1789 | // float VALVE_POS_RAW_POS_FB = 0.0f; |
Lightvalve | 59:f308b1656d9c | 1790 | // VALVE_POS_RAW_POS_FB = (float) P_GAIN_JOINT_POSITION * 0.01f * pos.err/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 59:f308b1656d9c | 1791 | // valve_pos.ref = VALVE_POS_RAW_POS_FB + (float) VALVE_CENTER; |
Lightvalve | 59:f308b1656d9c | 1792 | // VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 29:69f3f5445d6d | 1793 | |
Lightvalve | 29:69f3f5445d6d | 1794 | cnt_findhome++; |
Lightvalve | 29:69f3f5445d6d | 1795 | if (cnt_findhome >= T_move) { |
Lightvalve | 29:69f3f5445d6d | 1796 | //REFERENCE_MODE = MODE_REF_DIRECT; |
Lightvalve | 29:69f3f5445d6d | 1797 | cnt_findhome = 0; |
Lightvalve | 30:8d561f16383b | 1798 | pos.ref = 0.0f; |
Lightvalve | 30:8d561f16383b | 1799 | vel.ref = 0.0f; |
Lightvalve | 30:8d561f16383b | 1800 | pos.ref_home_pos = 0.0f; |
Lightvalve | 30:8d561f16383b | 1801 | vel.ref_home_pos = 0.0f; |
Lightvalve | 29:69f3f5445d6d | 1802 | FINDHOME_STAGE = FINDHOME_INIT; |
Lightvalve | 57:f4819de54e7a | 1803 | CONTROL_UTILITY_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 29:69f3f5445d6d | 1804 | } |
Lightvalve | 13:747daba9cf59 | 1805 | } |
Lightvalve | 19:23b7c1ad8683 | 1806 | |
Lightvalve | 13:747daba9cf59 | 1807 | break; |
Lightvalve | 13:747daba9cf59 | 1808 | } |
Lightvalve | 14:8e7590227d22 | 1809 | |
Lightvalve | 50:3c630b5eba9f | 1810 | // case MODE_VALVE_GAIN_SETTING: { |
Lightvalve | 50:3c630b5eba9f | 1811 | // if (TMR3_COUNT_FLOWRATE == 0) { |
Lightvalve | 50:3c630b5eba9f | 1812 | // if (pos_plus_end == pos_minus_end) need_enc_init = true; |
Lightvalve | 50:3c630b5eba9f | 1813 | // else { |
Lightvalve | 50:3c630b5eba9f | 1814 | // V_out = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1815 | // temp_time = (int) (0.5f * (float) TMR_FREQ_5k); |
Lightvalve | 50:3c630b5eba9f | 1816 | // } |
Lightvalve | 50:3c630b5eba9f | 1817 | // } |
Lightvalve | 50:3c630b5eba9f | 1818 | // if (need_enc_init) { |
Lightvalve | 50:3c630b5eba9f | 1819 | // if (TMR3_COUNT_FLOWRATE < (int) (0.5f * (float) TMR_FREQ_5k)) { |
Lightvalve | 50:3c630b5eba9f | 1820 | // V_out = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1821 | // pos_plus_end = pos.sen; |
Lightvalve | 50:3c630b5eba9f | 1822 | // } else if (TMR3_COUNT_FLOWRATE < TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1823 | // V_out = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1824 | // pos_minus_end = pos.sen; |
Lightvalve | 50:3c630b5eba9f | 1825 | // } else if (TMR3_COUNT_FLOWRATE == TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1826 | // need_enc_init = false; |
Lightvalve | 50:3c630b5eba9f | 1827 | // check_vel_pos_init = (int) (0.9f * (float) (pos_plus_end - pos_minus_end)); |
Lightvalve | 50:3c630b5eba9f | 1828 | // check_vel_pos_fin = (int) (0.95f * (float) (pos_plus_end - pos_minus_end)); |
Lightvalve | 50:3c630b5eba9f | 1829 | // check_vel_pos_interv = check_vel_pos_fin - check_vel_pos_init; |
Lightvalve | 50:3c630b5eba9f | 1830 | // } |
Lightvalve | 50:3c630b5eba9f | 1831 | // temp_time = TMR_FREQ_5k; |
Lightvalve | 50:3c630b5eba9f | 1832 | // } |
Lightvalve | 50:3c630b5eba9f | 1833 | // TMR3_COUNT_FLOWRATE++; |
Lightvalve | 50:3c630b5eba9f | 1834 | // if (TMR3_COUNT_FLOWRATE > temp_time) { |
Lightvalve | 50:3c630b5eba9f | 1835 | // if (flag_flowrate % 2 == 0) { // (+) |
Lightvalve | 50:3c630b5eba9f | 1836 | // VALVE_VOLTAGE = 1000.0f * (float) (flag_flowrate / 2 + 1); |
Lightvalve | 50:3c630b5eba9f | 1837 | // V_out = VALVE_VOLTAGE; |
Lightvalve | 50:3c630b5eba9f | 1838 | // if (pos.sen > (pos_minus_end + check_vel_pos_init) && pos.sen < (pos_minus_end + check_vel_pos_fin)) { |
Lightvalve | 50:3c630b5eba9f | 1839 | // fl_temp_cnt++; |
Lightvalve | 50:3c630b5eba9f | 1840 | // } else if (pos.sen >= (pos_minus_end + check_vel_pos_fin) && CUR_VELOCITY == 0) { |
Lightvalve | 50:3c630b5eba9f | 1841 | // VALVE_GAIN_LPM_PER_V[flag_flowrate] = 0.95873f * 0.5757f * (float) TMR_FREQ_5k / 10000.0 * (float) check_vel_pos_interv / (float) fl_temp_cnt / VALVE_VOLTAGE; // 0.9587=6*pi/65536*10000 0.5757=0.02525*0.02*0.0095*2*60*1000 |
Lightvalve | 50:3c630b5eba9f | 1842 | // // VALVE_GAIN_LPM_PER_V[flag_flowrate] = (float) TMR_FREQ_10k * (float) check_vel_pos_interv / (float) fl_temp_cnt / VALVE_VOLTAGE; // PULSE/sec |
Lightvalve | 50:3c630b5eba9f | 1843 | // fl_temp_cnt2++; |
Lightvalve | 50:3c630b5eba9f | 1844 | // } |
Lightvalve | 50:3c630b5eba9f | 1845 | // } else if (flag_flowrate % 2 == 1) { // (-) |
Lightvalve | 50:3c630b5eba9f | 1846 | // VALVE_VOLTAGE = -1. * (float) (flag_flowrate / 2 + 1); |
Lightvalve | 50:3c630b5eba9f | 1847 | // V_out = VALVE_VOLTAGE; |
Lightvalve | 50:3c630b5eba9f | 1848 | // if (pos.sen < (pos_plus_end - check_vel_pos_init) && pos.sen > (pos_plus_end - check_vel_pos_fin)) { |
Lightvalve | 50:3c630b5eba9f | 1849 | // fl_temp_cnt++; |
Lightvalve | 50:3c630b5eba9f | 1850 | // } else if (pos.sen <= (pos_plus_end - check_vel_pos_fin) && CUR_VELOCITY == 0) { |
Lightvalve | 50:3c630b5eba9f | 1851 | // VALVE_GAIN_LPM_PER_V[flag_flowrate] = 0.95873f * 0.5757f * (float) TMR_FREQ_5k / 10000.0f * (float) check_vel_pos_interv / (float) fl_temp_cnt / (-VALVE_VOLTAGE); |
Lightvalve | 50:3c630b5eba9f | 1852 | // // VALVE_GAIN_LPM_PER_V[flag_flowrate] = (float) TMR_FREQ_10k * (float) check_vel_pos_interv / (float) fl_temp_cnt / (-VALVE_VOLTAGE); // PULSE/sec |
Lightvalve | 50:3c630b5eba9f | 1853 | // fl_temp_cnt2++; |
Lightvalve | 50:3c630b5eba9f | 1854 | // } |
Lightvalve | 50:3c630b5eba9f | 1855 | // } |
Lightvalve | 50:3c630b5eba9f | 1856 | // if (fl_temp_cnt2 == 100) { |
Lightvalve | 50:3c630b5eba9f | 1857 | // |
Lightvalve | 50:3c630b5eba9f | 1858 | // ROM_RESET_DATA(); |
Lightvalve | 50:3c630b5eba9f | 1859 | // |
Lightvalve | 50:3c630b5eba9f | 1860 | // //spi_eeprom_write(RID_VALVE_GAIN_PLUS_1 + flag_flowrate, (int16_t) (VALVE_GAIN_LPM_PER_V[flag_flowrate] * 100.0f)); |
Lightvalve | 50:3c630b5eba9f | 1861 | // cur_vel_sum = 0; |
Lightvalve | 50:3c630b5eba9f | 1862 | // fl_temp_cnt = 0; |
Lightvalve | 50:3c630b5eba9f | 1863 | // fl_temp_cnt2 = 0; |
Lightvalve | 50:3c630b5eba9f | 1864 | // flag_flowrate++; |
Lightvalve | 50:3c630b5eba9f | 1865 | // } |
Lightvalve | 50:3c630b5eba9f | 1866 | // if (flag_flowrate == 10) { |
Lightvalve | 50:3c630b5eba9f | 1867 | // V_out = 0; |
Lightvalve | 50:3c630b5eba9f | 1868 | // flag_flowrate = 0; |
Lightvalve | 50:3c630b5eba9f | 1869 | // TMR3_COUNT_FLOWRATE = 0; |
Lightvalve | 50:3c630b5eba9f | 1870 | // valve_gain_repeat_cnt++; |
Lightvalve | 50:3c630b5eba9f | 1871 | // if (valve_gain_repeat_cnt >= 1) { |
Lightvalve | 50:3c630b5eba9f | 1872 | // CONTROL_MODE = MODE_NO_ACT; |
Lightvalve | 50:3c630b5eba9f | 1873 | // valve_gain_repeat_cnt = 0; |
Lightvalve | 50:3c630b5eba9f | 1874 | // } |
Lightvalve | 50:3c630b5eba9f | 1875 | // |
Lightvalve | 50:3c630b5eba9f | 1876 | // } |
Lightvalve | 50:3c630b5eba9f | 1877 | // break; |
Lightvalve | 50:3c630b5eba9f | 1878 | // } |
Lightvalve | 50:3c630b5eba9f | 1879 | // |
Lightvalve | 50:3c630b5eba9f | 1880 | // } |
Lightvalve | 14:8e7590227d22 | 1881 | case MODE_PRESSURE_SENSOR_NULLING: { |
Lightvalve | 13:747daba9cf59 | 1882 | // DAC Voltage reference set |
Lightvalve | 14:8e7590227d22 | 1883 | if (TMR3_COUNT_PRES_NULL < TMR_FREQ_5k * 2) { |
Lightvalve | 14:8e7590227d22 | 1884 | CUR_PRES_A_sum += pres_A.sen; |
Lightvalve | 14:8e7590227d22 | 1885 | CUR_PRES_B_sum += pres_B.sen; |
Lightvalve | 14:8e7590227d22 | 1886 | |
Lightvalve | 14:8e7590227d22 | 1887 | if (TMR3_COUNT_PRES_NULL % 10 == 0) { |
Lightvalve | 30:8d561f16383b | 1888 | CUR_PRES_A_mean = CUR_PRES_A_sum / 10.0f; |
Lightvalve | 30:8d561f16383b | 1889 | CUR_PRES_B_mean = CUR_PRES_B_sum / 10.0f; |
Lightvalve | 13:747daba9cf59 | 1890 | CUR_PRES_A_sum = 0; |
Lightvalve | 13:747daba9cf59 | 1891 | CUR_PRES_B_sum = 0; |
Lightvalve | 14:8e7590227d22 | 1892 | |
Lightvalve | 38:118df027d851 | 1893 | float VREF_NullingGain = 0.0003f; |
Lightvalve | 58:2eade98630e2 | 1894 | PRES_A_VREF = PRES_A_VREF + VREF_NullingGain * CUR_PRES_A_mean; |
Lightvalve | 58:2eade98630e2 | 1895 | PRES_B_VREF = PRES_B_VREF + VREF_NullingGain * CUR_PRES_B_mean; |
Lightvalve | 14:8e7590227d22 | 1896 | |
Lightvalve | 30:8d561f16383b | 1897 | if (PRES_A_VREF > 3.3f) PRES_A_VREF = 3.3f; |
Lightvalve | 30:8d561f16383b | 1898 | if (PRES_A_VREF < 0.0f) PRES_A_VREF = 0.0f; |
Lightvalve | 30:8d561f16383b | 1899 | if (PRES_B_VREF > 3.3f) PRES_B_VREF = 3.3f; |
Lightvalve | 30:8d561f16383b | 1900 | if (PRES_B_VREF < 0.0f) PRES_B_VREF = 0.0f; |
Lightvalve | 19:23b7c1ad8683 | 1901 | |
Lightvalve | 30:8d561f16383b | 1902 | dac_1 = PRES_A_VREF / 3.3f; |
Lightvalve | 30:8d561f16383b | 1903 | dac_2 = PRES_B_VREF / 3.3f; |
Lightvalve | 13:747daba9cf59 | 1904 | } |
Lightvalve | 13:747daba9cf59 | 1905 | } else { |
Lightvalve | 57:f4819de54e7a | 1906 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 14:8e7590227d22 | 1907 | TMR3_COUNT_PRES_NULL = 0; |
Lightvalve | 13:747daba9cf59 | 1908 | CUR_PRES_A_sum = 0; |
Lightvalve | 13:747daba9cf59 | 1909 | CUR_PRES_B_sum = 0; |
Lightvalve | 13:747daba9cf59 | 1910 | CUR_PRES_A_mean = 0; |
Lightvalve | 13:747daba9cf59 | 1911 | CUR_PRES_B_mean = 0; |
Lightvalve | 14:8e7590227d22 | 1912 | |
Lightvalve | 16:903b5a4433b4 | 1913 | ROM_RESET_DATA(); |
Lightvalve | 19:23b7c1ad8683 | 1914 | |
Lightvalve | 30:8d561f16383b | 1915 | dac_1 = PRES_A_VREF / 3.3f; |
Lightvalve | 30:8d561f16383b | 1916 | dac_2 = PRES_B_VREF / 3.3f; |
Lightvalve | 17:1865016ca2e7 | 1917 | //pc.printf("nulling end"); |
Lightvalve | 13:747daba9cf59 | 1918 | } |
Lightvalve | 14:8e7590227d22 | 1919 | TMR3_COUNT_PRES_NULL++; |
Lightvalve | 13:747daba9cf59 | 1920 | break; |
Lightvalve | 13:747daba9cf59 | 1921 | } |
Lightvalve | 14:8e7590227d22 | 1922 | |
Lightvalve | 50:3c630b5eba9f | 1923 | // case MODE_PRESSURE_SENSOR_CALIB: { |
Lightvalve | 50:3c630b5eba9f | 1924 | // if (TMR3_COUNT_PRES_CALIB < 2 * TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1925 | // V_out = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1926 | // if (TMR3_COUNT_PRES_CALIB >= TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1927 | // CUR_PRES_A_sum += CUR_PRES_A; |
Lightvalve | 50:3c630b5eba9f | 1928 | // } |
Lightvalve | 50:3c630b5eba9f | 1929 | // } else if (TMR3_COUNT_PRES_CALIB < 4 * TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1930 | // V_out = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1931 | // if (TMR3_COUNT_PRES_CALIB >= 3 * TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1932 | // CUR_PRES_B_sum += CUR_PRES_B; |
Lightvalve | 50:3c630b5eba9f | 1933 | // } |
Lightvalve | 50:3c630b5eba9f | 1934 | // } else { |
Lightvalve | 50:3c630b5eba9f | 1935 | // CONTROL_MODE = MODE_NO_ACT; |
Lightvalve | 50:3c630b5eba9f | 1936 | // TMR3_COUNT_PRES_CALIB = 0; |
Lightvalve | 50:3c630b5eba9f | 1937 | // V_out = 0; |
Lightvalve | 50:3c630b5eba9f | 1938 | // PRES_SENSOR_A_PULSE_PER_BAR = CUR_PRES_A_sum / ((float) TMR_FREQ_5k - 1.0f) - PRES_A_NULL; |
Lightvalve | 50:3c630b5eba9f | 1939 | // PRES_SENSOR_A_PULSE_PER_BAR = PRES_SENSOR_A_PULSE_PER_BAR / ((float) PRES_SUPPLY - 1.0f); |
Lightvalve | 50:3c630b5eba9f | 1940 | // PRES_SENSOR_B_PULSE_PER_BAR = CUR_PRES_B_sum / ((float) TMR_FREQ_5k - 1.0f) - PRES_B_NULL; |
Lightvalve | 50:3c630b5eba9f | 1941 | // PRES_SENSOR_B_PULSE_PER_BAR = PRES_SENSOR_B_PULSE_PER_BAR / ((float) PRES_SUPPLY - 1.0f); |
Lightvalve | 50:3c630b5eba9f | 1942 | // CUR_PRES_A_sum = 0; |
Lightvalve | 50:3c630b5eba9f | 1943 | // CUR_PRES_B_sum = 0; |
Lightvalve | 50:3c630b5eba9f | 1944 | // CUR_PRES_A_mean = 0; |
Lightvalve | 50:3c630b5eba9f | 1945 | // CUR_PRES_B_mean = 0; |
Lightvalve | 50:3c630b5eba9f | 1946 | // |
Lightvalve | 50:3c630b5eba9f | 1947 | // ROM_RESET_DATA(); |
Lightvalve | 50:3c630b5eba9f | 1948 | // |
Lightvalve | 50:3c630b5eba9f | 1949 | // //spi_eeprom_write(RID_PRES_SENSOR_A_PULSE_PER_BAR, (int16_t) (PRES_SENSOR_A_PULSE_PER_BAR * 100.0f)); |
Lightvalve | 50:3c630b5eba9f | 1950 | // //spi_eeprom_write(RID_PRES_SENSOR_B_PULSE_PER_BAR, (int16_t) (PRES_SENSOR_B_PULSE_PER_BAR * 100.0f)); |
Lightvalve | 50:3c630b5eba9f | 1951 | // } |
Lightvalve | 50:3c630b5eba9f | 1952 | // TMR3_COUNT_PRES_CALIB++; |
Lightvalve | 50:3c630b5eba9f | 1953 | // break; |
Lightvalve | 50:3c630b5eba9f | 1954 | // } |
Lightvalve | 19:23b7c1ad8683 | 1955 | |
Lightvalve | 50:3c630b5eba9f | 1956 | // case MODE_ROTARY_FRICTION_TUNING: { |
Lightvalve | 50:3c630b5eba9f | 1957 | // if (TMR3_COUNT_ROTARY_FRIC_TUNE % (5 * TMR_FREQ_5k) == 0) freq_fric_tune = 4.0f + 3.0f * sin(2 * 3.14159f * 0.5f * TMR3_COUNT_ROTARY_FRIC_TUNE * 0.0001f * 0.05f); |
Lightvalve | 50:3c630b5eba9f | 1958 | // V_out = PWM_out * sin(2 * 3.14159f * freq_fric_tune * TMR3_COUNT_ROTARY_FRIC_TUNE * 0.0001f); |
Lightvalve | 50:3c630b5eba9f | 1959 | // if (V_out > 0) V_out = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1960 | // else V_out = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 50:3c630b5eba9f | 1961 | // TMR3_COUNT_ROTARY_FRIC_TUNE++; |
Lightvalve | 50:3c630b5eba9f | 1962 | // if (TMR3_COUNT_ROTARY_FRIC_TUNE > TUNING_TIME * TMR_FREQ_5k) { |
Lightvalve | 50:3c630b5eba9f | 1963 | // TMR3_COUNT_ROTARY_FRIC_TUNE = 0; |
Lightvalve | 50:3c630b5eba9f | 1964 | // V_out = 0.0f; |
Lightvalve | 50:3c630b5eba9f | 1965 | // CONTROL_MODE = MODE_NO_ACT; |
Lightvalve | 50:3c630b5eba9f | 1966 | // } |
Lightvalve | 50:3c630b5eba9f | 1967 | // break; |
Lightvalve | 50:3c630b5eba9f | 1968 | // } |
Lightvalve | 14:8e7590227d22 | 1969 | |
Lightvalve | 14:8e7590227d22 | 1970 | case MODE_DDV_POS_VS_PWM_ID: { |
Lightvalve | 59:f308b1656d9c | 1971 | CONTROL_MODE = MODE_VALVE_OPEN_LOOP; |
Lightvalve | 13:747daba9cf59 | 1972 | VALVE_ID_timer = VALVE_ID_timer + 1; |
Lightvalve | 14:8e7590227d22 | 1973 | |
Lightvalve | 14:8e7590227d22 | 1974 | if(VALVE_ID_timer < TMR_FREQ_5k*1) { |
Lightvalve | 60:64181f1d3e60 | 1975 | Vout.ref = 3000.0f * sin(2.0f*3.14f*VALVE_ID_timer/TMR_FREQ_5k * 100.0f); |
Lightvalve | 14:8e7590227d22 | 1976 | } else if(VALVE_ID_timer < TMR_FREQ_5k*2) { |
Lightvalve | 59:f308b1656d9c | 1977 | Vout.ref = 1000.0f*(ID_index_array[ID_index]); |
Lightvalve | 14:8e7590227d22 | 1978 | } else if(VALVE_ID_timer == TMR_FREQ_5k*2) { |
Lightvalve | 13:747daba9cf59 | 1979 | VALVE_POS_TMP = 0; |
Lightvalve | 13:747daba9cf59 | 1980 | data_num = 0; |
Lightvalve | 14:8e7590227d22 | 1981 | } else if(VALVE_ID_timer < TMR_FREQ_5k*3) { |
Lightvalve | 13:747daba9cf59 | 1982 | data_num = data_num + 1; |
Lightvalve | 13:747daba9cf59 | 1983 | VALVE_POS_TMP = VALVE_POS_TMP + value; |
Lightvalve | 14:8e7590227d22 | 1984 | } else if(VALVE_ID_timer == TMR_FREQ_5k*3) { |
Lightvalve | 59:f308b1656d9c | 1985 | Vout.ref = 0.0f; |
Lightvalve | 59:f308b1656d9c | 1986 | } else { |
Lightvalve | 13:747daba9cf59 | 1987 | VALVE_POS_AVG[ID_index] = VALVE_POS_TMP / data_num; |
Lightvalve | 13:747daba9cf59 | 1988 | VALVE_ID_timer = 0; |
Lightvalve | 13:747daba9cf59 | 1989 | ID_index= ID_index +1; |
Lightvalve | 13:747daba9cf59 | 1990 | } |
Lightvalve | 14:8e7590227d22 | 1991 | |
Lightvalve | 17:1865016ca2e7 | 1992 | if(ID_index>=25) { |
Lightvalve | 13:747daba9cf59 | 1993 | int i; |
Lightvalve | 13:747daba9cf59 | 1994 | VALVE_POS_AVG_OLD = VALVE_POS_AVG[0]; |
Lightvalve | 17:1865016ca2e7 | 1995 | for(i=0; i<25; i++) { |
Lightvalve | 13:747daba9cf59 | 1996 | VALVE_POS_VS_PWM[i] = (int16_t) (VALVE_POS_AVG[i]); |
Lightvalve | 14:8e7590227d22 | 1997 | if(VALVE_POS_AVG[i] > VALVE_POS_AVG_OLD) { |
Lightvalve | 13:747daba9cf59 | 1998 | VALVE_MAX_POS = VALVE_POS_AVG[i]; |
Lightvalve | 13:747daba9cf59 | 1999 | VALVE_POS_AVG_OLD = VALVE_MAX_POS; |
Lightvalve | 14:8e7590227d22 | 2000 | } else if(VALVE_POS_AVG[i] < VALVE_POS_AVG_OLD) { |
Lightvalve | 13:747daba9cf59 | 2001 | VALVE_MIN_POS = VALVE_POS_AVG[i]; |
Lightvalve | 13:747daba9cf59 | 2002 | VALVE_POS_AVG_OLD = VALVE_MIN_POS; |
Lightvalve | 13:747daba9cf59 | 2003 | } |
Lightvalve | 13:747daba9cf59 | 2004 | } |
Lightvalve | 59:f308b1656d9c | 2005 | ROM_RESET_DATA(); |
Lightvalve | 13:747daba9cf59 | 2006 | ID_index = 0; |
Lightvalve | 57:f4819de54e7a | 2007 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 13:747daba9cf59 | 2008 | } |
Lightvalve | 14:8e7590227d22 | 2009 | |
Lightvalve | 14:8e7590227d22 | 2010 | |
Lightvalve | 13:747daba9cf59 | 2011 | break; |
Lightvalve | 13:747daba9cf59 | 2012 | } |
Lightvalve | 14:8e7590227d22 | 2013 | |
Lightvalve | 14:8e7590227d22 | 2014 | case MODE_DDV_DEADZONE_AND_CENTER: { |
Lightvalve | 59:f308b1656d9c | 2015 | CONTROL_MODE = MODE_VALVE_OPEN_LOOP; |
Lightvalve | 13:747daba9cf59 | 2016 | VALVE_DZ_timer = VALVE_DZ_timer + 1; |
Lightvalve | 14:8e7590227d22 | 2017 | if(first_check == 0) { |
Lightvalve | 30:8d561f16383b | 2018 | if(VALVE_DZ_timer < (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2019 | Vout.ref = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 30:8d561f16383b | 2020 | } else if(VALVE_DZ_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2021 | Vout.ref = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 14:8e7590227d22 | 2022 | pos_plus_end = pos.sen; |
Lightvalve | 30:8d561f16383b | 2023 | } else if(VALVE_DZ_timer < (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2024 | Vout.ref = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 30:8d561f16383b | 2025 | } else if(VALVE_DZ_timer == (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2026 | Vout.ref = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 14:8e7590227d22 | 2027 | pos_minus_end = pos.sen; |
Lightvalve | 30:8d561f16383b | 2028 | } else if(VALVE_DZ_timer < (int) (3.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2029 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 30:8d561f16383b | 2030 | } else if(VALVE_DZ_timer < (int) (4.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2031 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 13:747daba9cf59 | 2032 | data_num = data_num + 1; |
Lightvalve | 13:747daba9cf59 | 2033 | VALVE_POS_TMP = VALVE_POS_TMP + value; |
Lightvalve | 30:8d561f16383b | 2034 | } else if(VALVE_DZ_timer == (int) (4.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2035 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 13:747daba9cf59 | 2036 | DDV_POS_AVG = VALVE_POS_TMP / data_num; |
Lightvalve | 14:8e7590227d22 | 2037 | START_POS = pos.sen; |
Lightvalve | 13:747daba9cf59 | 2038 | VALVE_POS_TMP = 0; |
Lightvalve | 13:747daba9cf59 | 2039 | data_num = 0; |
Lightvalve | 14:8e7590227d22 | 2040 | |
Lightvalve | 30:8d561f16383b | 2041 | } else if(VALVE_DZ_timer < (int) (5.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2042 | valve_pos.ref = DDV_POS_AVG; |
Lightvalve | 14:8e7590227d22 | 2043 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 14:8e7590227d22 | 2044 | |
Lightvalve | 30:8d561f16383b | 2045 | } else if(VALVE_DZ_timer < (int) (6.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2046 | valve_pos.ref = DDV_POS_AVG; |
Lightvalve | 14:8e7590227d22 | 2047 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 60:64181f1d3e60 | 2048 | |
Lightvalve | 30:8d561f16383b | 2049 | } else if(VALVE_DZ_timer == (int) (6.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2050 | valve_pos.ref = DDV_POS_AVG; |
Lightvalve | 14:8e7590227d22 | 2051 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 14:8e7590227d22 | 2052 | FINAL_POS = pos.sen; |
Lightvalve | 14:8e7590227d22 | 2053 | |
Lightvalve | 60:64181f1d3e60 | 2054 | if((FINAL_POS - START_POS)>200) { |
Lightvalve | 13:747daba9cf59 | 2055 | DZ_case = 1; |
Lightvalve | 60:64181f1d3e60 | 2056 | } else if((FINAL_POS - START_POS)<-200) { |
Lightvalve | 13:747daba9cf59 | 2057 | DZ_case = -1; |
Lightvalve | 14:8e7590227d22 | 2058 | } else { |
Lightvalve | 13:747daba9cf59 | 2059 | DZ_case = 0; |
Lightvalve | 13:747daba9cf59 | 2060 | } |
Lightvalve | 61:bc8c8270f0ab | 2061 | |
Lightvalve | 60:64181f1d3e60 | 2062 | CAN_TX_PRES((int16_t) (DZ_case), (int16_t) (6)); |
Lightvalve | 50:3c630b5eba9f | 2063 | |
Lightvalve | 13:747daba9cf59 | 2064 | first_check = 1; |
Lightvalve | 13:747daba9cf59 | 2065 | DZ_DIRECTION = 1; |
Lightvalve | 13:747daba9cf59 | 2066 | VALVE_DZ_timer = 0; |
Lightvalve | 13:747daba9cf59 | 2067 | Ref_Valve_Pos_Old = DDV_POS_AVG; |
Lightvalve | 13:747daba9cf59 | 2068 | DZ_NUM = 1; |
Lightvalve | 13:747daba9cf59 | 2069 | DZ_index = 1; |
Lightvalve | 14:8e7590227d22 | 2070 | |
Lightvalve | 13:747daba9cf59 | 2071 | } |
Lightvalve | 19:23b7c1ad8683 | 2072 | } else { |
Lightvalve | 14:8e7590227d22 | 2073 | if((DZ_case == -1 && DZ_NUM == 1) | (DZ_case == 1 && DZ_NUM == 1)) { |
Lightvalve | 30:8d561f16383b | 2074 | if(VALVE_DZ_timer < (int) (1.0 * (float) TMR_FREQ_5k)) { |
Lightvalve | 60:64181f1d3e60 | 2075 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 60:64181f1d3e60 | 2076 | //pos.ref = 0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end; |
Lightvalve | 60:64181f1d3e60 | 2077 | //CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 30:8d561f16383b | 2078 | } else if(VALVE_DZ_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2079 | START_POS = pos.sen; |
Lightvalve | 30:8d561f16383b | 2080 | } else if(VALVE_DZ_timer < (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2081 | valve_pos.ref = Ref_Valve_Pos_Old - DZ_case * DZ_DIRECTION * 64 / DZ_index; |
Lightvalve | 14:8e7590227d22 | 2082 | if(valve_pos.ref <= VALVE_MIN_POS) { |
Lightvalve | 14:8e7590227d22 | 2083 | valve_pos.ref = VALVE_MIN_POS; |
Lightvalve | 14:8e7590227d22 | 2084 | } else if(valve_pos.ref >= VALVE_MAX_POS) { |
Lightvalve | 14:8e7590227d22 | 2085 | valve_pos.ref = VALVE_MAX_POS; |
Lightvalve | 13:747daba9cf59 | 2086 | } |
Lightvalve | 14:8e7590227d22 | 2087 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 60:64181f1d3e60 | 2088 | |
Lightvalve | 30:8d561f16383b | 2089 | } else if(VALVE_DZ_timer == (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2090 | Ref_Valve_Pos_Old = valve_pos.ref; |
Lightvalve | 14:8e7590227d22 | 2091 | FINAL_POS = pos.sen; |
Lightvalve | 14:8e7590227d22 | 2092 | |
Lightvalve | 14:8e7590227d22 | 2093 | if((FINAL_POS - START_POS)>100) { |
Lightvalve | 14:8e7590227d22 | 2094 | DZ_DIRECTION = 1 * DZ_case; |
Lightvalve | 14:8e7590227d22 | 2095 | } else if((FINAL_POS - START_POS)<-100) { |
Lightvalve | 14:8e7590227d22 | 2096 | DZ_DIRECTION = -1 * DZ_case; |
Lightvalve | 14:8e7590227d22 | 2097 | } else { |
Lightvalve | 13:747daba9cf59 | 2098 | DZ_DIRECTION = 1 * DZ_case; |
Lightvalve | 13:747daba9cf59 | 2099 | } |
Lightvalve | 14:8e7590227d22 | 2100 | |
Lightvalve | 13:747daba9cf59 | 2101 | VALVE_DZ_timer = 0; |
Lightvalve | 13:747daba9cf59 | 2102 | DZ_index= DZ_index *2; |
Lightvalve | 14:8e7590227d22 | 2103 | if(DZ_index >= 128) { |
Lightvalve | 14:8e7590227d22 | 2104 | FIRST_DZ = valve_pos.ref; |
Lightvalve | 13:747daba9cf59 | 2105 | DZ_NUM = 2; |
Lightvalve | 13:747daba9cf59 | 2106 | Ref_Valve_Pos_Old = FIRST_DZ; |
Lightvalve | 13:747daba9cf59 | 2107 | DZ_index = 1; |
Lightvalve | 13:747daba9cf59 | 2108 | DZ_DIRECTION = 1; |
Lightvalve | 13:747daba9cf59 | 2109 | } |
Lightvalve | 13:747daba9cf59 | 2110 | } |
Lightvalve | 14:8e7590227d22 | 2111 | } else if((DZ_case == -1 && DZ_NUM == 2) | (DZ_case == 1 && DZ_NUM == 2)) { |
Lightvalve | 30:8d561f16383b | 2112 | if(VALVE_DZ_timer < (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 60:64181f1d3e60 | 2113 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 60:64181f1d3e60 | 2114 | //pos.ref = 0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end; |
Lightvalve | 60:64181f1d3e60 | 2115 | //CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 30:8d561f16383b | 2116 | } else if(VALVE_DZ_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2117 | START_POS = pos.sen; |
Lightvalve | 30:8d561f16383b | 2118 | } else if(VALVE_DZ_timer < (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 60:64181f1d3e60 | 2119 | valve_pos.ref = Ref_Valve_Pos_Old - DZ_case * DZ_DIRECTION * 64 / DZ_index; |
Lightvalve | 14:8e7590227d22 | 2120 | if(valve_pos.ref <= VALVE_MIN_POS) { |
Lightvalve | 14:8e7590227d22 | 2121 | valve_pos.ref = VALVE_MIN_POS; |
Lightvalve | 14:8e7590227d22 | 2122 | } else if(valve_pos.ref >= VALVE_MAX_POS) { |
Lightvalve | 14:8e7590227d22 | 2123 | valve_pos.ref = VALVE_MAX_POS; |
Lightvalve | 13:747daba9cf59 | 2124 | } |
Lightvalve | 14:8e7590227d22 | 2125 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 61:bc8c8270f0ab | 2126 | |
Lightvalve | 30:8d561f16383b | 2127 | } else if(VALVE_DZ_timer == (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2128 | Vout.ref = 0.0f; |
Lightvalve | 59:f308b1656d9c | 2129 | } else if(VALVE_DZ_timer > (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2130 | Ref_Valve_Pos_Old = valve_pos.ref; |
Lightvalve | 14:8e7590227d22 | 2131 | FINAL_POS = pos.sen; |
Lightvalve | 14:8e7590227d22 | 2132 | |
Lightvalve | 14:8e7590227d22 | 2133 | if((FINAL_POS - START_POS)>100) { |
Lightvalve | 60:64181f1d3e60 | 2134 | DZ_DIRECTION = 1 * DZ_case; |
Lightvalve | 14:8e7590227d22 | 2135 | } else if((FINAL_POS - START_POS)<-100) { |
Lightvalve | 60:64181f1d3e60 | 2136 | DZ_DIRECTION = -1 * DZ_case; |
Lightvalve | 14:8e7590227d22 | 2137 | } else { |
Lightvalve | 60:64181f1d3e60 | 2138 | DZ_DIRECTION = -1 * DZ_case; |
Lightvalve | 13:747daba9cf59 | 2139 | } |
Lightvalve | 14:8e7590227d22 | 2140 | |
Lightvalve | 13:747daba9cf59 | 2141 | VALVE_DZ_timer = 0; |
Lightvalve | 60:64181f1d3e60 | 2142 | DZ_index= DZ_index * 2; |
Lightvalve | 14:8e7590227d22 | 2143 | if(DZ_index >= 128) { |
Lightvalve | 14:8e7590227d22 | 2144 | SECOND_DZ = valve_pos.ref; |
Lightvalve | 57:f4819de54e7a | 2145 | VALVE_CENTER = (int) (0.5f * (float) (FIRST_DZ) + 0.5f * (float) (SECOND_DZ)); |
Lightvalve | 13:747daba9cf59 | 2146 | first_check = 0; |
Lightvalve | 33:91b17819ec30 | 2147 | VALVE_DEADZONE_MINUS = (float) FIRST_DZ; |
Lightvalve | 33:91b17819ec30 | 2148 | VALVE_DEADZONE_PLUS = (float) SECOND_DZ; |
Lightvalve | 19:23b7c1ad8683 | 2149 | |
Lightvalve | 16:903b5a4433b4 | 2150 | ROM_RESET_DATA(); |
Lightvalve | 34:bb2ca2fc2a8e | 2151 | |
Lightvalve | 60:64181f1d3e60 | 2152 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 13:747daba9cf59 | 2153 | DZ_index = 1; |
Lightvalve | 13:747daba9cf59 | 2154 | } |
Lightvalve | 13:747daba9cf59 | 2155 | } |
Lightvalve | 14:8e7590227d22 | 2156 | } else if(DZ_case == 0 && DZ_NUM ==1) { |
Lightvalve | 30:8d561f16383b | 2157 | if(VALVE_DZ_timer < (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 60:64181f1d3e60 | 2158 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 60:64181f1d3e60 | 2159 | //pos.ref = 0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end; |
Lightvalve | 60:64181f1d3e60 | 2160 | //CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 30:8d561f16383b | 2161 | } else if(VALVE_DZ_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2162 | START_POS = pos.sen; |
Lightvalve | 30:8d561f16383b | 2163 | } else if(VALVE_DZ_timer < (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2164 | valve_pos.ref = Ref_Valve_Pos_Old - DZ_DIRECTION * 64 / DZ_index; |
Lightvalve | 14:8e7590227d22 | 2165 | if(valve_pos.ref <= VALVE_MIN_POS) { |
Lightvalve | 14:8e7590227d22 | 2166 | valve_pos.ref = VALVE_MIN_POS; |
Lightvalve | 14:8e7590227d22 | 2167 | } else if(valve_pos.ref >= VALVE_MAX_POS) { |
Lightvalve | 14:8e7590227d22 | 2168 | valve_pos.ref = VALVE_MAX_POS; |
Lightvalve | 13:747daba9cf59 | 2169 | } |
Lightvalve | 14:8e7590227d22 | 2170 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 61:bc8c8270f0ab | 2171 | |
Lightvalve | 30:8d561f16383b | 2172 | } else if(VALVE_DZ_timer == (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2173 | Ref_Valve_Pos_Old = valve_pos.ref; |
Lightvalve | 14:8e7590227d22 | 2174 | FINAL_POS = pos.sen; |
Lightvalve | 14:8e7590227d22 | 2175 | |
Lightvalve | 14:8e7590227d22 | 2176 | if((FINAL_POS - START_POS)>100) { |
Lightvalve | 14:8e7590227d22 | 2177 | DZ_DIRECTION = 1; |
Lightvalve | 14:8e7590227d22 | 2178 | } else if((FINAL_POS - START_POS)<-100) { |
Lightvalve | 14:8e7590227d22 | 2179 | DZ_DIRECTION = -1; |
Lightvalve | 14:8e7590227d22 | 2180 | } else { |
Lightvalve | 13:747daba9cf59 | 2181 | DZ_DIRECTION = 1; |
Lightvalve | 13:747daba9cf59 | 2182 | } |
Lightvalve | 13:747daba9cf59 | 2183 | VALVE_DZ_timer = 0; |
Lightvalve | 13:747daba9cf59 | 2184 | DZ_index= DZ_index *2; |
Lightvalve | 14:8e7590227d22 | 2185 | if(DZ_index >= 128) { |
Lightvalve | 14:8e7590227d22 | 2186 | FIRST_DZ = valve_pos.ref; |
Lightvalve | 13:747daba9cf59 | 2187 | DZ_NUM = 2; |
Lightvalve | 13:747daba9cf59 | 2188 | Ref_Valve_Pos_Old = FIRST_DZ; |
Lightvalve | 13:747daba9cf59 | 2189 | DZ_index = 1; |
Lightvalve | 13:747daba9cf59 | 2190 | DZ_DIRECTION = 1; |
Lightvalve | 13:747daba9cf59 | 2191 | } |
Lightvalve | 13:747daba9cf59 | 2192 | } |
Lightvalve | 14:8e7590227d22 | 2193 | } else { |
Lightvalve | 30:8d561f16383b | 2194 | if(VALVE_DZ_timer < (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 60:64181f1d3e60 | 2195 | Vout.ref = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 60:64181f1d3e60 | 2196 | //pos.ref = 0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end; |
Lightvalve | 60:64181f1d3e60 | 2197 | //CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 30:8d561f16383b | 2198 | } else if(VALVE_DZ_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2199 | START_POS = pos.sen; |
Lightvalve | 30:8d561f16383b | 2200 | } else if(VALVE_DZ_timer < (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2201 | valve_pos.ref = Ref_Valve_Pos_Old + DZ_DIRECTION * 64 / DZ_index; |
Lightvalve | 14:8e7590227d22 | 2202 | if(valve_pos.ref <= VALVE_MIN_POS) { |
Lightvalve | 14:8e7590227d22 | 2203 | valve_pos.ref = VALVE_MIN_POS; |
Lightvalve | 14:8e7590227d22 | 2204 | } else if(valve_pos.ref > VALVE_MAX_POS) { |
Lightvalve | 14:8e7590227d22 | 2205 | valve_pos.ref = VALVE_MAX_POS - 1; |
Lightvalve | 13:747daba9cf59 | 2206 | } |
Lightvalve | 14:8e7590227d22 | 2207 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 60:64181f1d3e60 | 2208 | |
Lightvalve | 30:8d561f16383b | 2209 | } else if(VALVE_DZ_timer == (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2210 | Vout.ref = 0.0f; |
Lightvalve | 59:f308b1656d9c | 2211 | } else if(VALVE_DZ_timer > (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2212 | Ref_Valve_Pos_Old = valve_pos.ref; |
Lightvalve | 14:8e7590227d22 | 2213 | FINAL_POS = pos.sen; |
Lightvalve | 61:bc8c8270f0ab | 2214 | |
Lightvalve | 60:64181f1d3e60 | 2215 | if((FINAL_POS - START_POS)>100) { |
Lightvalve | 13:747daba9cf59 | 2216 | DZ_DIRECTION = 1; |
Lightvalve | 60:64181f1d3e60 | 2217 | } else if((FINAL_POS - START_POS)<-100) { |
Lightvalve | 60:64181f1d3e60 | 2218 | DZ_DIRECTION = -1; |
Lightvalve | 60:64181f1d3e60 | 2219 | } else { |
Lightvalve | 13:747daba9cf59 | 2220 | DZ_DIRECTION = 1; |
Lightvalve | 60:64181f1d3e60 | 2221 | } |
Lightvalve | 14:8e7590227d22 | 2222 | |
Lightvalve | 13:747daba9cf59 | 2223 | VALVE_DZ_timer = 0; |
Lightvalve | 13:747daba9cf59 | 2224 | DZ_index= DZ_index *2; |
Lightvalve | 14:8e7590227d22 | 2225 | if(DZ_index >= 128) { |
Lightvalve | 14:8e7590227d22 | 2226 | SECOND_DZ = valve_pos.ref; |
Lightvalve | 57:f4819de54e7a | 2227 | VALVE_CENTER = (int) (0.5f * (float) (FIRST_DZ) + 0.5f * (float) (SECOND_DZ)); |
Lightvalve | 13:747daba9cf59 | 2228 | first_check = 0; |
Lightvalve | 33:91b17819ec30 | 2229 | VALVE_DEADZONE_MINUS = (float) FIRST_DZ; |
Lightvalve | 33:91b17819ec30 | 2230 | VALVE_DEADZONE_PLUS = (float) SECOND_DZ; |
Lightvalve | 61:bc8c8270f0ab | 2231 | |
Lightvalve | 59:f308b1656d9c | 2232 | ROM_RESET_DATA(); |
Lightvalve | 34:bb2ca2fc2a8e | 2233 | |
Lightvalve | 57:f4819de54e7a | 2234 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 13:747daba9cf59 | 2235 | DZ_index = 1; |
Lightvalve | 13:747daba9cf59 | 2236 | } |
Lightvalve | 13:747daba9cf59 | 2237 | } |
Lightvalve | 13:747daba9cf59 | 2238 | } |
Lightvalve | 14:8e7590227d22 | 2239 | } |
Lightvalve | 13:747daba9cf59 | 2240 | break; |
Lightvalve | 13:747daba9cf59 | 2241 | } |
Lightvalve | 14:8e7590227d22 | 2242 | |
Lightvalve | 14:8e7590227d22 | 2243 | case MODE_DDV_POS_VS_FLOWRATE: { |
Lightvalve | 59:f308b1656d9c | 2244 | CONTROL_MODE = MODE_VALVE_OPEN_LOOP; |
Lightvalve | 13:747daba9cf59 | 2245 | VALVE_FR_timer = VALVE_FR_timer + 1; |
Lightvalve | 14:8e7590227d22 | 2246 | if(first_check == 0) { |
Lightvalve | 30:8d561f16383b | 2247 | if(VALVE_FR_timer < (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2248 | Vout.ref = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 23:59218d4a256d | 2249 | //CAN_TX_PRES((int16_t) (VALVE_FR_timer), (int16_t) (6)); |
Lightvalve | 30:8d561f16383b | 2250 | } else if(VALVE_FR_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2251 | Vout.ref = VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 14:8e7590227d22 | 2252 | pos_plus_end = pos.sen; |
Lightvalve | 14:8e7590227d22 | 2253 | // CAN_TX_PRES((int16_t) (V_out), (int16_t) (7)); |
Lightvalve | 30:8d561f16383b | 2254 | } else if(VALVE_FR_timer < (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2255 | Vout.ref = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 30:8d561f16383b | 2256 | } else if(VALVE_FR_timer == (int) (2.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2257 | // CAN_TX_PRES((int16_t) (V_out), (int16_t) (8)); |
Lightvalve | 59:f308b1656d9c | 2258 | Vout.ref = -VALVE_VOLTAGE_LIMIT * 1000.0f; |
Lightvalve | 14:8e7590227d22 | 2259 | pos_minus_end = pos.sen; |
Lightvalve | 13:747daba9cf59 | 2260 | first_check = 1; |
Lightvalve | 13:747daba9cf59 | 2261 | VALVE_FR_timer = 0; |
Lightvalve | 57:f4819de54e7a | 2262 | valve_pos.ref = (float) VALVE_CENTER; |
Lightvalve | 13:747daba9cf59 | 2263 | ID_index = 0; |
Lightvalve | 13:747daba9cf59 | 2264 | max_check = 0; |
Lightvalve | 13:747daba9cf59 | 2265 | min_check = 0; |
Lightvalve | 13:747daba9cf59 | 2266 | } |
Lightvalve | 14:8e7590227d22 | 2267 | } else { |
Lightvalve | 30:8d561f16383b | 2268 | if(VALVE_FR_timer < (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 59:f308b1656d9c | 2269 | //V_out = (float) P_GAIN_JOINT_POSITION * (0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen)/(float) ENC_PULSE_PER_POSITION; |
Lightvalve | 59:f308b1656d9c | 2270 | pos.ref = 0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end; |
Lightvalve | 59:f308b1656d9c | 2271 | CONTROL_MODE = MODE_JOINT_CONTROL; |
Lightvalve | 30:8d561f16383b | 2272 | } else if(VALVE_FR_timer == (int) (1.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 13:747daba9cf59 | 2273 | data_num = 0; |
Lightvalve | 57:f4819de54e7a | 2274 | valve_pos.ref = 10.0f*((float) ID_index_array[ID_index]) + (float) VALVE_CENTER; |
Lightvalve | 14:8e7590227d22 | 2275 | |
Lightvalve | 14:8e7590227d22 | 2276 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 14:8e7590227d22 | 2277 | START_POS = pos.sen; |
Lightvalve | 30:8d561f16383b | 2278 | } else if(VALVE_FR_timer < (int) (5.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 57:f4819de54e7a | 2279 | valve_pos.ref = 10.0f*((float) ID_index_array[ID_index]) + (float) VALVE_CENTER; |
Lightvalve | 14:8e7590227d22 | 2280 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 13:747daba9cf59 | 2281 | data_num = data_num + 1; |
Lightvalve | 30:8d561f16383b | 2282 | if(abs(0.5f * (float) pos_plus_end + 0.5f * (float) pos_minus_end - (float) pos.sen) > 20000.0f) { |
Lightvalve | 14:8e7590227d22 | 2283 | FINAL_POS = pos.sen; |
Lightvalve | 14:8e7590227d22 | 2284 | one_period_end = 1; |
Lightvalve | 13:747daba9cf59 | 2285 | } |
Lightvalve | 30:8d561f16383b | 2286 | } else if(VALVE_FR_timer == (int) (5.0f * (float) TMR_FREQ_5k)) { |
Lightvalve | 14:8e7590227d22 | 2287 | FINAL_POS = pos.sen; |
Lightvalve | 13:747daba9cf59 | 2288 | one_period_end = 1; |
Lightvalve | 59:f308b1656d9c | 2289 | V_out = 0.0f; |
Lightvalve | 13:747daba9cf59 | 2290 | } |
Lightvalve | 14:8e7590227d22 | 2291 | |
Lightvalve | 14:8e7590227d22 | 2292 | if(one_period_end == 1) { |
Lightvalve | 14:8e7590227d22 | 2293 | if(valve_pos.ref > VALVE_MAX_POS) { |
Lightvalve | 13:747daba9cf59 | 2294 | max_check = 1; |
Lightvalve | 14:8e7590227d22 | 2295 | } else if(valve_pos.ref < VALVE_MIN_POS) { |
Lightvalve | 13:747daba9cf59 | 2296 | min_check = 1; |
Lightvalve | 13:747daba9cf59 | 2297 | } |
Lightvalve | 13:747daba9cf59 | 2298 | JOINT_VEL[ID_index] = (FINAL_POS - START_POS) / data_num * TMR_FREQ_5k; // pulse/sec |
Lightvalve | 19:23b7c1ad8683 | 2299 | |
Lightvalve | 13:747daba9cf59 | 2300 | VALVE_FR_timer = 0; |
Lightvalve | 13:747daba9cf59 | 2301 | one_period_end = 0; |
Lightvalve | 13:747daba9cf59 | 2302 | ID_index= ID_index +1; |
Lightvalve | 30:8d561f16383b | 2303 | V_out = 0.0f; |
Lightvalve | 13:747daba9cf59 | 2304 | } |
Lightvalve | 14:8e7590227d22 | 2305 | |
Lightvalve | 14:8e7590227d22 | 2306 | if(max_check == 1 && min_check == 1) { |
Lightvalve | 19:23b7c1ad8683 | 2307 | |
Lightvalve | 13:747daba9cf59 | 2308 | VALVE_POS_NUM = ID_index; |
Lightvalve | 59:f308b1656d9c | 2309 | ROM_RESET_DATA(); |
Lightvalve | 13:747daba9cf59 | 2310 | ID_index = 0; |
Lightvalve | 13:747daba9cf59 | 2311 | first_check = 0; |
Lightvalve | 13:747daba9cf59 | 2312 | VALVE_FR_timer = 0; |
Lightvalve | 57:f4819de54e7a | 2313 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 49:e7bcfc244d40 | 2314 | // CAN_TX_PRES((int16_t) (VALVE_FR_timer), (int16_t) (6)); |
Lightvalve | 13:747daba9cf59 | 2315 | } |
Lightvalve | 13:747daba9cf59 | 2316 | } |
Lightvalve | 13:747daba9cf59 | 2317 | break; |
Lightvalve | 13:747daba9cf59 | 2318 | } |
Lightvalve | 58:2eade98630e2 | 2319 | |
Lightvalve | 57:f4819de54e7a | 2320 | case MODE_SYSTEM_ID: { |
Lightvalve | 57:f4819de54e7a | 2321 | freq_sysid_Iref = (double) cnt_sysid * DT_TMR3 * 3.; |
Lightvalve | 57:f4819de54e7a | 2322 | valve_pos.ref = 2500.0f * sin(2.0f * 3.14159f * freq_sysid_Iref * (double) cnt_sysid * DT_TMR3); |
Lightvalve | 57:f4819de54e7a | 2323 | CONTROL_MODE = MODE_VALVE_OPEN_LOOP; |
Lightvalve | 57:f4819de54e7a | 2324 | cnt_sysid++; |
Lightvalve | 57:f4819de54e7a | 2325 | if (freq_sysid_Iref >= 300) { |
Lightvalve | 57:f4819de54e7a | 2326 | cnt_sysid = 0; |
Lightvalve | 57:f4819de54e7a | 2327 | CONTROL_UTILITY_MODE = MODE_NO_ACT; |
Lightvalve | 57:f4819de54e7a | 2328 | } |
Lightvalve | 57:f4819de54e7a | 2329 | break; |
Lightvalve | 57:f4819de54e7a | 2330 | } |
Lightvalve | 58:2eade98630e2 | 2331 | |
Lightvalve | 58:2eade98630e2 | 2332 | |
Lightvalve | 57:f4819de54e7a | 2333 | |
Lightvalve | 57:f4819de54e7a | 2334 | default: |
Lightvalve | 57:f4819de54e7a | 2335 | break; |
Lightvalve | 57:f4819de54e7a | 2336 | } |
Lightvalve | 57:f4819de54e7a | 2337 | |
Lightvalve | 57:f4819de54e7a | 2338 | // CONTROL MODE ------------------------------------------------------------ |
Lightvalve | 57:f4819de54e7a | 2339 | |
Lightvalve | 57:f4819de54e7a | 2340 | switch (CONTROL_MODE) { |
Lightvalve | 57:f4819de54e7a | 2341 | case MODE_NO_ACT: { |
Lightvalve | 57:f4819de54e7a | 2342 | V_out = 0.0f; |
Lightvalve | 57:f4819de54e7a | 2343 | break; |
Lightvalve | 57:f4819de54e7a | 2344 | } |
Lightvalve | 57:f4819de54e7a | 2345 | |
Lightvalve | 57:f4819de54e7a | 2346 | case MODE_VALVE_POSITION_CONTROL: { |
Lightvalve | 57:f4819de54e7a | 2347 | if (((OPERATING_MODE&0b110)>>1) == 0) { //Moog Valve |
Lightvalve | 57:f4819de54e7a | 2348 | I_REF = valve_pos.ref; |
Lightvalve | 57:f4819de54e7a | 2349 | } else if (((OPERATING_MODE&0b110)>>1) == 1) { //KNR Valve |
Lightvalve | 57:f4819de54e7a | 2350 | V_out = valve_pos.ref; |
Lightvalve | 57:f4819de54e7a | 2351 | } else { //SW Valve |
Lightvalve | 57:f4819de54e7a | 2352 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 59:f308b1656d9c | 2353 | V_out = Vout.ref; |
Lightvalve | 57:f4819de54e7a | 2354 | } |
Lightvalve | 58:2eade98630e2 | 2355 | |
Lightvalve | 57:f4819de54e7a | 2356 | break; |
Lightvalve | 57:f4819de54e7a | 2357 | } |
Lightvalve | 57:f4819de54e7a | 2358 | |
Lightvalve | 57:f4819de54e7a | 2359 | case MODE_JOINT_CONTROL: { |
Lightvalve | 57:f4819de54e7a | 2360 | double torq_ref = 0.0f; |
Lightvalve | 57:f4819de54e7a | 2361 | pos.err = (pos.ref - pos.sen)/(float)(ENC_PULSE_PER_POSITION); //[mm] |
Lightvalve | 57:f4819de54e7a | 2362 | vel.err = (vel.ref - vel.sen)/(float)(ENC_PULSE_PER_POSITION); //[mm/s] |
Lightvalve | 57:f4819de54e7a | 2363 | pos.err_sum += pos.err/(float) TMR_FREQ_5k; //[mm] |
Lightvalve | 57:f4819de54e7a | 2364 | torq_ref = torq.ref + (K_SPRING * pos.err * 0.01f + D_DAMPER * vel.err * 0.0001f) / ENC_PULSE_PER_POSITION; //[N] |
Lightvalve | 57:f4819de54e7a | 2365 | |
Lightvalve | 57:f4819de54e7a | 2366 | // torque feedback |
Lightvalve | 58:2eade98630e2 | 2367 | torq.err = (torq_ref)/(float)(TORQUE_SENSOR_PULSE_PER_TORQUE) - torq.sen; //[N] |
Lightvalve | 57:f4819de54e7a | 2368 | torq.err_sum += torq.err/(float) TMR_FREQ_5k; //[N] |
Lightvalve | 57:f4819de54e7a | 2369 | |
Lightvalve | 57:f4819de54e7a | 2370 | if (((OPERATING_MODE&0b110)>>1) == 0 || ((OPERATING_MODE&0b110)>>1) == 1) { |
Lightvalve | 58:2eade98630e2 | 2371 | |
Lightvalve | 57:f4819de54e7a | 2372 | double I_REF_POS = 0.0f; |
Lightvalve | 57:f4819de54e7a | 2373 | double I_REF_FORCE_FB = 0.0f; // I_REF by Force Feedback |
Lightvalve | 57:f4819de54e7a | 2374 | double I_REF_VC = 0.0f; // I_REF for velocity compensation |
Lightvalve | 57:f4819de54e7a | 2375 | |
Lightvalve | 57:f4819de54e7a | 2376 | double temp_vel_pos = 0.0f; |
Lightvalve | 57:f4819de54e7a | 2377 | double temp_vel_torq = 0.0f; |
Lightvalve | 57:f4819de54e7a | 2378 | double wn_Pos = 2.0f * PI * 5.0f; // f_cut : 5Hz Position Control |
Lightvalve | 58:2eade98630e2 | 2379 | |
Lightvalve | 57:f4819de54e7a | 2380 | if ((OPERATING_MODE && 0x01) == 0) { // Rotary Mode |
Lightvalve | 57:f4819de54e7a | 2381 | temp_vel_pos = (0.01f * (double) P_GAIN_JOINT_POSITION * wn_Pos * pos.err + 0.01f * (double) I_GAIN_JOINT_POSITION * wn_Pos * pos.err_sum + 0.01f * (double) VELOCITY_COMP_GAIN * vel.ref / ENC_PULSE_PER_POSITION) * PI / 180.0f; // rad/s |
Lightvalve | 57:f4819de54e7a | 2382 | // L when P-gain = 100, f_cut = 10Hz L feedforward velocity |
Lightvalve | 57:f4819de54e7a | 2383 | } else if ((OPERATING_MODE && 0x01) == 1) { |
Lightvalve | 57:f4819de54e7a | 2384 | temp_vel_pos = (0.01f * (double) P_GAIN_JOINT_POSITION * wn_Pos * pos.err + 0.01f * (double) I_GAIN_JOINT_POSITION * wn_Pos * pos.err_sum + 0.01f * (double) VELOCITY_COMP_GAIN * vel.ref / ENC_PULSE_PER_POSITION); // mm/s |
Lightvalve | 57:f4819de54e7a | 2385 | // L when P-gain = 100, f_cut = 10Hz L feedforward velocity |
Lightvalve | 57:f4819de54e7a | 2386 | } |
Lightvalve | 57:f4819de54e7a | 2387 | if (temp_vel_pos > 0.0f) I_REF_POS = temp_vel_pos * ((double) PISTON_AREA_A * 0.00006f / (K_v * sqrt(2.0f * alpha3 / (alpha3 + 1.0f)))); |
Lightvalve | 57:f4819de54e7a | 2388 | else I_REF_POS = temp_vel_pos * ((double) PISTON_AREA_B * 0.00006f / (K_v * sqrt(2.0f / (alpha3 + 1.0f)))); |
Lightvalve | 57:f4819de54e7a | 2389 | |
Lightvalve | 57:f4819de54e7a | 2390 | // velocity compensation for torque control |
Lightvalve | 57:f4819de54e7a | 2391 | if ((OPERATING_MODE && 0x01) == 0) { // Rotary Mode |
Lightvalve | 57:f4819de54e7a | 2392 | I_REF_FORCE_FB = 0.001f * ((double) P_GAIN_JOINT_TORQUE * torq.err + (double) I_GAIN_JOINT_TORQUE * torq.err_sum); |
Lightvalve | 57:f4819de54e7a | 2393 | // temp_vel_torq = (0.01 * (double) VELOCITY_COMP_GAIN * (double) CUR_VELOCITY / (double) ENC_PULSE_PER_POSITION) * PI / 180.0; // rad/s |
Lightvalve | 57:f4819de54e7a | 2394 | temp_vel_torq = (0.01f * (double) VELOCITY_COMP_GAIN * vel.ref / (double) ENC_PULSE_PER_POSITION) * PI / 180.0f; // rad/s |
Lightvalve | 57:f4819de54e7a | 2395 | // L feedforward velocity |
Lightvalve | 57:f4819de54e7a | 2396 | } else if ((OPERATING_MODE && 0x01) == 1) { |
Lightvalve | 57:f4819de54e7a | 2397 | I_REF_FORCE_FB = 0.001f * 0.01f*((double) P_GAIN_JOINT_TORQUE * torq.err + (double) I_GAIN_JOINT_TORQUE * torq.err_sum); // Linear Actuators are more sensitive. |
Lightvalve | 57:f4819de54e7a | 2398 | // temp_vel_torq = (0.01 * (double) VELOCITY_COMP_GAIN * (double) CUR_VELOCITY / (double) ENC_PULSE_PER_POSITION); // mm/s |
Lightvalve | 57:f4819de54e7a | 2399 | temp_vel_torq = (0.01f * (double) VELOCITY_COMP_GAIN * vel.ref / (double) ENC_PULSE_PER_POSITION); // mm/s |
Lightvalve | 57:f4819de54e7a | 2400 | // L feedforward velocity |
Lightvalve | 57:f4819de54e7a | 2401 | } |
Lightvalve | 57:f4819de54e7a | 2402 | if (temp_vel_torq > 0.0f) I_REF_VC = temp_vel_torq * ((double) PISTON_AREA_A * 0.00006f / (K_v * sqrt(2.0f * alpha3 / (alpha3 + 1.0f)))); |
Lightvalve | 57:f4819de54e7a | 2403 | else I_REF_VC = temp_vel_torq * ((double) PISTON_AREA_B * 0.00006f / (K_v * sqrt(2.0f / (alpha3 + 1.0f)))); |
Lightvalve | 57:f4819de54e7a | 2404 | // L velocity(rad/s or mm/s) >> I_ref(mA) |
Lightvalve | 57:f4819de54e7a | 2405 | // Ref_Joint_FT_dot = (Ref_Joint_FT_Nm - Ref_Joint_FT_Nm_old) / TMR_DT_5k; |
Lightvalve | 57:f4819de54e7a | 2406 | // Ref_Joint_FT_Nm_old = Ref_Joint_FT_Nm; |
Lightvalve | 57:f4819de54e7a | 2407 | |
Lightvalve | 57:f4819de54e7a | 2408 | I_REF = (1.0f - alpha_trans) * I_REF_POS + alpha_trans * (I_REF_VC + I_REF_FORCE_FB); |
Lightvalve | 57:f4819de54e7a | 2409 | |
Lightvalve | 57:f4819de54e7a | 2410 | } else { |
Lightvalve | 57:f4819de54e7a | 2411 | float VALVE_POS_RAW_FORCE_FB = 0.0f; |
Lightvalve | 57:f4819de54e7a | 2412 | |
Lightvalve | 57:f4819de54e7a | 2413 | VALVE_POS_RAW_FORCE_FB = alpha_trans*(((float) P_GAIN_JOINT_TORQUE * torq.err + (float) I_GAIN_JOINT_TORQUE * torq.err_sum) * 0.01f |
Lightvalve | 57:f4819de54e7a | 2414 | + DDV_JOINT_POS_FF(vel.sen))+ (1.0f-alpha_trans) * (P_GAIN_JOINT_POSITION * 0.01f * pos.err + DDV_JOINT_POS_FF(vel.ref)); |
Lightvalve | 57:f4819de54e7a | 2415 | |
Lightvalve | 57:f4819de54e7a | 2416 | if (VALVE_POS_RAW_FORCE_FB >= 0) { |
Lightvalve | 57:f4819de54e7a | 2417 | valve_pos.ref = VALVE_POS_RAW_FORCE_FB + VALVE_DEADZONE_PLUS; |
Lightvalve | 57:f4819de54e7a | 2418 | } else { |
Lightvalve | 57:f4819de54e7a | 2419 | valve_pos.ref = VALVE_POS_RAW_FORCE_FB + VALVE_DEADZONE_MINUS; |
Lightvalve | 57:f4819de54e7a | 2420 | } |
Lightvalve | 57:f4819de54e7a | 2421 | |
Lightvalve | 57:f4819de54e7a | 2422 | if(I_GAIN_JOINT_TORQUE != 0) { |
Lightvalve | 57:f4819de54e7a | 2423 | double Ka = 1.0f / (double) I_GAIN_JOINT_TORQUE * 100.0f; |
Lightvalve | 57:f4819de54e7a | 2424 | if(valve_pos.ref>VALVE_MAX_POS) { |
Lightvalve | 57:f4819de54e7a | 2425 | double valve_pos_rem = valve_pos.ref - VALVE_MAX_POS; |
Lightvalve | 57:f4819de54e7a | 2426 | valve_pos_rem = valve_pos_rem * Ka; |
Lightvalve | 57:f4819de54e7a | 2427 | valve_pos.ref = VALVE_MAX_POS; |
Lightvalve | 57:f4819de54e7a | 2428 | torq.err_sum = torq.err_sum - valve_pos_rem/(float) TMR_FREQ_5k; |
Lightvalve | 57:f4819de54e7a | 2429 | } else if(valve_pos.ref < VALVE_MIN_POS) { |
Lightvalve | 57:f4819de54e7a | 2430 | double valve_pos_rem = valve_pos.ref - VALVE_MIN_POS; |
Lightvalve | 57:f4819de54e7a | 2431 | valve_pos_rem = valve_pos_rem * Ka; |
Lightvalve | 57:f4819de54e7a | 2432 | valve_pos.ref = VALVE_MIN_POS; |
Lightvalve | 57:f4819de54e7a | 2433 | torq.err_sum = torq.err_sum - valve_pos_rem/(float) TMR_FREQ_5k; |
Lightvalve | 57:f4819de54e7a | 2434 | } |
Lightvalve | 57:f4819de54e7a | 2435 | } |
Lightvalve | 61:bc8c8270f0ab | 2436 | |
Lightvalve | 57:f4819de54e7a | 2437 | VALVE_POS_CONTROL(valve_pos.ref); |
Lightvalve | 61:bc8c8270f0ab | 2438 | |
Lightvalve | 60:64181f1d3e60 | 2439 | Vout.ref = (float) P_GAIN_JOINT_POSITION * 0.01f * ((float) pos.err); |
Lightvalve | 60:64181f1d3e60 | 2440 | V_out = (float) Vout.ref; |
Lightvalve | 57:f4819de54e7a | 2441 | |
Lightvalve | 57:f4819de54e7a | 2442 | } |
Lightvalve | 58:2eade98630e2 | 2443 | |
Lightvalve | 57:f4819de54e7a | 2444 | break; |
Lightvalve | 57:f4819de54e7a | 2445 | } |
Lightvalve | 58:2eade98630e2 | 2446 | |
Lightvalve | 57:f4819de54e7a | 2447 | case MODE_VALVE_OPEN_LOOP: { |
Lightvalve | 57:f4819de54e7a | 2448 | V_out = (float) Vout.ref; |
Lightvalve | 57:f4819de54e7a | 2449 | break; |
Lightvalve | 57:f4819de54e7a | 2450 | } |
Lightvalve | 14:8e7590227d22 | 2451 | |
Lightvalve | 12:6f2531038ea4 | 2452 | default: |
Lightvalve | 12:6f2531038ea4 | 2453 | break; |
Lightvalve | 12:6f2531038ea4 | 2454 | } |
Lightvalve | 14:8e7590227d22 | 2455 | |
Lightvalve | 57:f4819de54e7a | 2456 | |
Lightvalve | 57:f4819de54e7a | 2457 | if (((OPERATING_MODE&0b110)>>1) == 0 || ((OPERATING_MODE&0b110)>>1) == 1) { //Moog Valve or KNR Valve |
Lightvalve | 58:2eade98630e2 | 2458 | |
Lightvalve | 57:f4819de54e7a | 2459 | //////////////////////////////////////////////////////////////////////////// |
Lightvalve | 57:f4819de54e7a | 2460 | //////////////////////////// CURRENT CONTROL ////////////////////////////// |
Lightvalve | 57:f4819de54e7a | 2461 | //////////////////////////////////////////////////////////////////////////// |
Lightvalve | 57:f4819de54e7a | 2462 | if (CURRENT_CONTROL_MODE) { |
Lightvalve | 57:f4819de54e7a | 2463 | double alpha_update_Iref = 1.0f / (1.0f + TMR_FREQ_5k / (2.0f * 3.14f * 300.0f)); // f_cutoff : 500Hz |
Lightvalve | 57:f4819de54e7a | 2464 | I_REF_fil = (1.0f - alpha_update_Iref) * I_REF_fil + alpha_update_Iref*I_REF; |
Lightvalve | 57:f4819de54e7a | 2465 | |
Lightvalve | 57:f4819de54e7a | 2466 | I_ERR = I_REF_fil - cur.sen; |
Lightvalve | 57:f4819de54e7a | 2467 | I_ERR_INT = I_ERR_INT + (I_ERR) * DT_TMR3; |
Lightvalve | 57:f4819de54e7a | 2468 | |
Lightvalve | 57:f4819de54e7a | 2469 | |
Lightvalve | 57:f4819de54e7a | 2470 | // Moog Valve Current Control Gain |
Lightvalve | 57:f4819de54e7a | 2471 | double R_model = 539.0f; // ohm |
Lightvalve | 57:f4819de54e7a | 2472 | double L_model = 1.2f; |
Lightvalve | 57:f4819de54e7a | 2473 | double w0 = 2.0f * 3.14f * 150.0f; |
Lightvalve | 57:f4819de54e7a | 2474 | double KP_I = 0.1f * L_model*w0; |
Lightvalve | 57:f4819de54e7a | 2475 | double KI_I = 0.1f * R_model*w0; |
Lightvalve | 57:f4819de54e7a | 2476 | |
Lightvalve | 57:f4819de54e7a | 2477 | // KNR Valve Current Control Gain |
Lightvalve | 57:f4819de54e7a | 2478 | if (((OPERATING_MODE & 0b110)>>1) == 1) { // KNR Valve |
Lightvalve | 57:f4819de54e7a | 2479 | R_model = 163.0f; // ohm |
Lightvalve | 57:f4819de54e7a | 2480 | L_model = 1.0f; |
Lightvalve | 57:f4819de54e7a | 2481 | w0 = 2.0f * 3.14f * 80.0f; |
Lightvalve | 57:f4819de54e7a | 2482 | KP_I = 1.0f * L_model*w0; |
Lightvalve | 57:f4819de54e7a | 2483 | KI_I = 0.08f * R_model*w0; |
Lightvalve | 57:f4819de54e7a | 2484 | } |
Lightvalve | 57:f4819de54e7a | 2485 | |
Lightvalve | 57:f4819de54e7a | 2486 | double FF_gain = 1.0f; |
Lightvalve | 57:f4819de54e7a | 2487 | |
Lightvalve | 57:f4819de54e7a | 2488 | VALVE_PWM_RAW = KP_I * I_ERR + KI_I * I_ERR_INT; |
Lightvalve | 57:f4819de54e7a | 2489 | // VALVE_PWM_RAW = VALVE_PWM_RAW + FF_gain * (R_model*I_REF); // Unit : mV |
Lightvalve | 57:f4819de54e7a | 2490 | I_REF_fil_diff = I_REF_fil - I_REF_fil_old; |
Lightvalve | 57:f4819de54e7a | 2491 | I_REF_fil_old = I_REF_fil; |
Lightvalve | 57:f4819de54e7a | 2492 | VALVE_PWM_RAW = VALVE_PWM_RAW + FF_gain * (R_model * I_REF_fil + L_model * I_REF_fil_diff * TMR_FREQ_5k); // Unit : mV |
Lightvalve | 57:f4819de54e7a | 2493 | double V_MAX = 12000.; // Maximum Voltage : 12V = 12000mV |
Lightvalve | 57:f4819de54e7a | 2494 | |
Lightvalve | 57:f4819de54e7a | 2495 | double Ka = 3.0f / KP_I; |
Lightvalve | 57:f4819de54e7a | 2496 | if (VALVE_PWM_RAW > V_MAX) { |
Lightvalve | 57:f4819de54e7a | 2497 | V_rem = VALVE_PWM_RAW - V_MAX; |
Lightvalve | 57:f4819de54e7a | 2498 | V_rem = Ka*V_rem; |
Lightvalve | 57:f4819de54e7a | 2499 | VALVE_PWM_RAW = V_MAX; |
Lightvalve | 57:f4819de54e7a | 2500 | I_ERR_INT = I_ERR_INT - V_rem * DT_TMR3; |
Lightvalve | 57:f4819de54e7a | 2501 | } else if (VALVE_PWM_RAW < -V_MAX) { |
Lightvalve | 57:f4819de54e7a | 2502 | V_rem = VALVE_PWM_RAW - (-V_MAX); |
Lightvalve | 57:f4819de54e7a | 2503 | V_rem = Ka*V_rem; |
Lightvalve | 57:f4819de54e7a | 2504 | VALVE_PWM_RAW = -V_MAX; |
Lightvalve | 57:f4819de54e7a | 2505 | I_ERR_INT = I_ERR_INT - V_rem * DT_TMR3; |
Lightvalve | 57:f4819de54e7a | 2506 | } |
Lightvalve | 57:f4819de54e7a | 2507 | Cur_Valve_Open_pulse = cur.sen / mA_PER_pulse; |
Lightvalve | 57:f4819de54e7a | 2508 | } else { |
Lightvalve | 57:f4819de54e7a | 2509 | VALVE_PWM_RAW = I_REF * mV_PER_mA; |
Lightvalve | 57:f4819de54e7a | 2510 | Cur_Valve_Open_pulse = I_REF / mA_PER_pulse; |
Lightvalve | 57:f4819de54e7a | 2511 | } |
Lightvalve | 57:f4819de54e7a | 2512 | |
Lightvalve | 57:f4819de54e7a | 2513 | //////////////////////////////////////////////////////////////////////////// |
Lightvalve | 57:f4819de54e7a | 2514 | ///////////////// Dead Zone Cancellation & Linearization ////////////////// |
Lightvalve | 57:f4819de54e7a | 2515 | //////////////////////////////////////////////////////////////////////////// |
Lightvalve | 57:f4819de54e7a | 2516 | // Dead Zone Cancellation (Mechanical Valve dead-zone) |
Lightvalve | 57:f4819de54e7a | 2517 | if (FLAG_VALVE_DEADZONE) { |
Lightvalve | 57:f4819de54e7a | 2518 | if (VALVE_PWM_RAW > 0) VALVE_PWM_RAW = VALVE_PWM_RAW + VALVE_DEADZONE_PLUS * mV_PER_pulse; // unit: mV |
Lightvalve | 57:f4819de54e7a | 2519 | else if (VALVE_PWM_RAW < 0) VALVE_PWM_RAW = VALVE_PWM_RAW + VALVE_DEADZONE_MINUS * mV_PER_pulse; // unit: mV |
Lightvalve | 57:f4819de54e7a | 2520 | |
Lightvalve | 57:f4819de54e7a | 2521 | VALVE_PWM_VALVE_DZ = VALVE_PWM_RAW + (double)VALVE_CENTER * mV_PER_pulse; // unit: mV |
Lightvalve | 57:f4819de54e7a | 2522 | |
Lightvalve | 57:f4819de54e7a | 2523 | } else { |
Lightvalve | 57:f4819de54e7a | 2524 | VALVE_PWM_VALVE_DZ = VALVE_PWM_RAW; |
Lightvalve | 57:f4819de54e7a | 2525 | } |
Lightvalve | 57:f4819de54e7a | 2526 | |
Lightvalve | 57:f4819de54e7a | 2527 | // Output Voltage Linearization |
Lightvalve | 57:f4819de54e7a | 2528 | double CUR_PWM_nonlin = VALVE_PWM_VALVE_DZ; // Unit : mV |
Lightvalve | 57:f4819de54e7a | 2529 | double CUR_PWM_lin = PWM_duty_byLT(CUR_PWM_nonlin); |
Lightvalve | 57:f4819de54e7a | 2530 | |
Lightvalve | 57:f4819de54e7a | 2531 | // Dead Zone Cancellation (Electrical dead-zone) |
Lightvalve | 57:f4819de54e7a | 2532 | if (CUR_PWM_lin > 0) V_out = (int) CUR_PWM_lin + 140; |
Lightvalve | 57:f4819de54e7a | 2533 | else if (CUR_PWM_lin < 0) V_out = (int) CUR_PWM_lin - 140; |
Lightvalve | 57:f4819de54e7a | 2534 | else V_out = CUR_PWM_lin; |
Lightvalve | 57:f4819de54e7a | 2535 | } |
Lightvalve | 58:2eade98630e2 | 2536 | |
Lightvalve | 58:2eade98630e2 | 2537 | |
Lightvalve | 14:8e7590227d22 | 2538 | |
jobuuu | 7:e9086c72bb22 | 2539 | /******************************************************* |
jobuuu | 7:e9086c72bb22 | 2540 | *** PWM |
jobuuu | 7:e9086c72bb22 | 2541 | ********************************************************/ |
Lightvalve | 49:e7bcfc244d40 | 2542 | if (V_out >= VALVE_VOLTAGE_LIMIT*1000.0f) { |
Lightvalve | 49:e7bcfc244d40 | 2543 | V_out = VALVE_VOLTAGE_LIMIT*1000.0f; |
Lightvalve | 49:e7bcfc244d40 | 2544 | } else if(V_out<=-VALVE_VOLTAGE_LIMIT*1000.0f) { |
Lightvalve | 49:e7bcfc244d40 | 2545 | V_out = -VALVE_VOLTAGE_LIMIT*1000.0f; |
Lightvalve | 27:a2254a485f23 | 2546 | } |
Lightvalve | 49:e7bcfc244d40 | 2547 | PWM_out= V_out/(SUPPLY_VOLTAGE*1000.0f); // Full duty : 12000.0mV |
Lightvalve | 13:747daba9cf59 | 2548 | |
Lightvalve | 19:23b7c1ad8683 | 2549 | // Saturation of output voltage to 12.0V |
Lightvalve | 30:8d561f16383b | 2550 | if(PWM_out > 1.0f) PWM_out=1.0f; |
Lightvalve | 30:8d561f16383b | 2551 | else if (PWM_out < -1.0f) PWM_out=-1.0f; |
Lightvalve | 13:747daba9cf59 | 2552 | |
Lightvalve | 30:8d561f16383b | 2553 | if (PWM_out>0.0f) { |
Lightvalve | 30:8d561f16383b | 2554 | dtc_v=0.0f; |
jobuuu | 1:e04e563be5ce | 2555 | dtc_w=PWM_out; |
jobuuu | 1:e04e563be5ce | 2556 | } else { |
jobuuu | 2:a1c0a37df760 | 2557 | dtc_v=-PWM_out; |
Lightvalve | 30:8d561f16383b | 2558 | dtc_w=0.0f; |
jobuuu | 1:e04e563be5ce | 2559 | } |
Lightvalve | 13:747daba9cf59 | 2560 | |
jobuuu | 1:e04e563be5ce | 2561 | //pwm |
Lightvalve | 30:8d561f16383b | 2562 | TIM4->CCR2 = (PWM_ARR)*(1.0f-dtc_v); |
Lightvalve | 30:8d561f16383b | 2563 | TIM4->CCR1 = (PWM_ARR)*(1.0f-dtc_w); |
Lightvalve | 61:bc8c8270f0ab | 2564 | |
Lightvalve | 61:bc8c8270f0ab | 2565 | |
Lightvalve | 57:f4819de54e7a | 2566 | if (TMR2_COUNT_CAN_TX % (int) ((int) TMR_FREQ_5k/CAN_FREQ) == 0) { |
Lightvalve | 20:806196fda269 | 2567 | |
Lightvalve | 54:647072f5307a | 2568 | // Position, Velocity, and Torque (ID:1200) |
Lightvalve | 56:6f50d9d3bfee | 2569 | if (flag_data_request[0] == HIGH) { |
Lightvalve | 57:f4819de54e7a | 2570 | if ((OPERATING_MODE & 0b01) == 0) { // Rotary Actuator |
Lightvalve | 54:647072f5307a | 2571 | if (SENSING_MODE == 0) { |
Lightvalve | 58:2eade98630e2 | 2572 | CAN_TX_POSITION_FT((int16_t) (pos.sen), (int16_t) (vel.sen/10.0f), (int16_t) (pres_A.sen*10.0f)); |
Lightvalve | 54:647072f5307a | 2573 | } else if (SENSING_MODE == 1) { |
Lightvalve | 58:2eade98630e2 | 2574 | CAN_TX_POSITION_PRESSURE((int16_t) (pos.sen), (int16_t) (vel.sen/10.0f), (int16_t) ((pres_A.sen)*5.0f), (int16_t) ((pres_B.sen)*5.0f)); |
Lightvalve | 54:647072f5307a | 2575 | } |
Lightvalve | 57:f4819de54e7a | 2576 | } else if ((OPERATING_MODE & 0b01) == 1) { // Linear Actuator |
Lightvalve | 54:647072f5307a | 2577 | if (SENSING_MODE == 0) { |
Lightvalve | 60:64181f1d3e60 | 2578 | CAN_TX_POSITION_FT((int16_t) (pos.sen/4.0f), (int16_t) (vel.sen/100.0f), (int16_t) (pres_A.sen)); |
Lightvalve | 54:647072f5307a | 2579 | } else if (SENSING_MODE == 1) { |
Lightvalve | 58:2eade98630e2 | 2580 | CAN_TX_POSITION_PRESSURE((int16_t) (pos.sen/4.0f), (int16_t) (vel.sen/100.0f), (int16_t) ((pres_A.sen)*5.0f), (int16_t) ((pres_B.sen)*5.0f)); |
Lightvalve | 54:647072f5307a | 2581 | } |
Lightvalve | 52:8ea76864368a | 2582 | } |
Lightvalve | 52:8ea76864368a | 2583 | } |
Lightvalve | 56:6f50d9d3bfee | 2584 | if (flag_data_request[1] == HIGH) { |
Lightvalve | 54:647072f5307a | 2585 | //valve position |
Lightvalve | 54:647072f5307a | 2586 | double t_value = 0; |
Lightvalve | 57:f4819de54e7a | 2587 | // if(value>=(float) VALVE_CENTER) { |
Lightvalve | 57:f4819de54e7a | 2588 | // t_value = 10000.0f*((double)value - (double)VALVE_CENTER)/((double)VALVE_MAX_POS - (double)VALVE_CENTER); |
Lightvalve | 57:f4819de54e7a | 2589 | // } else { |
Lightvalve | 57:f4819de54e7a | 2590 | // t_value = -10000.0f*((double)value - (double)VALVE_CENTER)/((double)VALVE_MIN_POS - (double)VALVE_CENTER); |
Lightvalve | 57:f4819de54e7a | 2591 | // } |
Lightvalve | 58:2eade98630e2 | 2592 | if(OPERATING_MODE==5) { |
Lightvalve | 57:f4819de54e7a | 2593 | t_value = (double) value; |
Lightvalve | 58:2eade98630e2 | 2594 | } else if(CURRENT_CONTROL_MODE==1) { |
Lightvalve | 57:f4819de54e7a | 2595 | t_value = cur.sen; |
Lightvalve | 58:2eade98630e2 | 2596 | } else { |
Lightvalve | 57:f4819de54e7a | 2597 | t_value = V_out; |
Lightvalve | 54:647072f5307a | 2598 | } |
Lightvalve | 60:64181f1d3e60 | 2599 | CAN_TX_TORQUE((int16_t) (t_value), (int16_t) (V_out)); //1300 |
Lightvalve | 54:647072f5307a | 2600 | } |
Lightvalve | 58:2eade98630e2 | 2601 | |
Lightvalve | 58:2eade98630e2 | 2602 | |
Lightvalve | 56:6f50d9d3bfee | 2603 | if (flag_data_request[2] == HIGH) { |
Lightvalve | 56:6f50d9d3bfee | 2604 | //pressure A and B |
Lightvalve | 57:f4819de54e7a | 2605 | CAN_TX_PRES((int16_t) (pres_A.sen), (int16_t) (pres_B.sen)); // CUR_PRES_X : 0(0bar)~4096(210bar) //1400 |
Lightvalve | 55:b25725257569 | 2606 | } |
Lightvalve | 58:2eade98630e2 | 2607 | |
Lightvalve | 57:f4819de54e7a | 2608 | //If it doesn't rest, below can can not work. |
Lightvalve | 57:f4819de54e7a | 2609 | for (can_rest = 0; can_rest < 10000; can_rest++) { |
Lightvalve | 57:f4819de54e7a | 2610 | ; |
Lightvalve | 57:f4819de54e7a | 2611 | } |
Lightvalve | 58:2eade98630e2 | 2612 | |
Lightvalve | 56:6f50d9d3bfee | 2613 | if (flag_data_request[3] == HIGH) { |
Lightvalve | 54:647072f5307a | 2614 | //PWM |
Lightvalve | 57:f4819de54e7a | 2615 | CAN_TX_PWM((int16_t) cur.sen); //1500 |
Lightvalve | 54:647072f5307a | 2616 | } |
Lightvalve | 65:a2d7c63419c2 | 2617 | if (flag_data_request[3] == LOW) { |
Lightvalve | 65:a2d7c63419c2 | 2618 | //PWM |
Lightvalve | 65:a2d7c63419c2 | 2619 | CAN_TX_PWM((int16_t) 79); //1500 |
Lightvalve | 65:a2d7c63419c2 | 2620 | } |
Lightvalve | 57:f4819de54e7a | 2621 | //for (i = 0; i < 10000; i++) { |
Lightvalve | 57:f4819de54e7a | 2622 | // ; |
Lightvalve | 57:f4819de54e7a | 2623 | // } |
Lightvalve | 56:6f50d9d3bfee | 2624 | if (flag_data_request[4] == HIGH) { |
Lightvalve | 54:647072f5307a | 2625 | //valve position |
Lightvalve | 57:f4819de54e7a | 2626 | CAN_TX_VALVE_POSITION((int16_t) (CAN_FREQ), (int16_t) (D_DAMPER), (int16_t) OPERATING_MODE); //1600 |
Lightvalve | 54:647072f5307a | 2627 | } |
Lightvalve | 20:806196fda269 | 2628 | |
Lightvalve | 54:647072f5307a | 2629 | // Others : Reference position, Reference FT, PWM, Current (ID:1300) |
Lightvalve | 52:8ea76864368a | 2630 | // if (flag_data_request[1] == HIGH) { |
Lightvalve | 52:8ea76864368a | 2631 | // CAN_TX_SOMETHING((int) (FORCE_VREF), (int16_t) (1), (int16_t) (2), (int16_t) (3)); |
Lightvalve | 52:8ea76864368a | 2632 | // } |
Lightvalve | 54:647072f5307a | 2633 | //if (flag_delay_test == 1){ |
Lightvalve | 58:2eade98630e2 | 2634 | //CAN_TX_PRES((int16_t) (0),(int16_t) torq_ref); |
Lightvalve | 54:647072f5307a | 2635 | //} |
Lightvalve | 52:8ea76864368a | 2636 | |
Lightvalve | 54:647072f5307a | 2637 | TMR2_COUNT_CAN_TX = 0; |
Lightvalve | 54:647072f5307a | 2638 | } |
Lightvalve | 54:647072f5307a | 2639 | TMR2_COUNT_CAN_TX++; |
Lightvalve | 52:8ea76864368a | 2640 | |
Lightvalve | 20:806196fda269 | 2641 | } |
Lightvalve | 52:8ea76864368a | 2642 | TIM3->SR = 0x0; // reset the status register |
Lightvalve | 52:8ea76864368a | 2643 | |
Lightvalve | 58:2eade98630e2 | 2644 | } |