publicstaticfinalString[][]ANNOT_LABELS={{"Target ID","Unique number fo detected targets, some targets may be erroneously detected as separate ones."},
{"Disparity","Raw measured disparity (in pixels), offset by the same \"disparity at infinity\"."},
{"Range","Distance to the target, calculated from the measured disparity."},
{"True range","Distance to the test UAS obtained from its flight log."},
{"AGL","Altitude above ground level."},
{"Azimuth","Target azimuth (degrees)."},
{"Elevation","Target elevation (degrees)."},
{"Conditional Elevation","Display elevation only if altitude (AGL) is undefined due to too far targets."},
{"Angular movements","Show horizontal and vertical apparent target movement in the camera field of view (degrees per second)."},
for(indx_last=num_seq-1;(indx_last>=0)&&((local_tiles[indx_last].length<=ltarg)||(local_tiles[indx_last][ltarg]<0));indx_last--);// Index 5 out of bounds for length 5
// TODO: improve, get correct calculations with distortions
publicstaticdouble[][]getPixToAzElev(
CLTParametersclt_parameters,
GeometryCorrectiongc,
doubletarget_x,
doubletarget_y,
doubletarget_vx,
doubletarget_vy){
doubleifov=gc.getIFOVDegrees();// clt_parameters.imp.cuas_ifov; // 0.05; // degree per pixel
intpx0=clt_parameters.imp.cuas_px0;// 283; // pixel with known azimuth
intpy0=clt_parameters.imp.cuas_py0;// 386; // pixel with known elevation
doubleaz0=clt_parameters.imp.cuas_az0;// 201.5; // degrees for cuas_px0;
doubleel0=clt_parameters.imp.cuas_el0;// 0.0; // degrees for cuas_px0;
doublefps=60.0;
doubleaz=(target_x-px0)*ifov+az0;
doubleel=-(target_y-py0)*ifov+el0;
doubleomega_az=target_vx*ifov*fps;
doubleomega_el=-target_vy*ifov*fps;
while(az<0){
az+=360;
}
while(az>=360){
az-=360;
}
while(el<-180){
el+=360;
}
while(el>180){
el-=360;
}
returnnewdouble[][]{{az,el},{omega_az,omega_el}};
}
publicstaticStringsaveAsVideo(
...
...
@@ -5680,35 +5774,7 @@ public class CuasMotion {
finalfloat[][]fpixels,
double[][][]target_sequence,// non-overlap only if consider marked stronger tiles
finalintdebugLevel){
/*
generateExtractFilterMovingTargets( // move parameters to clt_parameters
clt_parameters, // CLTParameters clt_parameters,
video_pass, // final boolean video_pass, // if clt_parameters.cuas_clean_video=true, video_pass=0 - output TIFFS, but no video. If video_pass==1 - only video with no debug
batch_mode, // final boolean batch_mode,
parentCLT, //QuadCLT parentCLT, //
fpixels, // final float [][] fpixels,
target_sequence, // double [][][] target_sequence, // non-overlap only if consider marked stronger tiles
this, // CuasMotion cuasMotion,
uasLogReader, // UasLogReader uasLogReader,
scene_titles, // String [] scene_titles, // recreate slice_titles from scene titles?
slice_titles, // String [] slice_titles,
debugLevel); // final int debugLevel)
}
public static void generateExtractFilterMovingTargets( // move parameters to clt_parameters
CLTParameters clt_parameters,
final boolean video_pass, // if clt_parameters.cuas_clean_video=true, video_pass=0 - output TIFFS, but no video. If video_pass==1 - only video with no debug
final boolean batch_mode,
QuadCLT parentCLT, //
final float [][] fpixels,
double [][][] target_sequence, // non-overlap only if consider marked stronger tiles
CuasMotion cuasMotion,
UasLogReader uasLogReader,
String [] scene_titles, // recreate slice_titles from scene titles?
booleanclean_video=clt_parameters.imp.cuas_clean_video;//true;// save video without any debug information for targets, output in TIFF files. False - same output for video and TIFFs