dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
OPPlots.m File Reference

Go to the source code of this file.

Functions

function OPPlots ()[FileName
 
 load (matfile)
 
 load ('specificfilename') TimeVA
 
 figure (1)
 
 plot (TimeVA, VA(1,:), TimeVA, VA(2,:), TimeGPSPos, Vgps(1,:), TimeGPSPos, Vgps(2,:))
 
 legend (s1, s2, s3, s4)
 
 xlabel ('Time(sec)')
 
 ylabel ('Velocity(m/s)')
 
 figure (2)
 
 plot (TimePA, PA(1,:), TimePA, PA(2,:), TimeGPSPos, GPSPos(1,:), TimeGPSPos, GPSPos(2,:))
 
 ylabel ('Position(m)')
 
 figure (3)
 
 plot3 (PA(2,:), PA(1,:), PA(3,:), GPSPos(2,:), GPSPos(1,:), GPSPos(3,:))
 
 legend (s1, s2)
 
 xlabel ('East(m)')
 
 ylabel ('North(m)')
 
 zlabel ('Up(m)')
 
 LLA (2)
 
 while (((delta > ACCURACY)||(delta< -ACCURACY))&&(iter< MAX_ITER)) delta
 
end LLA (1)
 
 LLA (3)
 
prime vertical radius of curvature ECEF (1, i)
 
 ECEF (2, i)
 
 ECEF (3, i)
 
 Rne (1, 1)
 
 Rne (1, 2)
 
 Rne (1, 3)
 
 Rne (2, 1)
 
 Rne (2, 2)
 
 Rne (2, 3)=0
 
 Rne (3, 1)
 
 Rne (3, 2)
 
 Rne (3, 3)
 

Variables

function PathName
 
function FilterIndex = uigetfile('*.mat')
 
 matfile = strcat(PathName,FileName)
 
 VA
 
 TimeGPSPos = [GPSPosition.timestamp]/1000
 
 Vgps
 
 s1 ='Velocity Actual North'
 
 s2 ='Velocity Actual East'
 
 s3 ='GPS Velocity North'
 
 s4 ='GPS Velocity East'
 
 TimePA = [PositionActual.timestamp]/1000
 
 PA
 
 LLA =[[GPSPosition.Latitude]*1e-7
 
 BaseECEF = LLA2ECEF([HomeLocation.Latitude*1e-7, HomeLocation.Longitude*1e-7, HomeLocation.Altitude]')
 
 Rne = RneFromLLA([HomeLocation.Latitude*1e-7, HomeLocation.Longitude*1e-7, HomeLocation.Altitude]')
 
 GPSPos =LLA2Base(LLA,BaseECEF,Rne)
 
axis equal end function NED
 
 ECEF = LLA2ECEF(LLA)
 
 diff = ECEF - repmat(BaseECEF,1,n)
 
end a = 6378137.0
 
 e = 8.1819190842622e-2
 
 x = ECEF(1)
 
 y = ECEF(2)
 
 z = ECEF(3)
 
 MAX_ITER =10
 
 ACCURACY = 1.0e-11
 
 RAD2DEG =180/pi
 
 DEG2RAD =1/RAD2DEG
 
 Lat = DEG2RAD * LLA(1)
 
 esLat = e * sin(Lat)
 
 N = a / sqrt(1 - esLat * esLat)
 
 NplusH = N+Alt
 
 delta = 1
 
 iter = 0
 
Eccentricity n = size(LLA,2)
 
for i
 
 sinLon = sin(pi*LLA(2,i)/180)
 
 cosLat = cos(pi*LLA(1,i)/180)
 
 cosLon = cos(pi*LLA(2,i)/180)
 
 sinLat = sin(DEG2RAD * LLA(1))
 

Function Documentation

prime vertical radius of curvature ECEF ( ,
i   
)
ECEF ( ,
i   
)
ECEF ( ,
i   
)
figure ( )
figure ( )
figure ( )
legend ( s1  ,
s2  ,
s3  ,
s4   
)
legend ( s1  ,
s2   
)
LLA ( )
end LLA ( )
LLA ( )
load ( matfile  )
load ( 'specificfilename'  )
function OPPlots ( )
plot ( TimeVA  ,
VA(1,:)  ,
TimeVA  ,
VA(2,:)  ,
TimeGPSPos  ,
Vgps(1,:)  ,
TimeGPSPos  ,
Vgps(2,:)   
)
plot ( TimePA  ,
PA(1,:)  ,
TimePA  ,
PA(2,:)  ,
TimeGPSPos  ,
GPSPos(1,:)  ,
TimeGPSPos  ,
GPSPos(2,:)   
)
plot3 ( PA(2,:)  ,
PA(1,:)  ,
PA(3,:)  ,
GPSPos(2,:)  ,
GPSPos(1,:)  ,
GPSPos(3,:)   
)
Rne ( ,
 
)
Rne ( ,
 
)
Rne ( ,
 
)
Rne ( ,
 
)
Rne ( ,
 
)
Rne ( ,
 
)
pure virtual
Rne ( ,
 
)
Rne ( ,
 
)
Rne ( ,
 
)
while ( ((delta > ACCURACY)||(delta< -ACCURACY))&&(iter< MAX_ITER )
xlabel ( 'Time(sec)'  )
xlabel ( 'East(m)'  )
ylabel ( 'Velocity(m/s)'  )
ylabel ( 'Position(m)'  )
ylabel ( 'North(m)'  )
zlabel ( 'Up(m)'  )

Variable Documentation

end a = 6378137.0

Definition at line 98 of file OPPlots.m.

ACCURACY = 1.0e-11

Definition at line 105 of file OPPlots.m.

BaseECEF = LLA2ECEF([HomeLocation.Latitude*1e-7, HomeLocation.Longitude*1e-7, HomeLocation.Altitude]')

Definition at line 37 of file OPPlots.m.

cosLat = cos(pi*LLA(1,i)/180)

Definition at line 143 of file OPPlots.m.

cosLon = cos(pi*LLA(2,i)/180)

Definition at line 144 of file OPPlots.m.

DEG2RAD =1/RAD2DEG

Definition at line 107 of file OPPlots.m.

delta = 1

Definition at line 114 of file OPPlots.m.

diff = ECEF - repmat(BaseECEF,1,n)

Definition at line 68 of file OPPlots.m.

Equatorial Radius e = 8.1819190842622e-2

Definition at line 99 of file OPPlots.m.

end function ECEF = LLA2ECEF(LLA)

Definition at line 66 of file OPPlots.m.

esLat = e * sin(Lat)

Definition at line 111 of file OPPlots.m.

function FilterIndex = uigetfile('*.mat')

Definition at line 2 of file OPPlots.m.

GPSPos =LLA2Base(LLA,BaseECEF,Rne)

Definition at line 39 of file OPPlots.m.

for i
Initial value:
=1:n
sinLat = sin(pi*LLA(1,i)/180)
for i
Definition: OPPlots.m:140
Eccentricity n
Definition: OPPlots.m:137
sinLat
Definition: OPPlots.m:159
LLA
Definition: OPPlots.m:34

Definition at line 140 of file OPPlots.m.

iter = 0

Definition at line 115 of file OPPlots.m.

Lat = DEG2RAD * LLA(1)

Definition at line 110 of file OPPlots.m.

end function LLA =[[GPSPosition.Latitude]*1e-7

Definition at line 34 of file OPPlots.m.

matfile = strcat(PathName,FileName)

Definition at line 3 of file OPPlots.m.

MAX_ITER =10

Definition at line 104 of file OPPlots.m.

N = a / sqrt(1 - esLat * esLat)

Definition at line 112 of file OPPlots.m.

Eccentricity n = size(LLA,2)

Definition at line 137 of file OPPlots.m.

NED
Initial value:
= LLA2Base(LLA,BaseECEF,Rne)
n = size(LLA,2)
BaseECEF
Definition: OPPlots.m:37
Rne
Definition: OPPlots.m:38
Eccentricity n
Definition: OPPlots.m:137
LLA
Definition: OPPlots.m:34

Definition at line 63 of file OPPlots.m.

NplusH = N+Alt

Definition at line 113 of file OPPlots.m.

PA
Initial value:
= [[PositionActual.North]
[PositionActual.East]
[PositionActual.Down]]/100

Definition at line 29 of file OPPlots.m.

function PathName

Definition at line 2 of file OPPlots.m.

RAD2DEG =180/pi

Definition at line 106 of file OPPlots.m.

end end function Rne = RneFromLLA([HomeLocation.Latitude*1e-7, HomeLocation.Longitude*1e-7, HomeLocation.Altitude]')

Definition at line 38 of file OPPlots.m.

s1 ='Velocity Actual North'

Definition at line 19 of file OPPlots.m.

s2 ='Velocity Actual East'

Definition at line 20 of file OPPlots.m.

s3 ='GPS Velocity North'

Definition at line 21 of file OPPlots.m.

s4 ='GPS Velocity East'

Definition at line 22 of file OPPlots.m.

sinLat = sin(DEG2RAD * LLA(1))

Definition at line 159 of file OPPlots.m.

sinLon = sin(pi*LLA(2,i)/180)

Definition at line 142 of file OPPlots.m.

TimeGPSPos = [GPSPosition.timestamp]/1000

Definition at line 13 of file OPPlots.m.

TimePA = [PositionActual.timestamp]/1000

Definition at line 28 of file OPPlots.m.

VA
Initial value:
= [[VelocityActual.North]
[VelocityActual.East]
[VelocityActual.Down]]/100

Definition at line 9 of file OPPlots.m.

Vgps
Initial value:
=[[GPSPosition.Groundspeed].*cos([GPSPosition.Heading]*pi/180)
[GPSPosition.Groundspeed].*sin([GPSPosition.Heading]*pi/180)]

Definition at line 14 of file OPPlots.m.

x = ECEF(1)

Definition at line 100 of file OPPlots.m.

y = ECEF(2)

Definition at line 101 of file OPPlots.m.

z = ECEF(3)

Definition at line 102 of file OPPlots.m.