nmeareceiver.mdd
来自「matlab开发的GPS信号simulator」· MDD 代码 · 共 75 行
MDD
75 行
<?xml version="1.0" encoding="utf-8"?><MATLABInstrumentDriver> <FileVersion>2.42</FileVersion> <DriverName>C:\Program Files\MATLAB\R2007a\work\nmeareceiver.mdd</DriverName> <DriverType>MATLAB interface object</DriverType> <InstrumentType>Oscilloscope</InstrumentType> <InstrumentManufacturer>Manufacturer</InstrumentManufacturer> <InstrumentModel>Model</InstrumentModel> <InstrumentVersion>1.0</InstrumentVersion> <Identify>*IDN?</Identify> <Reset>*RST</Reset> <Selftest>*TST?</Selftest> <Error>System:Error?</Error> <CreateInitCode> <Code>function init(obj)% This function is called after the object is created.% OBJ is the device object.% End of function definition - DO NOT EDITinterface = get(obj, 'interface');set(interface, 'BaudRate', 4800);</Code> </CreateInitCode> <ConnectInitCode> <Type>InstrumentCommand</Type> </ConnectInitCode> <CleanupCode> <Type>InstrumentCommand</Type> </CleanupCode> <GroupInfo> <Group> <Name>parent</Name> <Description/> <Command/> <Size>1</Size> <Mappings> <ChannelMap Command="parent1" Index="1"/> </Mappings> <PropertyInfo/> <MethodInfo> <Method> <Name>getLocation</Name> <Location>parent</Location> <CapabilityGroup>Base</CapabilityGroup> <Type>MCode</Type> <Code> <MCode>function [lat, nsCardinal, long, ewCarinal] = getLocation(obj)interface = get(obj, 'interface');% For group functions, OBJ is the group object. For% base device functions, OBJ is the device object.% data='$GPGLL,2924.11158,N,1211.07392,W, 75.97,M'% we want the line starting with GPGLL for location% informationdata='';while isempty(strmatch('$GPGLL',data)) data = fscanf(interface)endremain = data;[lat,remain] = strtok(remain,',');[lat,remain] = strtok(remain,',');[nsCardinal,remain] = strtok(remain,',');[long,remain] = strtok(remain,',');[ewCardinal,remain] = strtok(remain,',');lat = str2double(lat);long = str2double(long);</MCode> </Code> <Description/> </Method> </MethodInfo> </Group> </GroupInfo></MATLABInstrumentDriver>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?