Conversion of Detections in a tracking scenario
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
In an example called, "Adaptive Tracking of Maneuvering Targets with Managed Radar", the radar is located at the origin of the scenario in which "IsEarthCentered" is false. I would like to simulate a tracking scenario in which a radar is not at the origin of the scenario and "IsEarthCentered" is true. When I ran a simulation with these conditions, the detections seemed to work fine as shown below, but the tracking is way off.

I think I need to convert the detections as shown in an example called, "Convert Detections to objectDetection Format". So, I added some code into "helperAdaptiveTrackingSim.m" of the example, "Adaptive Tracking of Maneuvering Targets with Managed Radar", as shown below. But, it didn't work. How I can set up the "MeasurementParameters" in "objectDetection"? I think I need to set up the "MeasurementParameters" before excecuting the line, "detections = detect(scenario);".
% Collect detections and plot them
detections = detect(scenario);
if isempty(detections)
meas = zeros(0,3);
else
dets = [detections{:}];
meassph = reshape([dets.Measurement],3,[])';
[x,y,z] = sph2cart(deg2rad(meassph(1)),deg2rad(meassph(2)),meassph(3));
meas = (detections{1}.MeasurementParameters.Orientation*[x;y;z]+detections{1}.MeasurementParameters.OriginPosition)';
%%%%%%%%%%%%%%%%%%%%%%% Coordinate conversion by YSC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MP = struct();
MP.Frame = 'spherical';
MP.OriginPosition = [scenario.Platforms{end}.Position(1); scenario.Platforms{end}.Position(2); scenario.Platforms{end}.Position(3)];
MP.OriginVelocity = [0; 0; 0];
MP.Orientation = detections{1}.MeasurementParameters.Orientation;
MP.IsParentToChild = true;
MP.HasAzimuth = true;
MP.HasElevation = true;
MP.HasRange = true;
MP.HasVelocity = false;
detections{:} = objectDetection(detections{1}.Time, detections{1}.Measurement, 'MeasurementParameters', MP);
%%%%%%%%%%%%%%%%%%%%%%%Coordinate conversion by YSC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
plotDetection(dtp, meas);
% Track and plot tracks
if isLocked(tracker) || ~isempty(detections)
[confirmedTracks,tentativeTracks,~,analysisInformation] = tracker(detections, time, detectableTracks);
%radarposition = [-3107170.70048133 4124927.36295761 3731328.07510190];
pos = getTrackPositions(confirmedTracks,jobq.PositionSelector);
%plotTrack(trp,pos+radarposition,string([confirmedTracks.TrackID]));
plotTrack(trp,pos,string([confirmedTracks.TrackID]));
tracks.confirmedTracks = confirmedTracks;
tracks.tentativeTracks = tentativeTracks;
tracks.analysisInformation = analysisInformation;
tracks.PositionSelector = jobq.PositionSelector;
posBuffer = [posBuffer; pos]; %#ok<AGROW> %Added by YSC
end
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Sensor Fusion and Tracking Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!