Commit 99bfce50 authored by Andrey Filippov's avatar Andrey Filippov

target icon changes for known targets

parent 1433d7a0
...@@ -1721,8 +1721,10 @@ public class EyesisCorrectionParameters { ...@@ -1721,8 +1721,10 @@ public class EyesisCorrectionParameters {
ArrayList<String> extras = new ArrayList<String>(); ArrayList<String> extras = new ArrayList<String>();
for (int i= 3; i < tokens.length; i++) { for (int i= 3; i < tokens.length; i++) {
extras.add(tokens[i]); extras.add(tokens[i]);
System.out.print("tokens ["+i+"] = "+tokens[i]+", ");
} }
extra_map.put(dir_name, extras); extra_map.put(dir_name, extras);
System.out.println();
} }
break parse_set; break parse_set;
} }
......
...@@ -241,6 +241,16 @@ public class UasLogReader { ...@@ -241,6 +241,16 @@ public class UasLogReader {
return getUasPxPyD(timestamp); return getUasPxPyD(timestamp);
} }
public double [] getUasPxPyDRange (
String stimestamp) {
double [] uasPxPyD = getUasPxPyD (stimestamp);
if (uasPxPyD == null) {
return null;
}
double range = getUasRange(stimestamp);
return new double[] {uasPxPyD[0],uasPxPyD[1],uasPxPyD[2], range};
}
public double [] getUasPxPyD ( public double [] getUasPxPyD (
double timestamp) { double timestamp) {
...@@ -259,6 +269,18 @@ public class UasLogReader { ...@@ -259,6 +269,18 @@ public class UasLogReader {
atr); // double [] camera_atr); // camera orientation relative to world frame atr); // double [] camera_atr); // camera orientation relative to world frame
return pXpYD; return pXpYD;
} }
public double getUasRange(double timestamp) {
double [] ned = getNED(timestamp);
return Math.sqrt(ned[0]*ned[0]+ned[1]*ned[1]+ned[2]*ned[2]);
}
public double getUasRange(String stimestamp) {
double timestamp = Double.parseDouble(stimestamp.replace("_", "."));
return getUasRange(timestamp);
}
//
public static void testUasLogReader( public static void testUasLogReader(
String filePath, String filePath,
......
...@@ -783,6 +783,9 @@ min_str_neib_fpn 0.35 ...@@ -783,6 +783,9 @@ min_str_neib_fpn 0.35
public boolean cuas_mask_round = true; public boolean cuas_mask_round = true;
public int cuas_target_type = 0; // 0 - unknown, 1 - known, 2 - friend, 3 - foe public int cuas_target_type = 0; // 0 - unknown, 1 - known, 2 - friend, 3 - foe
public int cuas_known_type = 2; // 0 - unknown, 1 - known, 2 - friend, 3 - foe
public double cuas_known_err = 20; // pix, mark as "identified" when closer to the flight log position
public double cuas_input_range = 5; public double cuas_input_range = 5;
public boolean cuas_scale2x = true; public boolean cuas_scale2x = true;
public boolean cuas_ra_background = true; // apply running average to the background of the moving targets (false - use high-noise no-averaged images public boolean cuas_ra_background = true; // apply running average to the background of the moving targets (false - use high-noise no-averaged images
...@@ -811,8 +814,7 @@ min_str_neib_fpn 0.35 ...@@ -811,8 +814,7 @@ min_str_neib_fpn 0.35
public int cuas_py0 = 386; // pixel with known elevation public int cuas_py0 = 386; // pixel with known elevation
public double cuas_az0 = 201.5; // degrees for cuas_px0; public double cuas_az0 = 201.5; // degrees for cuas_px0;
public double cuas_el0 = 0.0; // degrees for cuas_px0; public double cuas_el0 = 0.0; // degrees for cuas_px0;
public boolean cuas_show_true_rng = true; // show true range (from the flight log)
public boolean cuas_debug = true; // save debug images (and show them if not in batch mode) public boolean cuas_debug = true; // save debug images (and show them if not in batch mode)
public boolean cuas_step_debug = true; // save debug images during per-step cuas recalculation (and show them if not in batch mode) public boolean cuas_step_debug = true; // save debug images during per-step cuas recalculation (and show them if not in batch mode)
...@@ -2378,8 +2380,12 @@ min_str_neib_fpn 0.35 ...@@ -2378,8 +2380,12 @@ min_str_neib_fpn 0.35
gd.addCheckbox ("Mask round", this.cuas_mask_round, gd.addCheckbox ("Mask round", this.cuas_mask_round,
"Use round mask. Unchesked - use sharp square mask without any transition."); "Use round mask. Unchesked - use sharp square mask without any transition.");
gd.addNumericField("Targets icon type", this.cuas_target_type, 0,3,"", gd.addNumericField("Unidentified targets icon type", this.cuas_target_type, 0,3,"",
"0 - unknown (dashed square), 1 - known (square), 2 - friend (circle), 3 - foe (diamond).");
gd.addNumericField("Identified Targets icon type", this.cuas_known_type, 0,3,"",
"0 - unknown (dashed square), 1 - known (square), 2 - friend (circle), 3 - foe (diamond)."); "0 - unknown (dashed square), 1 - known (square), 2 - friend (circle), 3 - foe (diamond).");
gd.addNumericField("Maximal distance from log position", this.cuas_known_err, 5,8,"pix",
"Maximal distance between the detected target and UAS log position (in raw image pixels).");
gd.addNumericField("Image range", this.cuas_input_range, 5,8,"10mK", gd.addNumericField("Image range", this.cuas_input_range, 5,8,"10mK",
"Dispaly pixel values range (1.0 ~= 10 mK)."); "Dispaly pixel values range (1.0 ~= 10 mK).");
...@@ -2435,6 +2441,8 @@ min_str_neib_fpn 0.35 ...@@ -2435,6 +2441,8 @@ min_str_neib_fpn 0.35
"Azimuth corresponding to the known pixel X."); "Azimuth corresponding to the known pixel X.");
gd.addNumericField("Known pixel azimuth", this.cuas_el0, 5,8,"degree", gd.addNumericField("Known pixel azimuth", this.cuas_el0, 5,8,"degree",
"Elevation corresponding to the known pixel Y."); "Elevation corresponding to the known pixel Y.");
gd.addCheckbox ("Show true range", this.cuas_show_true_rng,
"Show range true from the UAS log.");
gd.addMessage("=== Debug ==="); gd.addMessage("=== Debug ===");
gd.addCheckbox ("Save/show debug images", this.cuas_debug, gd.addCheckbox ("Save/show debug images", this.cuas_debug,
...@@ -3467,6 +3475,9 @@ min_str_neib_fpn 0.35 ...@@ -3467,6 +3475,9 @@ min_str_neib_fpn 0.35
this.cuas_mask_blur = gd.getNextNumber(); this.cuas_mask_blur = gd.getNextNumber();
this.cuas_mask_round = gd.getNextBoolean(); this.cuas_mask_round = gd.getNextBoolean();
this.cuas_target_type= (int) gd.getNextNumber(); this.cuas_target_type= (int) gd.getNextNumber();
this.cuas_known_type= (int) gd.getNextNumber();
this.cuas_known_err= gd.getNextNumber();
this.cuas_input_range = gd.getNextNumber(); this.cuas_input_range = gd.getNextNumber();
this.cuas_scale2x = gd.getNextBoolean(); this.cuas_scale2x = gd.getNextBoolean();
this.cuas_ra_background = gd.getNextBoolean(); this.cuas_ra_background = gd.getNextBoolean();
...@@ -3501,6 +3512,7 @@ min_str_neib_fpn 0.35 ...@@ -3501,6 +3512,7 @@ min_str_neib_fpn 0.35
this.cuas_py0 = (int) gd.getNextNumber(); this.cuas_py0 = (int) gd.getNextNumber();
this.cuas_az0 = gd.getNextNumber(); this.cuas_az0 = gd.getNextNumber();
this.cuas_el0 = gd.getNextNumber(); this.cuas_el0 = gd.getNextNumber();
this.cuas_show_true_rng = gd.getNextBoolean();
this.cuas_debug = gd.getNextBoolean(); this.cuas_debug = gd.getNextBoolean();
this.cuas_step_debug = gd.getNextBoolean(); this.cuas_step_debug = gd.getNextBoolean();
...@@ -4455,6 +4467,9 @@ min_str_neib_fpn 0.35 ...@@ -4455,6 +4467,9 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_mask_blur", this.cuas_mask_blur+""); // double properties.setProperty(prefix+"cuas_mask_blur", this.cuas_mask_blur+""); // double
properties.setProperty(prefix+"cuas_mask_round", this.cuas_mask_round+""); // boolean properties.setProperty(prefix+"cuas_mask_round", this.cuas_mask_round+""); // boolean
properties.setProperty(prefix+"cuas_target_type", this.cuas_target_type+""); // int properties.setProperty(prefix+"cuas_target_type", this.cuas_target_type+""); // int
properties.setProperty(prefix+"cuas_known_type", this.cuas_known_type+""); // int
properties.setProperty(prefix+"cuas_known_err", this.cuas_known_err+""); // double
properties.setProperty(prefix+"cuas_input_range", this.cuas_input_range+""); // double properties.setProperty(prefix+"cuas_input_range", this.cuas_input_range+""); // double
properties.setProperty(prefix+"cuas_scale2x", this.cuas_scale2x+""); // boolean properties.setProperty(prefix+"cuas_scale2x", this.cuas_scale2x+""); // boolean
properties.setProperty(prefix+"cuas_ra_background", this.cuas_ra_background+""); // boolean properties.setProperty(prefix+"cuas_ra_background", this.cuas_ra_background+""); // boolean
...@@ -4479,11 +4494,12 @@ min_str_neib_fpn 0.35 ...@@ -4479,11 +4494,12 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_font_name", this.cuas_font_name+""); // String properties.setProperty(prefix+"cuas_font_name", this.cuas_font_name+""); // String
properties.setProperty(prefix+"cuas_font_size", this.cuas_font_size+""); // int properties.setProperty(prefix+"cuas_font_size", this.cuas_font_size+""); // int
properties.setProperty(prefix+"cuas_font_type", this.cuas_font_type+""); // int properties.setProperty(prefix+"cuas_font_type", this.cuas_font_type+""); // int
properties.setProperty(prefix+"cuas_ifov", this.cuas_ifov+""); // double properties.setProperty(prefix+"cuas_ifov", this.cuas_ifov+""); // double
properties.setProperty(prefix+"cuas_px0", this.cuas_px0+""); // int properties.setProperty(prefix+"cuas_px0", this.cuas_px0+""); // int
properties.setProperty(prefix+"cuas_py0", this.cuas_py0+""); // int properties.setProperty(prefix+"cuas_py0", this.cuas_py0+""); // int
properties.setProperty(prefix+"cuas_az0", this.cuas_az0+""); // double properties.setProperty(prefix+"cuas_az0", this.cuas_az0+""); // double
properties.setProperty(prefix+"cuas_el0", this.cuas_el0+""); // double properties.setProperty(prefix+"cuas_el0", this.cuas_el0+""); // double
properties.setProperty(prefix+"cuas_show_true_rng", this.cuas_show_true_rng+""); // boolean
properties.setProperty(prefix+"cuas_debug", this.cuas_debug+""); // boolean properties.setProperty(prefix+"cuas_debug", this.cuas_debug+""); // boolean
properties.setProperty(prefix+"cuas_step_debug", this.cuas_step_debug+""); // boolean properties.setProperty(prefix+"cuas_step_debug", this.cuas_step_debug+""); // boolean
...@@ -5411,6 +5427,9 @@ min_str_neib_fpn 0.35 ...@@ -5411,6 +5427,9 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_mask_blur")!=null) this.cuas_mask_blur=Double.parseDouble(properties.getProperty(prefix+"cuas_mask_blur")); if (properties.getProperty(prefix+"cuas_mask_blur")!=null) this.cuas_mask_blur=Double.parseDouble(properties.getProperty(prefix+"cuas_mask_blur"));
if (properties.getProperty(prefix+"cuas_mask_round")!=null) this.cuas_mask_round=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_mask_round")); if (properties.getProperty(prefix+"cuas_mask_round")!=null) this.cuas_mask_round=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_mask_round"));
if (properties.getProperty(prefix+"cuas_target_type")!=null) this.cuas_target_type=Integer.parseInt(properties.getProperty(prefix+"cuas_target_type")); if (properties.getProperty(prefix+"cuas_target_type")!=null) this.cuas_target_type=Integer.parseInt(properties.getProperty(prefix+"cuas_target_type"));
if (properties.getProperty(prefix+"cuas_known_type")!=null) this.cuas_known_type=Integer.parseInt(properties.getProperty(prefix+"cuas_known_type"));
if (properties.getProperty(prefix+"cuas_known_err")!=null) this.cuas_known_err=Double.parseDouble(properties.getProperty(prefix+"cuas_known_err"));
if (properties.getProperty(prefix+"cuas_input_range")!=null) this.cuas_input_range=Double.parseDouble(properties.getProperty(prefix+"cuas_input_range")); if (properties.getProperty(prefix+"cuas_input_range")!=null) this.cuas_input_range=Double.parseDouble(properties.getProperty(prefix+"cuas_input_range"));
if (properties.getProperty(prefix+"cuas_scale2x")!=null) this.cuas_scale2x=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_scale2x")); if (properties.getProperty(prefix+"cuas_scale2x")!=null) this.cuas_scale2x=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_scale2x"));
if (properties.getProperty(prefix+"cuas_ra_background")!=null) this.cuas_ra_background=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_ra_background")); if (properties.getProperty(prefix+"cuas_ra_background")!=null) this.cuas_ra_background=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_ra_background"));
...@@ -5440,6 +5459,7 @@ min_str_neib_fpn 0.35 ...@@ -5440,6 +5459,7 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_py0")!=null) this.cuas_py0=Integer.parseInt(properties.getProperty(prefix+"cuas_py0")); if (properties.getProperty(prefix+"cuas_py0")!=null) this.cuas_py0=Integer.parseInt(properties.getProperty(prefix+"cuas_py0"));
if (properties.getProperty(prefix+"cuas_az0")!=null) this.cuas_az0=Double.parseDouble(properties.getProperty(prefix+"cuas_az0")); if (properties.getProperty(prefix+"cuas_az0")!=null) this.cuas_az0=Double.parseDouble(properties.getProperty(prefix+"cuas_az0"));
if (properties.getProperty(prefix+"cuas_el0")!=null) this.cuas_el0=Double.parseDouble(properties.getProperty(prefix+"cuas_el0")); if (properties.getProperty(prefix+"cuas_el0")!=null) this.cuas_el0=Double.parseDouble(properties.getProperty(prefix+"cuas_el0"));
if (properties.getProperty(prefix+"cuas_show_true_rng")!=null) this.cuas_show_true_rng=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_show_true_rng"));
if (properties.getProperty(prefix+"cuas_debug")!=null) this.cuas_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_debug")); if (properties.getProperty(prefix+"cuas_debug")!=null) this.cuas_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_debug"));
if (properties.getProperty(prefix+"cuas_step_debug")!=null) this.cuas_step_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step_debug")); if (properties.getProperty(prefix+"cuas_step_debug")!=null) this.cuas_step_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step_debug"));
...@@ -6366,6 +6386,9 @@ min_str_neib_fpn 0.35 ...@@ -6366,6 +6386,9 @@ min_str_neib_fpn 0.35
imp.cuas_mask_blur = this.cuas_mask_blur; imp.cuas_mask_blur = this.cuas_mask_blur;
imp.cuas_mask_round = this.cuas_mask_round; imp.cuas_mask_round = this.cuas_mask_round;
imp.cuas_target_type= this.cuas_target_type; imp.cuas_target_type= this.cuas_target_type;
imp.cuas_known_type= this.cuas_known_type;
imp.cuas_known_err= this.cuas_known_err;
imp.cuas_input_range = this.cuas_input_range; imp.cuas_input_range = this.cuas_input_range;
imp.cuas_scale2x = this.cuas_scale2x; imp.cuas_scale2x = this.cuas_scale2x;
imp.cuas_ra_background = this.cuas_ra_background; imp.cuas_ra_background = this.cuas_ra_background;
...@@ -6392,6 +6415,7 @@ min_str_neib_fpn 0.35 ...@@ -6392,6 +6415,7 @@ min_str_neib_fpn 0.35
imp.cuas_py0 = this.cuas_py0; imp.cuas_py0 = this.cuas_py0;
imp.cuas_az0 = this.cuas_az0; imp.cuas_az0 = this.cuas_az0;
imp.cuas_el0 = this.cuas_el0; imp.cuas_el0 = this.cuas_el0;
imp.cuas_show_true_rng = this.cuas_show_true_rng;
imp.cuas_debug = this.cuas_debug; imp.cuas_debug = this.cuas_debug;
imp.cuas_step_debug = this.cuas_step_debug; imp.cuas_step_debug = this.cuas_step_debug;
......
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