> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/vspy-3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-tutorials/tutorial-decode-signals-from-messages/part-3-enter-an-equation-for-an-analog-value.md).

# Part 3 - Enter an Equation for an Analog Value

To indicate how the value is encoded in the Throttle Position signal, an equation needs to be entered for it.

### 1. Select Signal Type:

Throttle position can have many possible values. It is variable and therefore analog rather than digital. The signal type can be selected from the dropdown list at the top of the Edit Signal Dialog. Select **Analog** from the list for this example.

### 2. Select Signal Location:

Next, tell Vehicle Spy which bits and bytes in the message to decode. Click on the **Start Bit** field and make sure the **Bit Position** is set to **0**. The **Length** needs to be set to **8** bits. This setup will set the first byte of the Engine Parameters message as the raw value of the Throttle Position signal. Leave the endianness set to the default of **Big End First**.

### 3. Select Signal Format:

The **Format** option (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smOne.gif)) tells Vehicle Spy how to show the data returned.  Select **0.0** from the list. With this setting the signal will be displayed with one place after the decimal point. The minimum of 0 and the maximum of 255 will automatically populate.

### 4. Enter Units:

Type **%** in the **Units** field (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smTwo.gif)). This will cause the Throttle Position values to be displayed with % as its engineering units.

![](https://2280262322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3KyOmcYmM6ZVd3OQDa1%2Fuploads%2Fs4XNhKi0Y7PdYoVcQ6Ch%2Fspyexample3.3.1.gif?alt=media\&token=1e5f6acc-b67a-4cf5-b4b4-60155cd8ad1f)

![Figure 1: Entering an equation for an analog signal.](https://2280262322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3KyOmcYmM6ZVd3OQDa1%2Fuploads%2FSLfXiVN2QoHWZQU7D2zc%2Fspyexample3.3.2.gif?alt=media\&token=fc0cdac2-e999-4967-ae79-a69a23f8c4f5)

### 5. Edit Equation:

Select the **Scaling** tab (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smThree.gif)). This tab is where the equation to convert raw data into real world engineering values is done. Select **Linear mX+b** in the **Scaling Type** field (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smFour.gif)). Enter a linear scaling factor of **0.3921568** in the **Engineering Value** field (Figure 1:![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smFive.gif)). This value will scale an 8 bit value to a percent. (0.3921568 = 100 % / 255 bits).

### 6. Select Raw Value Type:

By default the Raw Value Type is set to **Unsigned Integer**.

### 7. Finish Equation:

Press **OK** to complete equation ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/smSix.gif).

**\*Note:** If we were decoding digital signals, the procedure would be very similar. Simply select **Digital** for **Signal Type** and then enter the bit position for the signal.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-tutorials/tutorial-decode-signals-from-messages/part-3-enter-an-equation-for-an-analog-value.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
