Some Ground Traffic Control reports provide information in a "status mask" or "bitmask" format. Bitmasks provide a maximum of information in a compact, easily transmittable form, but are not easily readable by people. Most reports offer the information in a human-readable format. This article describes how to interpret a bitmask value into readable information.
|0||Input 1 state||1=Low, 0=High|
|1||Input 2 state||1=Low, 0=High|
|2||Input 3 state||1=Low, 0=High|
|3||Input 4 state||1=Low, 0=High|
|4||Input 5 state||1=Low, 0=High|
|5||Input 1 state change||1=Change, 0=No Change|
|6||Input 2 state change||1=Change, 0=No Change|
|7||Input 3 state change||1=Change, 0=No Change|
|8||Input 4 state change||1=Change, 0=No Change|
|9||Input 5 state change||1=Change, 0=No Change|
|10||Motion Start/Stop||1=Motion start/stop, 0=Not motion start/stop|
|11||Panic Button||1=Active, 0=Not active|
|13||Power On state||1=On, 2=Off|
|14||Cold Start||1=Device has reset, 0=Device has not reset|
|15||Odometer/Velocity Source||1=ECM, 0=GPS|
0=ECM if 15=1, 0=GPS if not
|17||Accel/Decel Reason||1=Accel or Decel was a reason for the log point|
|18||Cruise Control||1=On, 0=Off|
|19||Fuel Change||1=Fuel Change was a reason for the log point|
|20||Manual Fan Switch||1=On, 0=Off/Unavailable|
|21||After-treatment Active Regen Status||1=On, 0=Off|
|22||After-treatment Active Regen Forced Status||1=Forced On, 0=Forced Off|
|23||After-treatment Active Regen Inhibited Status||1=Inhibited, 0=Not Inhibited|
Converting Decimal to Binary
The value provided in the Status Mask column is a decimal representation of a binary bitmask. To convert to binary, use the Windows calculator or a website which provides conversion. If using the Windows calculator, change the view to Programmer mode.
If you are unfamiliar with binary counting, you can visit the Wikipedia page for an overview, however it is not strictly necessary to be able to use bitmasks.
A specific data packet on the report provides a Status Mask value of 40991. Converting to binary provides the value 1010000000011111.
The binary value, or bitmask, is a 16-digit number made of 1s and 0s. The rightmost digit is the 0th digit, and the leftmost digit is the 15th digit. Each of these digits corresponds to a specific bit of information in the above table. By comparing the bitmask to the table, you can determine what information has been conveyed in that particular data packet.
Value 1010000000011111 can be interpreted as follows:
Comparing to the above table, the following information about the vehicle state at the time of the data packet can be inferred:
- Bit 15: The odometer value was derived from the ECM.
- Bit 14: The device had continuous power prior to this data packet.
- Bit 13: The vehicle engine was running.
- Bit 11: The panic button was not active.
- Bit 10: The vehicle was either motionless or currently in motion (observe the speed information in the data packet to confirm which).
- Bits 9-5: Inputs 1-5 did not change.
- Bits 4-0: Inputs 1-5 were not active.