Velodyne DIGITAL DRIVE - REV G Provozní pokyny Strana 23

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 43
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 22
A P P E N D I X D : M AT L A B S A M P L E C O D E
H
D
L
-
64
E
S2
and
S
2
.1
U
s
e
r
s
M
a
nu
a
Matlab sample code to read calibration data from
HDL-64E
output.
fileFilter = ‘*.pcap‘;
[File_name,Directory]=uigetfile(fileFilter,‘Open
a
.
pcap file‘)
;
Filename=[Directory
F
ile_name];
tic;
fid=fopen(Filename);
ttc=fread(fid,40);
ttc=fread(fid,42);
ttc=fread(fid,inf,‘1206*uint8=>uint8‘,58);
%ttch=dec2hex(ttc);
%
Determine how many data packets.
Packet=size(ttc)/1206;
% Convert data to single precision.
S1=single(ttc(2,:))*256+single(ttc(1,:));
S2=single(ttc(102,:))*2
5
6+single(ttc(101,:));
S3=single(ttc(202,:))*256+single(ttc(201,:));
S4=single(ttc(302,:))*256+single(ttc(301,:));
for i=0:10000 % Packets loop
status(i+1)=(ttc(1205+i*1206));
value(i+1)=(ttc(1206+i*1206));
end
a=[85 78 73 84 35]
fclose(fid);
toc;
Ind=strfind(value,a);
Loop through 64 lasers.
%
for i=1:64
temp=single(value(Ind(1)+64*(i_1)+16:Ind(1)+64*(i_1)+16+7));
temp1=single(value(Ind(1)+64*(i_1)+32:Ind(1)+64*(i_1)+32+7));
temp2=single(value(Ind(1)+64*(i_1)+48:Ind(1)+64*(i_1)+48+7));
temp3=single(value(Ind(1)+64*(i_1)+64:Ind(1)+64*(i_1)+64+7));
LaserId(i)=temp(1);
Add high and low bytes of Vertical Correction Factor together and check
%
i
f
positive or negative correction factor.
VerticalCorr(i)=temp(3)*256+temp(2);
if VerticalCorr(i)>32768
VerticalCorr(i)=VerticalCorr(i)_65536;
End
% Scale Vertical Correction Factor by Diving by 100.
VerticalCorr(i)=VerticalCorr(i)/100;
[
20
]
Zobrazit stránku 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 42 43

Komentáře k této Příručce

Žádné komentáře