%--------------------------------------------------------------------------
% dri.m
%
% This is very simple DRI range calculator using Johnson criteria.
%
% DRI stands for Detection, Recognition,Identification
% DRI range is the minimum distance required to see a target clearly
% in an imaging system. Number of pixels required for Detection,
% Rocognition and Identication is based on some experimental studies..
%
%
% All input values are in millimeters
% All output values are in meters
+
% Nov 2024
%--------------------------------------------------------------------------
clear; clc;

% inputs
T = 500;   % target size
f = 100;   % focal length
p = 0.03;  % pixel pitch
N = [2, 8, 12.8]; % average values

% dri range calculation
r = T*f./(N * p) / 1000;

% output to the user screen
fprintf('Detection     : r = %5d m\n',round(r(1)))
fprintf('Recognition   : r = %5d m\n',round(r(2)))
fprintf('Identification: r = %5d m\n',round(r(3)))
