Create aerospace attitude indicator in dashboard?

@gerry: it should be the CSS, js, and img folders from the Github submission. Just those folders will do.

1 Like

I have those on my pi, in the node-red/static/flight/img css js folders

Open developer tools and you will see console errors. show to us so we can tell what is wrong

You'll have to configure your static folder in your .node-red/settings.js file first, if you haven't done so yet.

didn't configure, not sure what that means
I just created the static folder in explorer

You'll need to specify the path to your static folder in your .node-red/settings.js file.

If you open the file and search for "httpStatic" you should find a comment like this:

// When httpAdminRoot is used to move the UI to a different root path, the
// following property can be used to identify a directory of static content
// that should be served at http://localhost:1880/.

Just below that should be the path to your static folder, e.g.:

httpStatic: 'C:/Users/jdoe/.node-red/static'

That path depends on where you put your own static folder.

This seems to be one of the first things people do when starting with node-red, so I'm probably stating the obvious to you, but just in case... because this needs to be done or the flight gauges won't work...

1 Like

never had a static folder before so didn't do that, I'm on it now,

I didn't have one until yesterday so you're like a full day behind me :wink:

It seems you could put the static folder anywhere, but the recommendation I've seen is to put the static folder under .node-red. I think it's for security reasons---because the folder would be open to others, maybe?

What I know is swiss cheese, but putting it under .node-red seems to be the thing to do.

well, did the settings.js thing and dashboard is still blank

You can put it anywhere. Putting it under .node-red just keeps it all together if you want to move or backup everything Node-RED related

After changing the settings you'll need to restart node-red

the error message did change now it's

Source map error: Error: request failed with status 401
Resource URL: http://192.168.1.74:1880/ui/js/app.min.js
Source Map URL: angular-chart.min.js.map

did a full reboot of the pi, just because that's how I roll

@hotNipi: Any reason the flight data is refreshed at such a low rate? Will I run into issues if stream data, e.g., at 60 Hz from a TCP connection? I know the faster the rate, the more computation has to be done, which could exceed what your computer can handle... Just wondering if this is why the low refresh rate?

Oh man, I wish I could help but this is just the blind leading the blind... I'll have to let someone who actually knows node-red intervene... Sorry :smiley:

That's a playground, do what ever you like with it.

Great! 60 Hz it is :smiley:

Source map errors are not important. Can you show the network tab, to see if there is actually all files loaded

@hotNipi: If I want to change the altitude/speed ranges, I can tell I'll need to modify the SVG graphics, but I'll also need to somehow scale the deflections of the needle. Any pointers on how to change the scaling?