File indexing completed on 2024-10-17 22:59:02
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 my $propErr_M = 6;
0332 $propErr = new GenMul::MatrixSym('name' => 'a',
0333 'M' => $propErr_M);
0334
0335 my $propErrT_M = 6;
0336 $propErrT = new GenMul::MatrixTranspose($propErr);
0337
0338
0339
0340
0341 $resErrInv = new GenMul::MatrixSym('name'=>'b', 'M'=>3, 'N'=>3);
0342
0343 $kalmanGain = new GenMul::Matrix('name'=>'c', 'M' => 6, 'N' => 3);
0344
0345 {
0346 my $m_kg = new GenMul::Multiply('no_size_check' => 1);
0347
0348 $m_kg->dump_multiply_std_and_intrinsic("upParam_MultKalmanGain.ah",
0349 $propErr, $resErrInv, $kalmanGain);
0350 }
0351
0352
0353
0354
0355 my $simil_M = 6;
0356 $simil = new GenMul::MatrixSym('name'=>'a', 'M'=>$simil_M);
0357 $simil->set_pattern(<<"FNORD");
0358 x
0359 x x
0360 x x x
0361 0 0 0 0
0362 0 0 0 0 0
0363 0 0 0 0 0 0
0364 FNORD
0365
0366 $propErr->{name} = 'b';
0367
0368 my $temp_simil_x_propErr_M = 6;
0369 my $temp_simil_x_propErr_N = 6;
0370 $temp_simil_x_propErr = new GenMul::Matrix('name'=>'c',
0371 'M'=>$temp_simil_x_propErr_M,
0372 'N'=>$temp_simil_x_propErr_N);
0373
0374 $m->dump_multiply_std_and_intrinsic("upParam_simil_x_propErr.ah",
0375 $simil, $propErr, $temp_simil_x_propErr);
0376
0377 $temp_simil_x_propErr->{name} = 'b';
0378 $temp_simil_x_propErr->set_pattern(<<"FNORD");
0379 x x x x x x
0380 x x x x x x
0381 x x x x x x
0382 0 0 0 0 0 0
0383 0 0 0 0 0 0
0384 0 0 0 0 0 0
0385 FNORD
0386
0387
0388
0389
0390
0391 $temp_propErrT_x_simil_propErr = new GenMul::MatrixSym('name'=>'c', 'M'=>$propErrT_M);
0392
0393 $m->dump_multiply_std_and_intrinsic("upParam_propErrT_x_simil_propErr.ah",
0394 $propErrT, $temp_simil_x_propErr, $temp_propErrT_x_simil_propErr);
0395
0396
0397 {
0398 my $temp = new GenMul::MatrixSym('name' => 'c', 'M' => 6);
0399
0400 my $m_kg = new GenMul::Multiply('no_size_check' => 1);
0401
0402 $kalmanGain->{name} = 'a';
0403
0404 $m_kg->dump_multiply_std_and_intrinsic("upParam_kalmanGain_x_propErr.ah",
0405 $kalmanGain, $propErr, $temp);
0406 }
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418 $jac_cu2l = new GenMul::Matrix('name'=>'a', 'M'=>5, 'N'=>5);
0419 $jac_cu2l->set_pattern(<<"FNORD");
0420 1 0 0 0 0
0421 0 x x x x
0422 0 x x x x
0423 0 0 0 x x
0424 0 0 0 x x
0425 FNORD
0426
0427 $jac_c2cu = new GenMul::Matrix('name'=>'b', 'M'=>5, 'N'=>6);
0428 $jac_c2cu->set_pattern(<<"FNORD");
0429 0 0 0 x 0 x
0430 0 0 0 0 0 x
0431 0 0 0 0 1 0
0432 x x 0 0 0 0
0433 x x x 0 0 0
0434 FNORD
0435
0436 $jac_c2l = new GenMul::Matrix('name'=>'c', 'M'=>5, 'N'=>6);
0437
0438 $m = new GenMul::Multiply;
0439
0440 $m->dump_multiply_std_and_intrinsic("JacCCS2Loc.ah",
0441 $jac_cu2l, $jac_c2cu, $jac_c2l);
0442
0443
0444
0445
0446
0447 $jac_c2l = new GenMul::Matrix('name'=>'a', 'M'=>5, 'N'=>6);
0448 $jac_c2l->set_pattern(<<"FNORD");
0449 0 0 0 x 0 x
0450 x x x 0 x x
0451 x x x 0 x x
0452 x x x 0 0 0
0453 x x x 0 0 0
0454 FNORD
0455
0456 $psErr = new GenMul::MatrixSym('name'=>'b', 'M'=>6, 'N'=>6);
0457
0458 $temp56 = new GenMul::Matrix('name'=>'c', 'M'=>5, 'N'=>6);
0459
0460 $jac_c2lT = new GenMul::MatrixTranspose($jac_c2l);
0461 $jac_c2lT->print_info();
0462 $jac_c2lT->print_pattern();
0463
0464
0465
0466 $m = new GenMul::Multiply;
0467
0468 $m->dump_multiply_std_and_intrinsic("PsErrLoc.ah",
0469 $jac_c2l, $psErr, $temp56);
0470
0471 $locErr = new GenMul::MatrixSym('name'=>'c', 'M'=>5, 'N'=>5);
0472
0473 $temp56->{name} = 'b';
0474
0475 $m->dump_multiply_std_and_intrinsic("PsErrLocTransp.ah",
0476 $temp56, $jac_c2lT, $locErr);
0477
0478
0479
0480
0481
0482 $imkh = new GenMul::Matrix('name'=>'a', 'M'=>5, 'N'=>5);
0483 $imkh->set_pattern(<<"FNORD");
0484 1 0 0 x x
0485 0 1 0 x x
0486 0 0 1 x x
0487 0 0 0 x x
0488 0 0 0 x x
0489 FNORD
0490
0491 $pserrloc = new GenMul::MatrixSym('name'=>'b', 'M'=>5, 'N'=>5);
0492
0493 $pserrlocupd = new GenMul::MatrixSym('name'=>'c', 'M'=>5, 'N'=>5);
0494
0495 $m = new GenMul::Multiply;
0496
0497 $m->dump_multiply_std_and_intrinsic("PsErrLocUpd.ah",
0498 $imkh, $pserrloc, $pserrlocupd);
0499
0500
0501
0502
0503
0504 $jc2ccs = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>5);
0505 $jc2ccs->set_pattern(<<"FNORD");
0506 0 0 0 x x
0507 0 0 0 x x
0508 0 0 0 0 x
0509 x x 0 0 0
0510 0 0 1 0 0
0511 0 x 0 0 0
0512 FNORD
0513
0514 $jl2c = new GenMul::Matrix('name'=>'b', 'M'=>5, 'N'=>5);
0515 $jl2c->set_pattern(<<"FNORD");
0516 1 0 0 0 0
0517 0 x x 0 0
0518 0 x x x x
0519 0 0 0 x x
0520 0 0 0 x x
0521 FNORD
0522
0523 $jl2ccs = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>5);
0524
0525 $m = new GenMul::Multiply;
0526
0527 $m->dump_multiply_std_and_intrinsic("JacLoc2CCS.ah",
0528 $jc2ccs, $jl2c, $jl2ccs);
0529
0530
0531
0532
0533
0534 $jacl2ccs = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>5);
0535 $jacl2ccs->set_pattern(<<"FNORD");
0536 0 0 0 x x
0537 0 0 0 x x
0538 0 0 0 x x
0539 x x x 0 0
0540 0 x x x x
0541 0 x x 0 0
0542 FNORD
0543
0544 $psErrLU = new GenMul::MatrixSym('name'=>'b', 'M'=>5, 'N'=>5);
0545
0546 $temp65 = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>5);
0547
0548 $jacl2ccsT = new GenMul::MatrixTranspose($jacl2ccs);
0549 $jacl2ccsT->print_info();
0550 $jacl2ccsT->print_pattern();
0551
0552
0553
0554 $m = new GenMul::Multiply;
0555
0556 $m->dump_multiply_std_and_intrinsic("OutErrCCS.ah",
0557 $jacl2ccs, $psErrLU, $temp65);
0558
0559 $outErr = new GenMul::MatrixSym('name'=>'c', 'M'=>6, 'N'=>6);
0560
0561 $temp65->{name} = 'b';
0562
0563 $m->dump_multiply_std_and_intrinsic("OutErrCCSTransp.ah",
0564 $temp65, $jacl2ccsT, $outErr);
0565
0566
0567
0568
0569
0570
0571
0572
0573 my $DIM = 6;
0574
0575 $errProp = new GenMul::Matrix('name'=>'a', 'M'=>$DIM, 'N'=>$DIM);
0576 $errProp->set_pattern(<<"FNORD");
0577 x x x x x x
0578 x x x x x x
0579 x x x x x x
0580 0 0 0 1 x x
0581 x x x x x x
0582 0 0 0 0 x x
0583 FNORD
0584
0585 $outErr = new GenMul::MatrixSym('name'=>'b', 'M'=>$DIM, 'N'=>$DIM);
0586
0587 $temp = new GenMul::Matrix('name'=>'c', 'M'=>$DIM, 'N'=>$DIM);
0588
0589
0590 $errPropT = new GenMul::MatrixTranspose($errProp);
0591 $errPropT->print_info();
0592 $errPropT->print_pattern();
0593
0594
0595
0596 $m = new GenMul::Multiply;
0597
0598
0599
0600 $m->dump_multiply_std_and_intrinsic("MultHelixPlaneProp.ah",
0601 $errProp, $outErr, $temp);
0602
0603 $temp ->{name} = 'b';
0604 $outErr->{name} = 'c';
0605
0606 $m->dump_multiply_std_and_intrinsic("MultHelixPlanePropTransp.ah",
0607 $temp, $errPropT, $outErr);
0608
0609
0610
0611
0612
0613 $jacCurv2CCS = new GenMul::Matrix('name'=>'a', 'M'=>6, 'N'=>5);
0614 $jacCurv2CCS->set_pattern(<<"FNORD");
0615 0 0 0 x x
0616 0 0 0 x x
0617 0 0 0 0 x
0618 x x 0 0 0
0619 0 0 1 0 0
0620 0 x 0 0 0
0621 FNORD
0622
0623 $errorPropCurv = new GenMul::Matrix('name'=>'b', 'M'=>5, 'N'=>5);
0624 $errorPropCurv->set_pattern(<<"FNORD");
0625 1 0 0 0 0
0626 0 x x 0 0
0627 x x x x x
0628 x x x x x
0629 x x x x x
0630 FNORD
0631
0632 $temp = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>5);
0633
0634
0635
0636 $m = new GenMul::Multiply;
0637
0638
0639
0640 $m->dump_multiply_std_and_intrinsic("JacErrPropCurv1.ah",
0641 $jacCurv2CCS, $errorPropCurv, $temp);
0642
0643 $temp ->{name} = 'a';
0644
0645 $jacCCS2Curv = new GenMul::Matrix('name'=>'b', 'M'=>5, 'N'=>6);
0646 $jacCCS2Curv->set_pattern(<<"FNORD");
0647 0 0 0 x 0 x
0648 0 0 0 0 0 x
0649 0 0 0 0 1 0
0650 x x 0 0 0 0
0651 x x x 0 0 0
0652 FNORD
0653
0654 $outErrProp = new GenMul::Matrix('name'=>'c', 'M'=>6, 'N'=>6);
0655
0656 $m->dump_multiply_std_and_intrinsic("JacErrPropCurv2.ah",
0657 $temp, $jacCCS2Curv, $outErrProp);