File indexing completed on 2024-04-06 12:28:17
0001
0002
0003 use lib "../Matriplex";
0004
0005 use GenMul;
0006 use warnings;
0007
0008
0009
0010
0011 $A = new GenMul::Matrix('name'=>'a', 'M'=>3, 'N'=>3);
0012
0013 $B = new GenMul::Matrix('name'=>'b', 'M'=>3, 'N'=>1);
0014
0015 $C = new GenMul::Matrix('name'=>'c', 'M'=>3, 'N'=>1);
0016
0017 $m = new GenMul::Multiply;
0018
0019 $m->dump_multiply_std_and_intrinsic("CFMatrix33Vector3.ah",
0020 $A, $B, $C);
0021
0022
0023
0024
0025
0026 $jac_ccs = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>6);
0027 $jac_ccs->set_pattern(<<"FNORD");
0028 1 0 0 0 0 0
0029 0 1 0 0 0 0
0030 0 0 1 0 0 0
0031 0 0 0 x x 0
0032 0 0 0 x x 0
0033 0 0 0 x x x
0034 FNORD
0035
0036 $propErr = new GenMul::MatrixSym('name'=>'b', 'M'=>6, 'N'=>6);
0037
0038 $temp = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>6);
0039
0040 $m = new GenMul::Multiply;
0041
0042 $m->dump_multiply_std_and_intrinsic("CCSErr.ah",
0043 $jac_ccs, $propErr, $temp);
0044
0045 $jac_ccsT = new GenMul::MatrixTranspose($jac_ccs);
0046 $propErr_ccs = new GenMul::MatrixSym('name'=>'c', 'M'=>6, 'N'=>6);
0047 $temp ->{name} = 'b';
0048
0049 $m->dump_multiply_std_and_intrinsic("CCSErrTransp.ah",
0050 $temp, $jac_ccsT, $propErr_ccs);
0051
0052
0053
0054
0055
0056 $jac_back_ccs = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>6);
0057 $jac_back_ccs->set_pattern(<<"FNORD");
0058 1 0 0 0 0 0
0059 0 1 0 0 0 0
0060 0 0 1 0 0 0
0061 0 0 0 x x 0
0062 0 0 0 x x 0
0063 0 0 0 x 0 x
0064 FNORD
0065
0066 $outErr_ccs = new GenMul::MatrixSym('name'=>'b', 'M'=>6, 'N'=>6);
0067
0068 $temp = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>6);
0069
0070 $m = new GenMul::Multiply;
0071
0072 $m->dump_multiply_std_and_intrinsic("CartesianErr.ah",
0073 $jac_back_ccs, $outErr_ccs, $temp);
0074
0075 $jac_back_ccsT = new GenMul::MatrixTranspose($jac_back_ccs);
0076 $outErr = new GenMul::MatrixSym('name'=>'c', 'M'=>6, 'N'=>6);
0077 $temp ->{name} = 'b';
0078
0079 $m->dump_multiply_std_and_intrinsic("CartesianErrTransp.ah",
0080 $temp, $jac_back_ccsT, $outErr);
0081
0082
0083
0084
0085
0086 $rot = new GenMul::Matrix('name'=>'a', 'M'=>3, 'N'=>3);
0087 $rot->set_pattern(<<"FNORD");
0088 x 0 x
0089 x 0 x
0090 0 1 0
0091 FNORD
0092
0093 $resErr_loc = new GenMul::MatrixSym('name'=>'b', 'M'=>3, 'N'=>3);
0094
0095 $temp = new GenMul::Matrix('name'=>'c', 'M'=>3, 'N'=>3);
0096
0097 $m = new GenMul::Multiply;
0098
0099 $m->dump_multiply_std_and_intrinsic("KalmanHTG.ah",
0100 $rot, $resErr_loc, $temp);
0101
0102
0103
0104
0105
0106
0107 $propErr_ccs = new GenMul::MatrixSym('name'=>'a', 'M'=>6, 'N'=>6);
0108
0109 $resErrTmpLH = new GenMul::Matrix('name'=>'b', 'M'=>6, 'N'=>3);
0110 $resErrTmpLH->set_pattern(<<"FNORD");
0111 x x 0
0112 x x 0
0113 x x 0
0114 0 0 0
0115 0 0 0
0116 0 0 0
0117 FNORD
0118
0119 $K = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>3);
0120
0121 $m = new GenMul::Multiply;
0122
0123 $m->dump_multiply_std_and_intrinsic("KalmanGain.ah",
0124 $propErr_ccs, $resErrTmpLH, $K);
0125
0126
0127
0128
0129 $propErr = new GenMul::MatrixSym('name'=>'a', 'M'=>6, 'N'=>6);
0130
0131 $resErr2x2 = new GenMul::MatrixSym('name'=>'b', 'M'=>2, 'N'=>2);
0132
0133 $K = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>2);
0134
0135 {
0136 my $m_kg = new GenMul::Multiply('no_size_check' => 1);
0137
0138 $m_kg->dump_multiply_std_and_intrinsic("KalmanGain62.ah",
0139 $propErr, $resErr2x2, $K);
0140 }
0141
0142
0143
0144
0145
0146 $K = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>3);
0147 $K->set_pattern(<<"FNORD");
0148 x x 0
0149 x x 0
0150 x x 0
0151 x x 0
0152 x x 0
0153 x x 0
0154 FNORD
0155
0156 $H = new GenMul::Matrix('name'=>'b', 'M'=>3, 'N'=>6);
0157 $H->set_pattern(<<"FNORD");
0158 x x 0 0 0 0
0159 0 0 1 0 0 0
0160 x x 0 0 0 0
0161 FNORD
0162
0163 $KH = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>6);
0164
0165 $m = new GenMul::Multiply;
0166
0167 $m->dump_multiply_std_and_intrinsic("KH.ah",
0168 $K, $H, $KH);
0169
0170
0171
0172
0173
0174 $KH = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>6);
0175 $KH->set_pattern(<<"FNORD");
0176 x x x 0 0 0
0177 x x x 0 0 0
0178 x x x 0 0 0
0179 x x x 0 0 0
0180 x x x 0 0 0
0181 x x x 0 0 0
0182 FNORD
0183
0184 $propErr_ccs = new GenMul::MatrixSym('name'=>'b', 'M'=>6, 'N'=>6);
0185
0186 $temp = new GenMul::MatrixSym('name'=>'c', 'M'=>6, 'N'=>6);
0187
0188 $m = new GenMul::Multiply;
0189
0190 $m->dump_multiply_std_and_intrinsic("KHC.ah",
0191 $KH, $propErr_ccs, $temp);
0192
0193
0194
0195
0196
0197
0198 $KH = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>2);
0199 $KH->set_pattern(<<"FNORD");
0200 x x
0201 x x
0202 x x
0203 x x
0204 x x
0205 x x
0206 FNORD
0207
0208 $propErr = new GenMul::MatrixSym('name'=>'b', 'M'=>6, 'N'=>6);
0209
0210 $temp = new GenMul::MatrixSym('name'=>'c', 'M'=>6, 'N'=>6);
0211
0212 {
0213 my $m_kg = new GenMul::Multiply('no_size_check' => 1);
0214
0215 $m_kg->dump_multiply_std_and_intrinsic("K62HC.ah",
0216 $KH, $propErr, $temp);
0217 }
0218
0219
0220
0221
0222
0223
0224 $rotT = new GenMul::Matrix('name'=>'a', 'M'=>3, 'N'=>3);
0225 $rotT->set_pattern(<<"FNORD");
0226 x x 0
0227 0 0 1
0228 x x 0
0229 FNORD
0230
0231 $resErr_glo = new GenMul::MatrixSym('name'=>'b', 'M'=>3, 'N'=>3);
0232
0233 $temp = new GenMul::Matrix('name'=>'c', 'M'=>3, 'N'=>3);
0234
0235 $m = new GenMul::Multiply;
0236
0237 $m->dump_multiply_std_and_intrinsic("ProjectResErr.ah",
0238 $rotT, $resErr_glo, $temp);
0239
0240 $roTT = new GenMul::MatrixTranspose($rotT);
0241 $resErr_loc = new GenMul::MatrixSym('name'=>'c', 'M'=>3, 'N'=>3);
0242 $temp ->{name} = 'b';
0243
0244 $m->dump_multiply_std_and_intrinsic("ProjectResErrTransp.ah",
0245 $temp, $roTT, $resErr_loc);
0246
0247
0248
0249
0250
0251
0252
0253
0254 my $DIM = 6;
0255
0256 $errProp = new GenMul::Matrix('name'=>'a', 'M'=>$DIM, 'N'=>$DIM);
0257 $errProp->set_pattern(<<"FNORD");
0258 x x 0 x x 0
0259 x x 0 x x 0
0260 x x 1 x x x
0261 x x 0 x x 0
0262 x x 0 x x 0
0263 0 0 0 0 0 1
0264 FNORD
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274 $outErr = new GenMul::MatrixSym('name'=>'b', 'M'=>$DIM, 'N'=>$DIM);
0275
0276 $temp = new GenMul::Matrix('name'=>'c', 'M'=>$DIM, 'N'=>$DIM);
0277
0278
0279 $errPropT = new GenMul::MatrixTranspose($errProp);
0280 $errPropT->print_info();
0281 $errPropT->print_pattern();
0282
0283
0284
0285 $m = new GenMul::Multiply;
0286
0287
0288
0289 $m->dump_multiply_std_and_intrinsic("MultHelixProp.ah",
0290 $errProp, $outErr, $temp);
0291
0292 $temp ->{name} = 'b';
0293 $outErr->{name} = 'c';
0294
0295
0296 $m->dump_multiply_std_and_intrinsic("MultHelixPropTransp.ah",
0297 $temp, $errPropT, $outErr);
0298
0299
0300
0301
0302
0303 $errProp->set_pattern(<<"FNORD");
0304 1 0 x x x x
0305 0 1 x x x x
0306 0 0 0 0 0 0
0307 0 0 0 1 0 0
0308 0 0 x x 1 x
0309 0 0 0 0 0 1
0310 FNORD
0311
0312 $temp ->{name} = 'c';
0313 $outErr->{name} = 'b';
0314
0315 $errPropT = new GenMul::MatrixTranspose($errProp);
0316 $m->dump_multiply_std_and_intrinsic("MultHelixPropEndcap.ah",
0317 $errProp, $outErr, $temp);
0318
0319 $temp ->{name} = 'b';
0320 $outErr->{name} = 'c';
0321
0322
0323 $m->dump_multiply_std_and_intrinsic("MultHelixPropTranspEndcap.ah",
0324 $temp, $errPropT, $outErr);
0325
0326
0327
0328
0329
0330
0331
0332 my $propErr_M = 6;
0333 $propErr = new GenMul::MatrixSym('name' => 'a',
0334 'M' => $propErr_M);
0335
0336 my $propErrT_M = 6;
0337 $propErrT = new GenMul::MatrixTranspose($propErr);
0338
0339
0340
0341
0342 $resErrInv = new GenMul::MatrixSym('name'=>'b', 'M'=>3, 'N'=>3);
0343
0344 $kalmanGain = new GenMul::Matrix('name'=>'c', 'M' => 6, 'N' => 3);
0345
0346 {
0347 my $m_kg = new GenMul::Multiply('no_size_check' => 1);
0348
0349 $m_kg->dump_multiply_std_and_intrinsic("upParam_MultKalmanGain.ah",
0350 $propErr, $resErrInv, $kalmanGain);
0351 }
0352
0353
0354
0355
0356 my $simil_M = 6;
0357 $simil = new GenMul::MatrixSym('name'=>'a', 'M'=>$simil_M);
0358 $simil->set_pattern(<<"FNORD");
0359 x
0360 x x
0361 x x x
0362 0 0 0 0
0363 0 0 0 0 0
0364 0 0 0 0 0 0
0365 FNORD
0366
0367 $propErr->{name} = 'b';
0368
0369 my $temp_simil_x_propErr_M = 6;
0370 my $temp_simil_x_propErr_N = 6;
0371 $temp_simil_x_propErr = new GenMul::Matrix('name'=>'c',
0372 'M'=>$temp_simil_x_propErr_M,
0373 'N'=>$temp_simil_x_propErr_N);
0374
0375 $m->dump_multiply_std_and_intrinsic("upParam_simil_x_propErr.ah",
0376 $simil, $propErr, $temp_simil_x_propErr);
0377
0378 $temp_simil_x_propErr->{name} = 'b';
0379 $temp_simil_x_propErr->set_pattern(<<"FNORD");
0380 x x x x x x
0381 x x x x x x
0382 x x x x x x
0383 0 0 0 0 0 0
0384 0 0 0 0 0 0
0385 0 0 0 0 0 0
0386 FNORD
0387
0388
0389
0390
0391
0392 $temp_propErrT_x_simil_propErr = new GenMul::MatrixSym('name'=>'c', 'M'=>$propErrT_M);
0393
0394 $m->dump_multiply_std_and_intrinsic("upParam_propErrT_x_simil_propErr.ah",
0395 $propErrT, $temp_simil_x_propErr, $temp_propErrT_x_simil_propErr);
0396
0397
0398 {
0399 my $temp = new GenMul::MatrixSym('name' => 'c', 'M' => 6);
0400
0401 my $m_kg = new GenMul::Multiply('no_size_check' => 1);
0402
0403 $kalmanGain->{name} = 'a';
0404
0405 $m_kg->dump_multiply_std_and_intrinsic("upParam_kalmanGain_x_propErr.ah",
0406 $kalmanGain, $propErr, $temp);
0407 }