Author Topic: Is there a dummy PAW program?  (Read 4289 times)

rv12uk

Is there a dummy PAW program?
« on: April 05, 2017, 02:51:37 am »
Hi,

I've done a few searches but haven't found an answer to this (I guess most people who want to do this already know how to do it so don't ask).

I have a couple of ideas for using the PAW data (just simple processing and display on some home grown electronics) and wanted to ask if anyone had found/created a PC/PI setup to simply spew out dummy data on a port (or knows an easy of a way doing this).

A simply text file of some data (i.e. containing a sample of all the types of packets than the PAW may produce during normal running) that could be played out on IP would be all I was looking for. I'm just trying to avoid having to spend a bunch of time creating this as I guess someone would already have done it.

The idea is to be able to have a IP:PORT that I can connect to on my LAN that is producing valid (but not real world) PAW data (so I can connect to it with SkyDemon etc the same way as the real PAW)

My original PAW never worked very well in my flat so using a real system wouldn't be of much use (a couple of aircraft a day were all I could pick up in the living room :P)

I still have my original PAW setup (before the bridge and the licence has expired) so that will be getting replaced later this year/early next year when I start flying again, but until then I had a few pet projects I wanted to try out to see if they would work.

If it is too much trouble to get the feed going then I have other projects I can work on but thought it would be interesting to see what I can do with the output.

So does anyone have a PC program/setup or RPi image that can mimic the PAW data that they would be prepared to share?

Jon

Ian Melville

Re: Is there a dummy PAW program?
« Reply #1 on: April 05, 2017, 06:40:45 am »
Not sure why you would want to do this, but I have not seen anyone create such an app. Current users of up-to-date PAW can use the playback function to replay a flight when at home.

If you really want to playback fake flights then you would be best to stream FLARM messages into PAW using a USB- RS232 adapter. Just write an app to generate these messages. If you are really keen generate the data in a flight sim?

rv12uk

Re: Is there a dummy PAW program?
« Reply #2 on: April 05, 2017, 11:08:25 am »
I don't have access to the latest PAW at the moment, I will be purchasing whatever the latest version of it when the time comes (I'm currently building an RV12 and plan to install one in it when done, I'm just looking for something to pass the time on the nights I'm not in the garage building it).

I wanted to play around with creating a custom instrument to display the output (purely for fun as the SkyView system in the RV will be linked to the PAW anyway).

I'm just looking to have a port on my network here putting out PAW style data so I can connect to it as if it was a real PAW device.

The main reason for this is that I'm planning on learning some electronics (currently a software engineer). The equivalent 'hello world' hardware primers for bread boarding simply flash LED's etc but I thought it would be interesting to see if I could process the output of PAW on an embedded chip to and control the LED's or a small display.

This is purely me having a play with electronics and I could easily chose something else (weather data etc) but I'm a big fan of the PAW so thought it might be interesting to use it instead as the data source (and maybe come up with something interesting).
It may also help keep motivation/interest in the electronics learning rather than getting bored with flashing LED's based on temperature or movement on a sensor :P

Not sure if helps clear up what I'm doing or not. I could write a program myself to push data out of a port on the PC but rather than spend a few days doing that (or weeks given the limited time I have to play with this when not building), I though I would ask to see if anything was already available.

If not I will just look at using one of the online weather apps for the project as it could be up to a year before I start flying again and have access to a PAW with data to playback at home.

Ian Melville

Re: Is there a dummy PAW program?
« Reply #3 on: April 05, 2017, 11:41:13 am »
Hi Jon, I get where you are coming from now.

It would not be hard for someone to record a data stream of PAW/FLARM type that can be input into a custom instrument. You would either have to send the RS232 data messages one at a time from a PC,  or write an quick application to send RS232 lines in accordance to the time stamp, so they don't all come at once.

A custom instrument similar the the LED based FLARM versions would be useful.

rv12uk

Re: Is there a dummy PAW program?
« Reply #4 on: April 05, 2017, 12:15:57 pm »
In it's simplest form I have thought about maybe an alert system to say you need to pay attention to PAW (something like a shifter light in a dragster etc) or maybe a display alter that simply has an arrow or something pointing to the target with a warning sound/flash to alert you to it.

This may not even be possible with what I will be playing with as it would involve generating a threat table from the data, the algorithms are quite complicated (and the main reason FLARM IP is so protected).

I doubt I will get that far but they say to aim high :D This is more a means to getting some play time with electronics. I have a background in engineering and computers and integrated the T45 radar tracking system in a previous job (plus my new toy is a 3D printer) so I thought it would be an interesting project to tinker with, while learning the printer and electronics, and see if I could make some kind of test instrument just for fun.


rv12uk

Re: Is there a dummy PAW program?
« Reply #5 on: April 12, 2017, 12:29:10 pm »
I had a play with some electronics using a small wifi board (sometimes referred to as the internet of things device) and decided to start my electronics introduction by modifying this rather than using a dedicated PIC/micro-controller as it is a lot less electronics work to start with. Ultimately I plan on designing a complete home built circuit (as the reason for doing this is to learn electronics).

Having a play with this stuff is very interesting and I did get something done (although it was mostly programming at this point, the electronics is just a few resisters and switches used for programming).
I used the PAW I have available at the moment as the input (a very early image and it has the wrong PI model but it kind of works when it isn't crashing or failing to boot up at all :D. Rebooting requires a few powercycles before the network starts up and the dhcp server doesn't appear to work so static IP's/gateways etc need to be setup to get a connection).

I managed to reprogrammed the board so it would receive PAW data and display the output on a screen. It took a fair amount of head scratching but it seems to work.
What can be done with the limited memory/processing available is yet to be seen but if I can get something working it would be very light and low powered, I suspect it will need a fair bit of the core code cut out to make enough room to do anything substantial.
Currently it simply displays the PAW output to screen but that took a fair chunk of the memory already.
Due to lack of PAW data (other than the keep-alive messages) I now need to find another data stream to work with, which will put this project on hold until later this year or next (when I plan on getting the latest version of PAW to take flying), I also have the next RV kit turning up next week so might be a bit busy anyway :D.
In the mean time I might to see what other things I can do with it on the odd night when I'm out of the shed, maybe a weather display or something or simply paring down the raw code to get a bit more space to give a smaller firmware to work with for future projects.

The picture below shows the screen (probably need a bigger one if I was to make an instrument) and the module on a development board, the rest is just power and stuff for programming. So apart from getting power in (possibly with 2 AA batteries) the small board and the screen is very compact and light. All work is done on the small board on the right, just add power and a display and it runs up, connects to the PAW wifi, telnet's in, reads the PAW data and sends it to the screen (one of the more tricky things to get working correctly)

A shot of it receiving and displaying PAW data (just to prove I got it working :D). I took a short video of it running but haven't processed it yet but can post that if anyone is interested.


If I get back to using the PAW as an input I will post some more details but it may be a while. I think this device could be interesting to play with for creating a very small and light unit that can attach itself to a network and display data (and would fit in the palm of your hand).



Paul_Sengupta

Re: Is there a dummy PAW program?
« Reply #6 on: April 12, 2017, 08:59:39 pm »
Some people have wondered about a small Flarm type multi-LED setup for displaying traffic. I was thinking of using one of these to provide such a display with some tri-colour LEDs. Anyway, since you're ahead of me, I thought I'd just throw this out there and see what happens!  ;D

rv12uk

Re: Is there a dummy PAW program?
« Reply #7 on: April 12, 2017, 11:55:05 pm »
It can be tricky to get working as there's lots of partial info out there and different ways of doing things with it, so every person seems to use different firmware/API packages.
It does appear to be a powerful (sic) low powered, small and light bit of hardware and with some smart coding could be used for a lot of things.

Driving LED's would probably be trickier than the screen as there are only two output pins by default. This means that IIC/I2C screens can be directly wired to the units, whereas multiple LED's would require a bit more work (using shift registers I guess) if you need more than 2 of them.

The screen I used (for a proof of concept) is far too small to be used in an aircraft at arms length but I can already think of some uses, maybe a full screen arrow pointing to the nearest track or something like that, or just to mimic LED display (like the steam gauge option on glass screens :D)

Let us know how you get on with yours if you have a play with it. They are good fun (if lots of head scratching and looking through chip spec's is your thing).

I did manage to get a video on my phone while testing it.
https://youtu.be/WBXTjvcta3I


rv12uk

Re: Is there a dummy PAW program?
« Reply #8 on: April 22, 2017, 02:17:19 pm »
Due to a weeks delay in my next kit turning up I had another play around with this idea.

I created a small set of PFLAA data for a single track, mixed in some GPS and PFLAU data and created a RPI program to push it out of port 2000 (very buggy bit of code but when it isn't crashing it seems to work :o).

I updated the firmware to calculate the distance to every target it sees and then display the closest (as the crow flies) target.

Not having access to real PAW data I don't know how fast it would come in or if I have the protocol exactly right but the chip seems to be able to handle the calculations needed for the target/graphics display maths ok. With modern chip speeds it has been a while since I have had to code for size/performance so I'm a bit rusty and I'm sure more can be done if needed.

For now this project will be going on the back burner (i.e. slow progress) but at least I have something to tinker with when I get time.

I did another video to show the latest mock up with with kind of display I'm thinking would be useful (needs more graphics work but it gives the general idea).
https://youtu.be/WD-4_aBVQEI

The original idea was to build a 2 1/4" instrument but now I'm thinking of a small cigarette packet sized box (or the minimum size for the 2xAA batteries needed if I stick with the current screen) and using a strip of velcro to mount it.

GeoffreyC

Re: Is there a dummy PAW program?
« Reply #9 on: April 24, 2017, 11:37:33 pm »
Hi Jon,

Great proof of concept video,  really shows what your idea is.

I was originally thinking that having another device wouldn't be a good thing and that overlaying this on an existing display would be more beneficial,  but having seen the simplicity of the screen I've changed my mind,  something cigarette packet or a little smaller would be ideal to give a 'one glance' mechanism of conflicting traffic.
Would have to be self-contained battery, ideally micro-USB rechargeable to avoid yet more cables.

Need to think how to show multiple conflicts (maybe cycle through them if they exist),  and what do to about bearingless targets,  but i can see this adds value.

Geoffrey

rv12uk

Re: Is there a dummy PAW program?
« Reply #10 on: April 25, 2017, 01:30:10 am »
Thanks, It has changed a bit in my head as I have played around with it.

Originally I was considering creating an instrument to fit alongside normal ones but as the kit is really light I thought it might be better to have it Velcro'd somewhere in sight (maybe even the top of the instrument panel if it was small enough).

I have seen these things running on two AA batteries but I would probably go for an inbuilt lipo plus usb charge socket (or a replaceable batteries), coincidentally, I was looking at lipo charging circuits last night (great minds and all that :D).

It is still a way off from being something usable at the moment (I'd really need to test it with a real PAW unit along side something like SD to make sure it was getting things right). Next step is to create an enclosure to see if I can get a portable unit to try out when the time comes (hopefully later this year at the rate I'm going with the kit).

I considered the multiple target option and have been thinking of ways it could be implemented, maybe using an altimeter/clock system (smaller hands for the other targets) would work. This version I want to keep as simple as possible (no buttons/config just turn the power on and leave it do it's thing). The other ones I have in mind would use buttons/touch screen for different options/settings but they are in the future at the moment.

I have also reconsidered the screen i'm using, I would love to know if it is viable in an aircraft (brightness wise) as something this small (1.3" screen) would be easy to fit on a dash without blocking any forward view, so it might be possible to use the setup I have already (it might be big enough if it were placed on top of the existing panel in direct line of sight).

This all assumes I progress with it, until I have a valid data source it isn't worth going too far with it at the moment, a valid PAW source may just swamp the unit and make it useless. Also by the time I get something for the data later this year (when I have finished building my kit with a SkyView display) I may decide the SV is good enough.

I thought the testing was useful enough to share for other to see/get ideas from. It started as a way for me to learn electronics so even if I don't plan on using the finished item myself it would be worth continuing for the learning experience, and it keeps the inventor in me happy (plus the end product might be useful to someone else).




GeoffreyC

Re: Is there a dummy PAW program?
« Reply #11 on: April 25, 2017, 08:15:04 pm »
I have also reconsidered the screen i'm using, I would love to know if it is viable in an aircraft (brightness wise) as something this small (1.3" screen) would be easy to fit on a dash without blocking any forward view, so it might be possible to use the setup I have already (it might be big enough if it were placed on top of the existing panel in direct line of sight).

You're always going to have challenges with the screen readability in a cockpit where one minute its in the shade and the next its got full glare of the sun across the screen.    I found my Airbox Aware was unreadable in some late evening lighting conditions until I fitted an anti-glare screen cover (bought a 99p one off ebay for a large tablet and just cut it down to size).
The screen size doesn't look that much different to the screen on my transponder and that's perfectly readable.  Most instruments are not much bigger than this.

Good luck with the project.   
« Last Edit: April 28, 2017, 05:08:55 pm by GeoffreyC »

rv12uk

Re: Is there a dummy PAW program?
« Reply #12 on: April 27, 2017, 11:50:55 pm »
Cockpit readability is always an issue with electronic screens. The problem is getting a good contrast without glare.

This little screen has a matt finish and is quite bright (when run at full power), the more I play with it the better it seems like it might work in the real world. A simply black and white display that is small enough to be level in the eye line wasn't originally in the plan but it looks more like it might be a good way to go.

I have started on a designing a case for this screen (can't finish it until I decide on the power source) but it gives an idea of the overall size of the unit that I am now affectionately calling the MTA (mini traffic aware) as I needed a name for the thing :D
https://youtu.be/iPTKurYYtq0


I keep coming back to play with this thing even though I should be doing other stuff :P