Skip to content

Commit 0711853

Browse files
authored
Merge pull request #74 from JLJu/master
Close #73
2 parents dbcacee + 4acd208 commit 0711853

5 files changed

Lines changed: 84 additions & 14 deletions

File tree

Software/Documentation/ADC Common Message Set/.~lock.ADC Common Message Set.odt#

Lines changed: 0 additions & 1 deletion
This file was deleted.

Software/Script/Scilab/ADCAsgard/CSVLoader.sce

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//ADC Asgard CSV Loader. JLJ. Basicairdata Team.
2-
//1 debug mode
3-
debug=1;
2+
writetoQGISfile=1; //If 1 write output to CSV file for QGIS
3+
debug=1;//1 debug mode
4+
45
exec('rhoair.sci')
56
exec('viscosityair.sci')
67
exec('ISAaltitude.sci')
@@ -205,15 +206,7 @@ clf(4);
205206
//scatter3(GPS(:,lat),GPS(:,lon),GPS(:,GPSaltitude),"*")
206207
scatter3(GPS(:,lat),GPS(:,lon),GPS(:,GPSspeed),"red","*")
207208
//scatter3(GPS(:,lat),GPS(:,lon),Q(:,TASmcol),"blue","x")
208-
azz=gca()
209-
// [xmin,ymin,zmin; xmax,ymax,zmax]
210-
xmin=min(GPS(:,lat))
211-
ymin=min(GPS(:,lon))
212-
zmin=0
213-
xmax=max(GPS(:,lat))
214-
ymax=min(GPS(:,lon))
215-
zmax=25
216-
azz.data_bounds=[xmin,ymin,zmin; xmax,ymax,zmax];
209+
217210
//Get the total air data log time in seconds
218211
//fsample is the calcualted real sample rate
219212
[r1 c1]=size(GPS);
@@ -225,10 +218,39 @@ timereal=min([r/fsample r1])
225218
for mm=1:timereal
226219
GPS(mm,c1+1)=Q(floor(50*0+ mm*fsample),TASmcol)
227220
end
228-
scatter3(GPS(:,lat),GPS(:,lon),GPS(:,c1+1),"blue","x") //TAS Airspeed at the sampled instants
221+
//TAS Airspeed at the sampled instants
222+
scatter3(GPS(:,lat),GPS(:,lon),GPS(:,c1+1),"blue","x")
223+
//Difference
224+
scatter3(GPS(:,lat),GPS(:,lon),(GPS(:,GPSspeed)-GPS(:,c1+1)))
225+
226+
azz=gca()
227+
// [xmin,ymin,zmin; xmax,ymax,zmax]
228+
xmin=min(GPS(:,lat))
229+
ymin=min(GPS(:,lon))
230+
zmin=-2
231+
xmax=max(GPS(:,lat))
232+
ymax=min(GPS(:,lon))
233+
zmax=25
234+
azz.data_bounds=[xmin,ymin,zmin; xmax,ymax,zmax];
229235
xlabel('Latitude')
230236
ylabel('Longitude')
231237
zlabel('Airspeed m/s')
232238
xtitle('GPS Speed vs Pitot Speed')
233-
legend(['GPS Ground Speed[m/s]';'True Airspeed [m/s]']);
239+
legend(['GPS Ground Speed[m/s]';'True Airspeed [m/s]';'Speed difference']);
240+
//lat lon bearing TAS
241+
//x component of TAS
234242

243+
244+
if writetoQGISfile==1
245+
uTAS=cos(GPS(:,bearing)/360*6.28).*GPS(:,c1+1)
246+
vTAS=sin(GPS(:,bearing)/360*6.28).*GPS(:,c1+1)
247+
QGIS=[GPS(:,lat) GPS(:,lon) GPS(:,bearing) GPS(:,c1+1) uTAS vTAS]
248+
QGIS(1,1)=0
249+
QGIS(1,2)=0
250+
QGIS(1,3)=0
251+
QGIS(1,4)=0
252+
QGIS(1,5)=0
253+
QGIS(1,6)=0
254+
filename=fullfile("FORQGIS.csv");
255+
csvWrite ( QGIS , filename );
256+
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
0,0,0,0,0,0
2+
45.19671306,27.966135649999998,152,8.0299999999999994,-7.0849926516224402,3.7793887239150217
3+
45.19666376,27.96617874,149,8.3499999999999996,-7.1516710317749874,4.3100001685928602
4+
45.196608490000003,27.966222680000001,147,10.42,-8.7315584618386222,5.6865004024878392
5+
45.196536399999999,27.966286570000001,147,11.5,-9.6365568436798608,6.2758881601353309
6+
45.196463520000002,27.966356600000001,147,12.140000000000001,-10.172852181067261,6.6251549794819935
7+
45.196377939999998,27.96642967,147,13.949999999999999,-11.689562432116004,7.6129252029467711
8+
45.196280020000003,27.966524209999999,147,14.59,-12.225857769503406,7.9621920222934337
9+
45.196183439999999,27.96660666,147,14.300000000000001,-11.98284894474974,7.8039304947769779
10+
45.196076419999997,27.966705210000001,147,15.43,-12.92974539982437,8.4206047226859262
11+
45.195981160000002,27.966800190000001,147,16.18,-13.55821649832523,8.8299017766077963
12+
45.195869530000003,27.966899999999999,147,17.039999999999999,-14.278863357939549,9.299229065104873
13+
45.195741519999999,27.967014030000001,147,18.149999999999999,-15.209000583720822,9.9049887049092398
14+
45.195623599999998,27.96712106,147,18.43,-15.44362979382781,10.057792938373405
15+
45.195493249999998,27.967237839999999,147,19.640000000000001,-16.457563166075868,10.718125518700688
16+
45.195344200000001,27.967374159999999,147,20.149999999999999,-16.884923513056449,10.996447515367558
17+
45.195210119999999,27.967497340000001,147,20.77,-17.404459621150494,11.334799746609637
18+
45.195049109999999,27.9676437,148,20.890000000000001,-17.70121319256414,11.09320294195474
19+
45.194903099999998,27.96777002,148,20.280000000000001,-17.184327599100087,10.769275043697563
20+
45.194745189999999,27.9679009,148,19.43,-16.464077181978038,10.317900103503138
21+
45.194586559999998,27.968047120000001,147,19.77,-16.56649815648268,10.789070341380478
22+
45.19444343,27.96818159,146,20.609999999999999,-17.071561947606163,11.547028737690283
23+
45.194290520000003,27.96832285,147,20.379999999999999,-17.077654649930047,11.121965278570265
24+
45.194118879999998,27.96847837,147,19.649999999999999,-16.465942780722543,10.723582812752978
25+
45.193966320000001,27.968609109999999,147,19.77,-16.56649815648268,10.789070341380478
26+
45.19380658,27.968749620000001,147,19.02,-15.938027057981822,10.379773287458608
27+
45.193670050000001,27.9688804,147,19.550000000000001,-16.382146634255765,10.669009872230063
28+
45.193522489999999,27.96901501,147,19.890000000000001,-16.667053532242821,10.854557870007978
29+
45.193361629999998,27.96916551,147,20.399999999999999,-17.094413879223403,11.132879866674848
30+
45.193226269999997,27.969293830000002,147,19.640000000000001,-16.457563166075868,10.718125518700688
31+
45.193079060000002,27.969428499999999,147,19.879999999999999,-16.65867391759614,10.849100575955685
32+
45.192918499999998,27.969578940000002,147,19.890000000000001,-16.667053532242821,10.854557870007978
33+
45.192779250000001,27.969711579999998,147,19.539999999999999,-16.373767019609083,10.663552578177772
34+
45.192615590000003,27.969853149999999,147,19.300000000000001,-16.172656268088812,10.532577520922773
35+
45.192476429999999,27.969975380000001,147,19.539999999999999,-16.373767019609083,10.663552578177772
36+
45.192325709999999,27.970109839999999,148,20.379999999999999,-17.269062942290912,10.822377977838084
37+
45.192163209999997,27.97025232,148,19.780000000000001,-16.760650883145942,10.503760372994961
38+
45.192022489999999,27.970379900000001,148,20.77,-17.599530780735144,11.029479420986114
39+
45.191867449999997,27.970509929999999,148,21.210000000000001,-17.972366290774794,11.263132331204405
40+
45.191709500000002,27.970658239999999,148,19.879999999999999,-16.845386226336768,10.556863307135481
41+
45.191572039999997,27.970789010000001,148,19.760000000000002,-16.743703814507775,10.493139786166857
42+
45.191403960000002,27.970936909999999,148,19.789999999999999,-16.769124417465022,10.509070666409013
43+
45.19126722,27.971060099999999,148,19.16,-16.235291755362802,10.174522181323734
44+
45.191122300000004,27.97119515,147,19.41,-16.264832029202267,10.592607755497982
45+
45.190957429999997,27.971338329999998,147,19.399999999999999,-16.256452414555589,10.587150461445688
46+
45.190815270000002,27.971465049999999,147,19.399999999999999,-16.256452414555589,10.587150461445688
47+
45.190667840000003,27.971601029999999,147,19.27,-16.147517424148774,10.516205638765898
48+
45.190504349999998,27.971749620000001,148,20.379999999999999,-17.269062942290912,10.822377977838084
49+
45.190362729999997,27.97187804,148,20.25,-17.158906996142836,10.753344163455408
153 KB
Loading
154 KB
Loading

0 commit comments

Comments
 (0)