since I can observe that the value in /var/local/heading is appearing as $1. I seem to have "lost" the stdin data from wind0 since $5, $6, and $7 show as "0 0 0000"
I incremented the string variable by 1 since the data from /var/local/heading appears to be read as $1. This is almost a blatant copy of the example code in the documentation on page #32-33.

Could someone please tell me how to fix the awk statement, or suggest another way to do this (calling a script?)

Ysbrand, thank you. That makes it work on the command line, but there is something weird going on with the syntax/formatting of $6. I'll have to figure out the syntax later, I want to get stdout to return the correct data first. Here's a bit more detail of what I'm doing here:

After umpteen months of on and off trying to hack this together I finally had someone help me and now have a working virtual sensor that pull data from a file and from an existing sensor. The magic line of code that made it work is:

The file /var/local/heading is updated by cron once a minute as it reads from the attached magnetometer/compass; I used pre-existing python code with the RaspberryPi to read the heading data. The "-" character at the end is very important as it tells awk to read from stdin and not just use the input file specified as the only input.