2011/07/01

UDPデータ(Ver2.3)

悩んでも仕方ない。詰めよう。
O2センサー1番2番は計算めどくさいんで、AF値でちょーだい。

ちょっと構造体がすっきり。

- - - - - - 8バイト境界
==========================================================
Byte[8]            ID                     //ただし[7]は\0固定
- - - - - - 
unsigned short  エンジン回転数   //LSB=1rpm
unsigned short  車速           //LSB=0.01km/h  
Byte                 燃料                   //LSB=1%                     <<Mod 
Byte                   電圧                  //LSB=0.1V                  <<Mod
Byte                   燃圧                  //LSB=3Kpa                  <<Mod
Byte                   点火タイミング   //LSB=0.5deg                 <<Mod 
- - - - - - 
unsigned short  吸気圧              //LSB=0.1Kpa  (絶対圧) <<Mod
Byte                   吸気温度     //LSB=1℃(offset +40)   <<Mod
Byte                   水温       //LSB=1℃(offset +40)    <<Mod
unsigned short  室温        //LSB=0.1℃                  <<Mod
unsigned short  外気温       //LSB=0.1℃                  <<Mod
- - - - - - 
unsigned short  排気温度     //LSB=1℃                    <<Mod
unsigned short  O2センサー        //-100~99.2 LSB=0.1 offset+100 <<Mod
unsigned short  LAFセンサー       //-100~99.2  LSB=0.1 offset+100<<NEW
unsigned short  方位        //LSB=0.1 磁北=0 東=90
- - - - - - 
Byte               緯度DDD                 //NMEA Format
Byte               緯度MM                   //NMEA Format
short              緯度.MMMM             //【N】MSB=0/【S】MSB=1
Byte               経度DD                   //NMEA Format
Byte               経度MM                  //NMEA Format
short              経度MMMM             //【E】MSB=0/【W】MSB=1
- - - - - - 
unsigned int     車速パルス       //LSB=1パルス(4パルス計算) 
- - - - - - 
unsigned short  タイヤ空気圧(FR)       //LSB=0.1Kgm/cm2
unsigned short  タイヤ空気圧(FL)       //LSB=0.1Kgm/cm2
unsigned short  タイヤ空気圧(RR)      //LSB=0.1Kgm/cm2
unsigned short  タイヤ空気圧(RL)      //LSB=0.1Kgm/cm2
- - - - - - 
Byte               タイヤ空気温度(FR)       //LSB=1℃
Byte               タイヤ空気温度(FL)       //LSB=1℃
Byte               タイヤ空気温度(RR)       //LSB=1℃
Byte               タイヤ空気温度(RL)       //LSB=1℃
Byte               TPMS電池残量(FR)       //0(空)-3(満)
Byte               TPMS電池残量(FL)       //0(空)-3(満)
Byte               TPMS電池残量(RR)       //0(空)-3(満)
Byte               TPMS電池残量(RL)       //0(空)-3(満)
- - - - - - 
Byte               ステータスBit            ///+0 (LSB)  ライトON
                                          ///+1   GPS捕捉
                                          ///+2   後退信号
                                          ///+3   サイドブレーキ 
                                          ///+4   フットブレーキ
Byte                 GPS衛星捕捉数   ///0-8
Byte                 Aスイッチ回数          ///0-255(サイクリック)
Byte                 Aスイッチ長押し押下回数   ///0-255(サイクリック)
Byte                 Bスイッチ押下回数             ///0-255(サイクリック) 
Byte                 Bスイッチ長押し押下回数      ///0-255(サイクリック) 
Byte                 A+Bスイッチ押下回数           ///0-255(サイクリック) 
Byte                 A+Bスイッチ長押し押下回数 ///0-255(サイクリック) 
- - - - - - 
unsigned short Reserved 油圧     //LSB=1Kpa  (絶対圧) (要センサー追加)
unsigned short  Reserved 油温  //LSB=0.1℃  (要センサー追加)
- - - - - - 
=========================================================

0 件のコメント:

コメントを投稿