Windows窗体中使用C#的车辆跟踪系统 [英] Vehicle Tracking System In Windows Forms With C#

查看:93
本文介绍了Windows窗体中使用C#的车辆跟踪系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们正在开发Vehicle Tracking System.Am是Windows窗体的新手.
我们已在服务器中使用GPRS设备.它将提供以下输入格式:
典型的自动报告消息示例,

24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00(以十六进制表示,但应如上所述以二进制形式解码)

注意:
‘$’(0x24):标头,标准自动报告消息;
时间:0x050316,国际标准时间05:03:16;
日期:0x220902,22/09/2002
经度值:0x22128745,22°12.8745′
纬度值:0x113466574C,113°46.6574'.它的最后一个字节(0x15)表达
bit7654,纬度值的最后一位
适用于RS AVL的Roadsay Technology Limited通信协议
-12-

bit3,1:东经,0:西经
bit2,1:北纬,0:南纬
位1,1:有效的GPS数据,0:V无效的GPS数据
bit0,/

================================================== =============
我的疑问是
===========
是Dis HexaDecimal格式吗?如果是,则无法将其转换为Ascii格式.
这意味着有效的Ascii输出"不会在此处转换.
预期的转化如下所示
======================
范例1:* RS,1234567890,C2,112233,1,0,13808833059#


我可以知道如何从This
转换吗 24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00至RS,1234567890,C2,112233,1,0,13808833059#...

致谢和问候
普拉布


[edit Submitter ="Prabu"]
是赢取表格的新手..我可以知道如何转换有效输出吗?请给我有效输出.

3.1.3 GPRS自动报告消息(TCP/UDP)的格式
标准模式代码:
No.00 01 02 03 04 05 06 07 08 09 0A 0B
内容$ 0x1030731001 0x050316 0x220902
Notes Head终端序列号时间日期
编号0C 0D 0E 0F 10 11 12 13 14 15 16 17 18
内容0x22128745 0x03 0x113466574C 0x014028
注释纬度值/经度值,N,E,AV速度,折度
19号1A 1B 1C 1D 1E 1F
内容0xFFFFFBFF 0x15 0x25 0x79
注释VehStatus Usr_alarm_flag/
记录

典型的自动报告消息示例,
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00(以十六进制表示,但应如上所述以二进制形式解码)
注意:
‘$’(0x24):标头,标准自动报告消息;
时间:0x050316,国际标准时间05:03:16;
日期:0x220902,22/09/2002
经度值:0x22128745,22°12.8745′
纬度值:0x113466574C,113°46.6574'.它的最后一个字节(0x15)表达
bit7654,纬度值的最后一位
适用于RS AVL的Roadsay Technology Limited通信协议
-12-
bit3,1:东经,0:西经
bit2,1:北纬,0:南纬
位1,1:有效的GPS数据,0:V无效的GPS数据
bit0,/
速度,方向:0x014028,速度为014节,方向为028.
VehStatus:在Binary中标记vechile状态.
Usr_alarm_flag:可自定义的警报状态.
记录号:以二进制形式发送的短信每增加一个记录号.
2100串行添加的里程表功能:
里程:里程BCD代码:D11D10D9D8D7D6D5D4D3D2.D1D0,但是
D11D10D9D8D7D6D5D4位有效. 0x10保存D11D10、0x1E和0x1F保存
D9D8D7D6和0x1D保存D5D4.如果发生用户可自定义的警报,则0x1D保存
自定义警报状态,否则将保存D5D4.里程等于
D11D10D9D8D7D6D5D4 * 51.444(米),例如:03257915 * 51.444(米)=
167600.18Km.
当head为'M'或'P'时,则'M'数据包为图片索引,而'P'数据包为图片
数据.对于"M"数据包,0x10字节的低位表示图片格式,而较高的
0x10字节中的位表示图片模块编号,0x1E和0x1F的内容为
‘0xFF’.对于"P"包,0x1E字节和0x1F字节的内容是图片编号和
块号. "P"包数据包括32个字节的图片索引和一个块的
数据(512字节),总共544字节.
head当头为"L"时,数据包数据即为"C9"表示的驾驶员登录数据.然后
的内容 0x16〜0x17不是速度和方向,而是表示驾驶员ID的BCD代码.
head当磁头为"R"时,数据包数据通过"C13","C21"从闪存驱动记录.
head当head为"D"时,数据包数据为512字节,记录总共21秒的数据.firt
秒的数据与"$"数据包(32字节)相同,后20秒的数据为
480bytes(每秒数据为24个字节,在"$"数据包数据中为0x06-0x1DByte.请参见
设置事故怀疑数据记录(C12)".
[/edit]

Hi,
We have developing Vehicle Tracking System.Am Very new to Windows Forms.
We have Used GPRS Device In server.It will provide Following Input Format:
An example of typical auto report message,

24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 (in Hex, but should be decoded in binary as above)

Note:
‘$’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -

bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/

================================================================
My doubt Is
===========
Is dis HexaDecimal Format?If Yes Means It cannot converted to Ascii Format.
Which means Valid Ascii Out is not converted Here.
Expected Conversion Is Shown Below
=======================
example1:*RS,1234567890,C2,112233,1,0,13808833059#


May i know how to convert from This
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 To RS,1234567890,C2,112233,1,0,13808833059#...

Thx and Regards
Prabu


[edit submitter="Prabu"]
Am very New to Win Forms..May i know How to convert the Valid Output.Pls Give me Valid Output.

3.1.3 Fomat of GPRS auto report message (TCP/UDP)
Standard mode code:
No. 00 01 02 03 04 05 06 07 08 09 0A 0B
Content $ 0x1030731001 0x050316 0x220902
Notes Head Terminal serial code time date
No. 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18
Content 0x22128745 0x03 0x113466574C 0x014028
Notes Latitude value / Longitude value,N,E,AV Speed,direciton
No. 19 1A 1B 1C 1D 1E 1F
Content 0xFFFFFBFF 0x15 0x25 0x79
Notes VehStatus Usr_alarm_flag /
Record
No
An example of typical auto report message,
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 (in Hex, but should be decoded in binary as above)
Note:
‘$’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -
bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/
Speed, direction: 0x014028, speed is 014 knot,direction is 028.
VehStatus: mark the vechile state in Binary.
Usr_alarm_flag: customizable alarm status.
Record No.: Record No. increases one per sms sent in Binary.
2100 Serial added milemeter function:
Mileage: mileage BCD code:D11D10D9D8D7D6D5D4D3D2.D1D0,but
D11D10D9D8D7D6D5D4 bits is valid. 0x10 saves D11D10, 0x1E and 0x1F save
D9D8D7D6,and 0x1D saves D5D4.In case user customizable alarm happens,0x1D saves
customization alarm status, or it will save D5D4. Mileage equals
D11D10D9D8D7D6D5D4*51.444(meter), Example: 03257915*51.444(meter)=
167600.18Km.
 When head is ‘M’or ‘P’, then ‘M’ packet is picture index and ‘P’ packet is picture
data.To ‘M’ packet,the lower bits in 0x10 byte express picture format and the higher
bits in 0x10 byte express picture module number, the content of 0x1E and 0x1F is
‘0xFF’ . To ‘P’ packet, the content of 0x1E byte and 0x1F byte is picture number and
block number. The ‘P’ packet data includes 32 bytes picture index and a block’s
data(512 bytes),totally 544bytes.
 When head is ‘L’, the packet data is driver’s logon data by ’C9’. then the content of
0x16~0x17 arenot speed and direction,but BCD code to express driver’s ID.
 When head is ‘R’, the packet data is driving record from flash memory by ‘C13’,’C21’.
 When head is ‘D’, the packet data is 512 bytes to record total 21 seconds data.The firt
second’s data is the same as ‘$’ packet(32 bytes), the later 20 seconds’ data is
480bytes(every second’s data is 24 bytes as 0x06-0x1Dbyte in the ‘$’ packe data. Refer
to ‘Set accident doubt data record (C12)’.
[/edit]

推荐答案

"(0x24):标头,标准自动报告消息;
时间:0x050316,国际标准时间05:03:16;
日期:0x220902,22/09/2002
经度值:0x22128745,22°12.8745′
纬度值:0x113466574C,113°46.6574'.它的最后一个字节(0x15)表达
bit7654,纬度值的最后一位
适用于RS AVL的Roadsay Technology Limited通信协议
-12-

bit3,1:东经,0:西经
bit2,1:北纬,0:南纬
位1,1:有效的GPS数据,0:V无效的GPS数据
bit0,/

================================================== =============
我的疑问是
===========
是Dis HexaDecimal格式吗?如果是,则无法将其转换为Ascii格式.
这意味着有效的Ascii输出"不会在此处转换.
预期的转化如下所示
======================
范例1:* RS,1234567890,C2,112233,1,0,13808833059#


我可以知道如何从This
转换吗 24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00至RS,1234567890,C2,112233,1,0,13808833059#...

致谢和问候
普拉布


[edit Submitter ="Prabu"]
是赢取表格的新手..我可以知道如何转换有效输出吗?请给我有效输出.

3.1.3 GPRS自动报告消息(TCP/UDP)的格式
标准模式代码:
No.00 01 02 03 04 05 06 07 08 09 0A 0B
内容
’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -

bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/

================================================================
My doubt Is
===========
Is dis HexaDecimal Format?If Yes Means It cannot converted to Ascii Format.
Which means Valid Ascii Out is not converted Here.
Expected Conversion Is Shown Below
=======================
example1:*RS,1234567890,C2,112233,1,0,13808833059#


May i know how to convert from This
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 To RS,1234567890,C2,112233,1,0,13808833059#...

Thx and Regards
Prabu


[edit submitter="Prabu"]
Am very New to Win Forms..May i know How to convert the Valid Output.Pls Give me Valid Output.

3.1.3 Fomat of GPRS auto report message (TCP/UDP)
Standard mode code:
No. 00 01 02 03 04 05 06 07 08 09 0A 0B
Content


0x1030731001 0x050316 0x220902
Notes Head终端序列号时间日期
编号0C 0D 0E 0F 10 11 12 13 14 15 16 17 18
内容0x22128745 0x03 0x113466574C 0x014028
注释纬度值/经度值,N,E,AV速度,折度
19号1A 1B 1C 1D 1E 1F
内容0xFFFFFBFF 0x15 0x25 0x79
注释VehStatus Usr_alarm_flag/
记录

典型的自动报告消息示例,
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00(以十六进制表示,但应如上所述以二进制形式解码)
注意:
0x1030731001 0x050316 0x220902
Notes Head Terminal serial code time date
No. 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18
Content 0x22128745 0x03 0x113466574C 0x014028
Notes Latitude value / Longitude value,N,E,AV Speed,direciton
No. 19 1A 1B 1C 1D 1E 1F
Content 0xFFFFFBFF 0x15 0x25 0x79
Notes VehStatus Usr_alarm_flag /
Record
No
An example of typical auto report message,
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 (in Hex, but should be decoded in binary as above)
Note:


"(0x24):标头,标准自动报告消息;
时间:0x050316,国际标准时间05:03:16;
日期:0x220902,22/09/2002
经度值:0x22128745,22°12.8745′
纬度值:0x113466574C,113°46.6574'.它的最后一个字节(0x15)表达
bit7654,纬度值的最后一位
适用于RS AVL的Roadsay Technology Limited通信协议
-12-
bit3,1:东经,0:西经
bit2,1:北纬,0:南纬
位1,1:有效的GPS数据,0:V无效的GPS数据
bit0,/
速度,方向:0x014028,速度为014节,方向为028.
VehStatus:在Binary中标记vechile状态.
Usr_alarm_flag:可自定义的警报状态.
记录号:以二进制形式发送的短信每增加一个记录号.
2100串行添加的里程表功能:
里程:里程BCD代码:D11D10D9D8D7D6D5D4D3D2.D1D0,但是
D11D10D9D8D7D6D5D4位有效. 0x10保存D11D10、0x1E和0x1F保存
D9D8D7D6和0x1D保存D5D4.如果发生用户可自定义的警报,则0x1D保存
自定义警报状态,否则将保存D5D4.里程等于
D11D10D9D8D7D6D5D4 * 51.444(米),例如:03257915 * 51.444(米)=
167600.18Km.
当head为'M'或'P'时,则'M'数据包为图片索引,而'P'数据包为图片
数据.对于"M"数据包,0x10字节的低位表示图片格式,而较高的
0x10字节中的位表示图片模块编号,0x1E和0x1F的内容为
‘0xFF’.对于"P"包,0x1E字节和0x1F字节的内容是图片编号和
块号. "P"包数据包括32个字节的图片索引和一个块的
数据(512字节),总共544字节.
head当头为"L"时,数据包数据即为"C9"表示的驾驶员登录数据.然后
的内容 0x16〜0x17不是速度和方向,而是表示驾驶员ID的BCD代码.
head当磁头为"R"时,数据包数据通过"C13","C21"从闪存驱动记录.
head当head为"D"时,数据包数据为512字节,记录总共21秒的数据.firt
秒的数据与"
’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -
bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/
Speed, direction: 0x014028, speed is 014 knot,direction is 028.
VehStatus: mark the vechile state in Binary.
Usr_alarm_flag: customizable alarm status.
Record No.: Record No. increases one per sms sent in Binary.
2100 Serial added milemeter function:
Mileage: mileage BCD code:D11D10D9D8D7D6D5D4D3D2.D1D0,but
D11D10D9D8D7D6D5D4 bits is valid. 0x10 saves D11D10, 0x1E and 0x1F save
D9D8D7D6,and 0x1D saves D5D4.In case user customizable alarm happens,0x1D saves
customization alarm status, or it will save D5D4. Mileage equals
D11D10D9D8D7D6D5D4*51.444(meter), Example: 03257915*51.444(meter)=
167600.18Km.
 When head is ‘M’or ‘P’, then ‘M’ packet is picture index and ‘P’ packet is picture
data.To ‘M’ packet,the lower bits in 0x10 byte express picture format and the higher
bits in 0x10 byte express picture module number, the content of 0x1E and 0x1F is
‘0xFF’ . To ‘P’ packet, the content of 0x1E byte and 0x1F byte is picture number and
block number. The ‘P’ packet data includes 32 bytes picture index and a block’s
data(512 bytes),totally 544bytes.
 When head is ‘L’, the packet data is driver’s logon data by ’C9’. then the content of
0x16~0x17 arenot speed and direction,but BCD code to express driver’s ID.
 When head is ‘R’, the packet data is driving record from flash memory by ‘C13’,’C21’.
 When head is ‘D’, the packet data is 512 bytes to record total 21 seconds data.The firt
second’s data is the same as ‘


这篇关于Windows窗体中使用C#的车辆跟踪系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆