Creating alerts

Are you having problems with using or developing a plugin? Let me know here.
Post Reply
manojpjoseph
Posts: 4
Joined: Tue Dec 23, 2014 4:06 pm

Creating alerts

Post by manojpjoseph » Mon Apr 27, 2015 9:28 am

Sir

I would like to get alerts when aircrafts reaches a certain distance from a pre defined location. Please tell how can I do this.
When the basestation database gets updated? Every change in position or level is recorded or the record is written after the movement is over?
Please advice.

Regards
Manoj

agw
Posts: 2249
Joined: Fri Feb 17, 2012 3:20 am

Re: Creating alerts

Post by agw » Mon Apr 27, 2015 9:18 pm

It depends on whether you know any programming languages, and which ones :) There is an item on the to-do list to add alerts to VRS but it's not high on the list of priorities.

The database record only holds the first and last position of the aircraft. I *think* the first position is written when the aircraft first transmits a location, the final position is not written until the aircraft has been out of range for about 25 minutes and the flight is flushed to disk. So that's not going to be suitable.

If you know one of the .NET languages then you can write a plugin that periodically looks through all of the aircraft lists that VRS is maintaining - one for each receiver and merged feed - and perform whatever action you want to perform when an aircraft first satisfies the alert condition. VRS has code that you can use to calculate the distance that each aircraft is from a given location.

If you know JavaScript then you can add a web page to the site that periodically fetches an aircraft list (or all of the aircraft lists) from the server and does the same thing. You can tell the server to calculate distances from any position when you fetch the aircraft list. However you would need to have the page open so that your JavaScript could keep running, either that or maybe you could write it using node.js and have that running in the background somewhere. The documentation on how to fetch an aircraft list, and how to interpret what the server sends to you, is here: http://www.virtualradarserver.co.uk/doc ... tList.aspx

manojpjoseph
Posts: 4
Joined: Tue Dec 23, 2014 4:06 pm

Re: Creating alerts

Post by manojpjoseph » Wed Apr 29, 2015 7:49 pm

Dear Sir

Thank you so much for the reply.
I can write programs in vb.net. Like you said I will try to use the data from Aircraft.json. Can u tell me where this file is located. And also can you suggest a topic in the forum which discuss programming using the data from aircraft.json?

Thanks
Manoj

agw
Posts: 2249
Joined: Fri Feb 17, 2012 3:20 am

Re: Creating alerts

Post by agw » Thu Apr 30, 2015 12:29 am

You can just send a request to VRS at http://<IP address of machine running VRS>/VirtualRadar/AircraftList.json. You need to send a couple of query string parameters with the request to tell the server where you want to calculate distances from, the documentation tells you what to send.

This topic's fine for asking questions about AircraftList.json, no worries :)

TurboCommander
Posts: 17
Joined: Mon Jun 02, 2014 4:06 pm

Re: Creating alerts

Post by TurboCommander » Wed Jan 27, 2016 4:32 pm

I wonder if there's any progress on this or more likely, if I missed noticing it on an update? Are alerts available yet? I'm VERY interested in this.

dsfh2992
Posts: 156
Joined: Tue Oct 06, 2015 9:57 pm

Re: Creating alerts

Post by dsfh2992 » Wed Jan 27, 2016 4:45 pm

No progress that I am aware of, but the suggestion above about using the JSON feed is a good one.

I'm sure the developer has lots of other stuff to work on. I am considering figuring out a way to add this to adsbexchange.com...

agw
Posts: 2249
Joined: Fri Feb 17, 2012 3:20 am

Re: Creating alerts

Post by agw » Thu Jan 28, 2016 12:21 am

No, no progress on it - I'm writing the web admin plugin at the moment. There was someone who wrote something to do alerts based on the feed from VRS though, he has a thread here:

http://forum.virtualradarserver.co.uk/v ... ?f=9&t=865

Post Reply