Go to the source code of this file.
|
| 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) |
| |
|
| 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)) |
| |
| prime vertical radius of curvature ECEF |
( |
1 |
, |
|
|
i |
|
|
) |
| |
| load |
( |
'specificfilename' |
| ) |
|
| 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,:) |
|
|
) |
| |
| ylabel |
( |
'Velocity(m/s)' |
| ) |
|
| BaseECEF = LLA2ECEF([HomeLocation.Latitude*1e-7, HomeLocation.Longitude*1e-7, HomeLocation.Altitude]') |
| cosLat = cos(pi*LLA(1,i)/180) |
| cosLon = cos(pi*LLA(2,i)/180) |
| Equatorial Radius e = 8.1819190842622e-2 |
| Eccentricity n = size(LLA,2) |
Initial value:
Definition at line 63 of file OPPlots.m.
Initial value:= [[PositionActual.North]
[PositionActual.East]
[PositionActual.Down]]/100
Definition at line 29 of file OPPlots.m.
| end end function Rne = RneFromLLA([HomeLocation.Latitude*1e-7, HomeLocation.Longitude*1e-7, HomeLocation.Altitude]') |
| s1 ='Velocity Actual North' |
| s2 ='Velocity Actual East' |
| sinLon = sin(pi*LLA(2,i)/180) |
| TimeGPSPos = [GPSPosition.timestamp]/1000 |
| TimePA = [PositionActual.timestamp]/1000 |
Initial value:= [[VelocityActual.North]
[VelocityActual.East]
[VelocityActual.Down]]/100
Definition at line 9 of file OPPlots.m.
Initial value:=[[GPSPosition.Groundspeed].*cos([GPSPosition.Heading]*pi/180)
[GPSPosition.Groundspeed].*sin([GPSPosition.Heading]*pi/180)]
Definition at line 14 of file OPPlots.m.