Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 2.49 KB

File metadata and controls

69 lines (51 loc) · 2.49 KB

Data and Transmission Format

Data Format

Transmission Format

Data From Remote Controller to the Vehicle

The data received from the controller is in the format of at least 12 character string with a given starting pattern and ending pattern and in between a well delimited string of data values.

Transmitted Data: $$$&1&650&1&650&1&0&0&0&###
Explanation Ref:  ***0a0abc1a1abc2a2b2c2d3***

Where:

  • $$$ is the starting pattern
  • ### is the ending pattern
  • & is the delimiter

In the Explanation Ref, the *** at the beginning and at the end of the string are the starting and ending patterns. In between is the control data. The numeric digit before the alphabet is just the delimiter but I keep them both because they are that way easy to remember.

Where:

  • 0a - is MotorA direction.
  • 0abc - is MotorA speed (duty cycle).
  • 1a - is MotorB direction.
  • 1abc - is MotorB speed (duty cycle).
  • 2a - is head light state (on/off).
  • 2b - is rear light state (on/off).
  • 2c - is left turn signal state (blinking/off).
  • 2d - is right turn signal state (blinking/off).
  • 3 - the last delimiter.

Data From Vehicle to the Remote Controller

The rover will send a response to the controller after receiving the data and also while idling, before I find a mechanism to make it send data only when required to. The data is in the format of at least 59 character string with a given starting pattern and ending pattern and in between a well delimited string of data values.

Transmitted Data: $$$&340.65&40.443&-79.943&12:00:00&0.00&1&650&1&650&1&0&0&0&###
Explanation Ref:  ***0abcdef1abcdef1abcdefg2abcdefgh3abcd4a4abc5a5abc6a6b6c6d7***

Where:

  • $$$ is the starting pattern
  • ### is the ending pattern
  • & is the delimiter

In the Explanation Ref, the *** at the beginning and at the end of the string are the starting and ending patterns. In between is the control data to send to the controller.

Where:

  • 0abcdef - is the magnetic heading in degrees.
  • 1abcdef - is the latitude in degrees.
  • 1abcdefg - is the longitude in degrees.
  • 2abcdefgh - is the time in UTC.
  • 3abcd - is the speed in knots.
  • 4a - is the MotorA direction.
  • 4abc - is the MotorA speed (duty cycle).
  • 5a - is the MotorB direction.
  • 5abc - is the MotorB speed (duty cycle).
  • 6a - is head light state (on/off).
  • 6b - is rear light state (on/off).
  • 6c - is left turn signal state (blinking/off).
  • 6d - is right turn signal state (blinking/off).