Skip to content

Commit 88ef3c9

Browse files
author
David Crouse
committed
Update to version 6.0
1 parent 285dddb commit 88ef3c9

293 files changed

Lines changed: 6498 additions & 2807 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assignment_Algorithms/2D_Assignment/Game_Theoretic_Assignment/assignStableRoommates.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195

196196
if(ranking(nextChoice,person)<=rightmost(nextChoice))
197197
break;
198-
end;
198+
end
199199
end
200200

201201
second(person)=posInList-1;

Assignment_Algorithms/2D_Cost_Matrix_Formation/makeStandardCartOnlyLRMatHyps.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
innov=zCart(:,curMeas)-zPred;
233233

234234
Pzz=PzPred+(SRCart(:,:,curMeas)*SRCart(:,:,curMeas)');
235-
mahabDist=innov'*inv(Pzz)*innov;
235+
mahabDist=innov'*(Pzz\innov);
236236
if(mahabDist>gammaVal)
237237
%If it does not gate, then assign a zero likelihood ratio.
238238
A(curTar,curMeas)=0;

Assignment_Algorithms/Association_Probabilities_and_Specific_Updates/calc2DAssignmentProbsApprox.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
% 5 The matrix permanent approximation algorithm of [4], which
3131
% uses the permUBound function to approximate the permanent.
3232
% This tends to be rather slow.
33+
% 6 Just compute the values for each target as if it were the only
34+
% target present. Thus, as if one were running independent
35+
% PDAFs.
3336
% diagAugment A boolean variable indicating whether the probabilties
3437
% should be found for a general assignment problem or assuming A
3538
% ends with a diagonal submatrix of missed detection
@@ -218,6 +221,11 @@
218221
case 5%Uhlmann's algorithm using approximate matrix permanents.
219222
permFun=@(A)permUBound(A,delta);
220223
beta=UhlmannsAlg(A,diagAugment,permFun);
224+
case 6
225+
for curTar=1:numTar
226+
ACur=[A(curTar,1:numMeas),A(curTar,numMeas+curTar)];
227+
beta(curTar,:)=calc2DAssignmentProbs(ACur,true);
228+
end
221229
otherwise
222230
error('Invalid Approximation Specified')
223231
end

Assignment_Algorithms/Association_Probabilities_and_Specific_Updates/calcStarBetasBF.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
if(obsTarIdx<=numTargetsObserved&&obsTar(obsTarIdx)+1==curTar)
9090
%A target observed hypothesis for this target.
9191
measSel=tarMeas(maxLikeIdx(obsTarIdx))+1;
92+
9293
beta(curTar,measSel)=beta(curTar,measSel)+maxLike;
9394
obsTarIdx=obsTarIdx+1;
9495
else

Assignment_Algorithms/singleScanUpdateWithExistence.m

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [xUpdate,PUpdate,rUpdate,probNonTargetMeas]=singleScanUpdateWithExistence(xHyp,PHyp,PD,rPred,A,algSel1,algSel2,param3)
1+
function [xUpdate,PUpdate,rUpdate,probNonTargetMeas,dominantMeasIdx]=singleScanUpdateWithExistence(xHyp,PHyp,PD,rPred,A,algSel1,algSel2,param3)
22
%%SINGLESCANUPDATEWITHEXISTENCE Perform the measurement update step in a
33
% single-scan tracking algorithm that uses Gaussian
44
% approximations to represent the target state before and
@@ -32,7 +32,7 @@
3232
% rPred A numTarX1 vector of the predicted probabilities of target
3333
% existence.
3434
% A A matrix of positive likelihoods or likelihood ratios (NOT
35-
% log-likelihood ratios). A is a numTar X (numMeas+numTar)
35+
% log-likelihood ratios). A is a numTarX(numMeas+numTar)
3636
% matrix of all-positive likelihoods or likelihood ratios for
3737
% assigning the target specified by the row to the measurement
3838
% specified by the column. Columns > numMeas hold
@@ -82,6 +82,12 @@
8282
% probNonTargetMeas A numMeasX1 set of posterior probabilities that the
8383
% measurements do not come from any of the known targets.
8484
% These probabilities play a role in track initiation.
85+
% dominantMeasIdx A numTarX1 vector which indicates the index of the
86+
% dominant measurement updating each target. Zero is used
87+
% for the missed detection hypothesis. For hard assignment
88+
% algorithms, this is the measurement assigned. For soft
89+
% assignment algorithms, this is the highest probability
90+
% measurement for each target.
8591
%
8692
%This function basically implements the measurement update step for the
8793
%JIPDAF (and related filters), updating the known targets, their existence
@@ -185,7 +191,7 @@
185191
end
186192
end
187193

188-
if(nargin==5||isempty(algSel2))%If only algSel2 was omitted.
194+
if(nargin==6||isempty(algSel2))%If only algSel2 was omitted.
189195
algSel2=0;
190196
end
191197

@@ -232,6 +238,8 @@
232238
for curTar=1:numTar
233239
logLikes(curTar)=ALog(curTar,tar2Meas(curTar));
234240
end
241+
dominantMeasIdx=tar2Meas;
242+
dominantMeasIdx(dominantMeasIdx>numMeas)=0;
235243

236244
%Adjust for the index of the missed detection hypothesis.
237245
sel=tar2Meas>numMeas;
@@ -254,12 +262,15 @@
254262
%in place of the mean.
255263
%The assignment for each target
256264
logLikes=zeros(numTar,1);
265+
dominantMeasIdx=zeros(numTar,1);
257266
for curTar=1:numTar
258267
[maxVal,maxIdx]=max(A(curTar,:));
259-
260268
%If the missed detection hypothesis is the most likely.
261269
if(maxIdx>numMeas)
270+
dominantMeasIdx(curTar)=0;
262271
maxIdx=numMeas+1;
272+
else
273+
dominantMeasIdx(curTar)=maxIdx;
263274
end
264275

265276
xUpdate(:,curTar)=xHyp(:,curTar,maxIdx);
@@ -281,6 +292,9 @@
281292
P=reshape(PHyp(:,:,curTar,:),[xDim,xDim,numHyp]);
282293
[xUpdate(:,curTar),PUpdate(:,:,curTar)]=calcMixtureMoments(x,betas(curTar,:),P);
283294
end
295+
296+
[~,dominantMeasIdx]=max(betas,[],2);
297+
dominantMeasIdx(dominantMeasIdx>numMeas)=0;
284298
end
285299
end
286300

Astronomical_Code/EGM08EarthAccel.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@
267267

268268
if(effectsToInclude(5)~=false)
269269
[deltaC{curDelta},deltaS{curDelta}]=gravOceanTideOffset(TT1,TT2);
270-
curDelta=curDelta+1;
271270
end
272271

273272
%Find out the total number of coefficients in C and S that need to be
-85.5 MB
Binary file not shown.

Astronomical_Code/Ephemeris_Access/readJPLEphem.m

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
% ephemerisPath This is a character string of the path to the ephemeris
5757
% file. The formatting is the same as used by the fopen
5858
% function. If this parameter is omitted or an empty matrix is
59-
% passed, it is assumed that the DE430t ephemeris is given in a
59+
% passed, it is assumed that the DE440t ephemeris is given in a
6060
% data folder that is in the same folder as this function and
61-
% the file is named linux_p1550p2650.430t.
61+
% the file is named linux_p1550p2650.440t.
6262
%
6363
%OUTPUTS: PV If The relative location and velocity between two solar system
6464
% objects is requested, then this is a 6X1 vector in the format
@@ -67,18 +67,14 @@
6767
% units depend on the units input.
6868
%
6969
%Ephemerides that can be read by this function can be downloaded from
70-
%ftp://ssd.jpl.nasa.gov/pub/eph/planets/Linux
71-
%Only the binary file is needed. For example, when considering the DE430
72-
%ephemerides, the file that should be used is called linux_p1550p2650.430.
73-
%Accompanying files that are not needed include testpo.430 and
74-
%header.430_572. The file header.430_572 is an ASCII test version of the
75-
%header and testpo.430 is an ASCII text file containing parameters related
76-
%to testing the algorithm.
70+
%https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/
71+
%Only the binary file is needed. For example, when considering the DE440t
72+
%ephemerides, the file that should be used is called linux_p1550p2650.440t.
7773
%
7874
%This file is loosely based on the Fortran routine called testeph1.f that
7975
%was created by the California Institute of Technology (CIT) under a U.S.
8076
%government contract with NASA and is available for download in the folder
81-
%ftp://ssd.jpl.nasa.gov/pub/eph/planets/
77+
%https://ssd.jpl.nasa.gov/ftp/eph/planets/fortran/
8278
%
8379
%EXAMPLE:
8480
%Find the position and velocity of the Earth with respect to the Sun with
@@ -107,7 +103,7 @@
107103
%Get the path to this file.
108104
ScriptPath=mfilename('fullpath');
109105
ScriptFolder=fileparts(ScriptPath);
110-
ephemerisPath=[ScriptFolder,'/data/linux_p1550p2650.430t'];
106+
ephemerisPath=[ScriptFolder,'/data/linux_p1550p2650.440t'];
111107
end
112108

113109
if(nargin<5||isempty(units))
@@ -139,6 +135,7 @@
139135
%%%Read the header information of the ephemerides.
140136
%%%%%
141137
[~,~,kSize,ss,ipt,au_km,EarthMoonRatio]=readJPLEphemHeader(ephemerisPath);
138+
142139
%The number of Chebyshev coefficients per record.
143140
numCoeffs=kSize/2;
144141

@@ -320,7 +317,7 @@
320317
end
321318

322319
%%%%
323-
%%Consider lookups for ceklestial bodies, which use the centerNumber input.
320+
%%Consider lookups for celestial bodies, which use the centerNumber input.
324321
%%%%
325322

326323
%If the object is the Moon and the center is the Earth

0 commit comments

Comments
 (0)