Commit 4a753523 authored by Andrey Filippov's avatar Andrey Filippov

Minor bug fixing and testing

parent 7c786e91
...@@ -4296,17 +4296,17 @@ public class Interscene { ...@@ -4296,17 +4296,17 @@ public class Interscene {
for (int nscene = earliest_scene; nscene < quadCLTs.length; nscene++) { for (int nscene = earliest_scene; nscene < quadCLTs.length; nscene++) {
QuadCLT scene = quadCLTs[nscene]; QuadCLT scene = quadCLTs[nscene];
if (nscene == ref_index) { /// if (nscene == ref_index) {
scenes_xyzatr[nscene] = new double[2][3]; /// scenes_xyzatr[nscene] = new double[2][3];
scenes_xyzatr_dt[nscene] = new double[2][3]; /// scenes_xyzatr_dt[nscene] = new double[2][3];
} else { /// } else {
String ts = scene.getImageName(); String ts = scene.getImageName();
scenes_xyzatr[nscene] = new double [][] {ers_reference.getSceneXYZ(ts),ers_reference.getSceneATR(ts)}; scenes_xyzatr[nscene] = new double [][] {ers_reference.getSceneXYZ(ts),ers_reference.getSceneATR(ts)};
scenes_xyzatr_dt[nscene] = ers_reference.getSceneErsXYZATR_dt(ts); scenes_xyzatr_dt[nscene] = ers_reference.getSceneErsXYZATR_dt(ts);
if (scenes_xyzatr[nscene] != null) { if (scenes_xyzatr[nscene] != null) {
num_processed++; num_processed++;
} }
} /// }
} }
boolean use_processed = num_processed > 1; boolean use_processed = num_processed > 1;
...@@ -4341,19 +4341,19 @@ public class Interscene { ...@@ -4341,19 +4341,19 @@ public class Interscene {
ref_index, ref_index,
earliest_scene, // int start_scene, earliest_scene, // int start_scene,
quadCLTs.length-1, // int end1_scene, quadCLTs.length-1, // int end1_scene,
scenes_xyzatr, // double [][][] scenes_xyzatr, scenes_xyzatr, // double [][][] scenes_xyzatr, // 5.0
clt_parameters.ofp.lpf_series); // half_run_range); // double half_run_range clt_parameters.ofp.lpf_series); // half_run_range); // double half_run_range
} }
double [] quat_ims_cam = Imx5.quaternionImsToCam( /// double [] quat_ims_cam = Imx5.quaternionImsToCam(
ims_mount_atr, // new double[] {0, 0.13, 0}, /// ims_mount_atr, // new double[] {0, 0.13, 0},
ims_ortho); /// ims_ortho);
Did_ins_2 d2_ref = quadCLTs[ref_index].did_ins_2; Did_ins_2 d2_ref = quadCLTs[ref_index].did_ins_2;
double [] cam_quat_ref =Imx5.quaternionImsToCam(d2_ref.getQn2b() , double [] cam_quat_ref =Imx5.quaternionImsToCam(d2_ref.getQn2b() ,
ims_mount_atr, // new double[] {0, 0.13, 0}, ims_mount_atr, // new double[] {0, 0.13, 0},
ims_ortho); ims_ortho);
double [] ref_abs_atr = Imx5.quatToCamAtr(cam_quat_ref); double [] ref_abs_atr = Imx5.quatToCamAtr(cam_quat_ref); //
double [][] ims_ref_xyzatr = {ZERO3, ref_abs_atr}; double [][] ims_ref_xyzatr = {ZERO3, ref_abs_atr};
...@@ -4362,7 +4362,7 @@ public class Interscene { ...@@ -4362,7 +4362,7 @@ public class Interscene {
ims_ortho); ims_ortho);
double [] ref_abs_atr_enu = Imx5.quatToCamAtr(cam_quat_ref_enu); double [] ref_abs_atr_enu = Imx5.quatToCamAtr(cam_quat_ref_enu);
double [][] ims_ref_xyzatr_enu = {ZERO3, ref_abs_atr_enu}; double [][] ims_ref_xyzatr_enu = {ZERO3, ref_abs_atr_enu};
double [][][] scenes_dxyzatr = QuadCLTCPU.getDxyzatrIms( double [][][] scenes_dxyzatr = QuadCLTCPU.getDxyzatrIms( // velocities and omegas from IMU
clt_parameters, // CLTParameters clt_parameters, clt_parameters, // CLTParameters clt_parameters,
quadCLTs, // QuadCLT[] quadCLTs, quadCLTs, // QuadCLT[] quadCLTs,
false); // boolean scale) false); // boolean scale)
...@@ -4385,12 +4385,15 @@ public class Interscene { ...@@ -4385,12 +4385,15 @@ public class Interscene {
sb.append(nscene+"\t"+timestamp); sb.append(nscene+"\t"+timestamp);
if (use_processed) { if (use_processed) {
if (scenes_xyzatr[nscene] != null) { if (scenes_xyzatr[nscene] != null) {
// x,y,z - scene position in reference scene frame (reference scene is all 0-s)
sb.append("\t"+scenes_xyzatr[nscene][0][0]+"\t"+scenes_xyzatr[nscene][0][1]+"\t"+scenes_xyzatr[nscene][0][2]); sb.append("\t"+scenes_xyzatr[nscene][0][0]+"\t"+scenes_xyzatr[nscene][0][1]+"\t"+scenes_xyzatr[nscene][0][2]);
// a,tilt,roll - scene orientation in reference scene frame (reference scene is all 0-s)
sb.append("\t"+scenes_xyzatr[nscene][1][0]+"\t"+scenes_xyzatr[nscene][1][1]+"\t"+scenes_xyzatr[nscene][1][2]); sb.append("\t"+scenes_xyzatr[nscene][1][0]+"\t"+scenes_xyzatr[nscene][1][1]+"\t"+scenes_xyzatr[nscene][1][2]);
// TODO: try saved, not calculated velocities! // Vx, Vy, Vz - linear velocities calculated from coordinates by running average (now +/- 5 scenes
sb.append("\t"+dxyzatr_dt[nscene][0][0]+"\t"+dxyzatr_dt[nscene][0][1]+"\t"+dxyzatr_dt[nscene][0][2]); sb.append("\t"+dxyzatr_dt[nscene][0][0]+"\t"+dxyzatr_dt[nscene][0][1]+"\t"+dxyzatr_dt[nscene][0][2]);
// Va, Vt, Vr - angular velocities calculated from coordinates by running average (now +/- 5 scenes
sb.append("\t"+dxyzatr_dt[nscene][1][0]+"\t"+dxyzatr_dt[nscene][1][1]+"\t"+dxyzatr_dt[nscene][1][2]); sb.append("\t"+dxyzatr_dt[nscene][1][0]+"\t"+dxyzatr_dt[nscene][1][1]+"\t"+dxyzatr_dt[nscene][1][2]);
// TODO: try saved, not calculated velocities - here they are:
sb.append("\t"+scenes_xyzatr_dt[nscene][0][0]+"\t"+scenes_xyzatr_dt[nscene][0][1]+"\t"+scenes_xyzatr_dt[nscene][0][2]); sb.append("\t"+scenes_xyzatr_dt[nscene][0][0]+"\t"+scenes_xyzatr_dt[nscene][0][1]+"\t"+scenes_xyzatr_dt[nscene][0][2]);
sb.append("\t"+scenes_xyzatr_dt[nscene][1][0]+"\t"+scenes_xyzatr_dt[nscene][1][1]+"\t"+scenes_xyzatr_dt[nscene][1][2]); sb.append("\t"+scenes_xyzatr_dt[nscene][1][0]+"\t"+scenes_xyzatr_dt[nscene][1][1]+"\t"+scenes_xyzatr_dt[nscene][1][2]);
} else { } else {
......
...@@ -503,7 +503,7 @@ public class QuadCLTCPU { ...@@ -503,7 +503,7 @@ public class QuadCLTCPU {
} }
double [] ref_abs_atr_enu = Imx5.quatToCamAtr(cam_quat_ref_enu); double [] ref_abs_atr_enu = Imx5.quatToCamAtr(cam_quat_ref_enu);
double [][] ims_ref_xyzatr_enu = {ZERO3, ref_abs_atr_enu}; double [][] ims_ref_xyzatr_enu = {ZERO3, ref_abs_atr_enu};
double [][] last_corr_xyzatr = {ZERO3,ZERO3}; // double [][] last_corr_xyzatr = {ZERO3,ZERO3};
for (int nscene = 0; nscene < quadCLTs.length; nscene++) if (quadCLTs[nscene] != null) { for (int nscene = 0; nscene < quadCLTs.length; nscene++) if (quadCLTs[nscene] != null) {
QuadCLT scene = quadCLTs[nscene]; QuadCLT scene = quadCLTs[nscene];
Did_ins_2 d2 = scene.did_ins_2; Did_ins_2 d2 = scene.did_ins_2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment