Skip to content

Commit 5ae7860

Browse files
committed
Bug fixes.
1 parent 4b0b2a1 commit 5ae7860

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

Coordinate Systems/Conversions with Covariances/Taylor-Series Conversions/pol2CartTaylor.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
RCart(1,1,curPoint)=r^2*sigmaTheta2*sT^2+sigmaR2*cT^2;
106106
%Equation 10.4.3-6
107107
RCart(1,2,curPoint)=(sigmaR2-r^2*sigmaTheta2)*sT*cT;
108-
RCart(2,1,curPoint)=RCart(1,2);
108+
RCart(2,1,curPoint)=RCart(1,2,curPoint);
109109
%Equation 10.4.3-5
110110
RCart(2,2,curPoint)=r^2*sigmaTheta2*cT^2+sigmaR2*sT^2;
111111

@@ -139,7 +139,7 @@
139139
RCart(1,1,curPoint)=r^2*expTerm2*(cT^2*deltaCosh+sT^2*deltaSinh)+sigmaR2*expTerm2*(cT^2*deltaCosh2+sT^2*deltaSinh2);
140140
%Equation 13c
141141
RCart(1,2,curPoint)=sT*cT*expTerm2^2*(sigmaR2+(r^2+sigmaR2)*(1-1/expTerm));
142-
RCart(2,1,curPoint)=RCart(1,2);
142+
RCart(2,1,curPoint)=RCart(1,2,curPoint);
143143
%Equation 13b
144144
RCart(2,2,curPoint)=r^2*expTerm2*(sT^2*deltaCosh+cT^2*deltaSinh)+sigmaR2*expTerm2*(sT^2*deltaCosh2+cT^2*deltaSinh2);
145145

@@ -172,7 +172,7 @@
172172
RCart(1,1,curPoint)=(b1Inv^2-2)*r^2*cT^2+(1/2)*(r^2+sigmaR2)*(1+b2*c2T);
173173
%Equation 7c in [2].
174174
RCart(1,2,curPoint)=b1Inv^2*r^2*cT*sT-2*r^2*cT*sT+(1/2)*(r^2+sigmaR2)*b2*s2T;
175-
RCart(2,1,curPoint)=RCart(1,2);
175+
RCart(2,1,curPoint)=RCart(1,2,curPoint);
176176
%Equation 7b in [2].
177177
RCart(2,2,curPoint)=(b1Inv^2-2)*r^2*sT^2+(1/2)*(r^2+sigmaR2)*(1-b2*c2T);
178178

@@ -208,7 +208,7 @@
208208
RCart(1,1,curPoint)=(1/2)*(r^2+sigmaR2)*(1+c2T*expTerm2)-expTerm*r^2*cT^2;
209209
%Equation 18
210210
RCart(1,2,curPoint)=(1/2)*(r^2+sigmaR2)*s2T*expTerm2-expTerm*r^2*cT*sT;
211-
RCart(2,1,curPoint)=RCart(1,2);
211+
RCart(2,1,curPoint)=RCart(1,2,curPoint);
212212
%Equation 17
213213
RCart(2,2,curPoint)=(1/2)*(r^2+sigmaR2)*(1-c2T*expTerm2)-expTerm*r^2*sT^2;
214214

Coordinate Systems/Time/UTC2YearFrac.m

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

4949
%The total number of seconds in the year.
5050
totalSec=numSecInYear(year);
51-
secOfYear=second+dayCount*24*60*60+leapSecs;
51+
secOfYear=second+(dayCount-1)*24*60*60+leapSecs;
5252
yearFrac=year+secOfYear./totalSec;
5353
end
5454

Mathematical Functions/Statistics/randPointInEllipsoid.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
case 0%The algorithm of Section 3.1.1 of [1], modified for more than
7575
%two dimensions.
7676
S=inv(invS);
77-
minBounds=-diag(S);
78-
maxBounds=diag(S);
77+
minBounds=-sqrt(diag(S));
78+
maxBounds=sqrt(diag(S));
7979
span=maxBounds-minBounds;
8080

8181
for curVal=1:N

0 commit comments

Comments
 (0)