anything
AirNav RadarBox
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 


Author Topic: Reading Data from Port 7879  (Read 7983 times)

0 Members and 1 Guest are viewing this topic.

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Reading Data from Port 7879
« on: February 14, 2008, 04:05:27 PM »
I want to be able to do something with the data from port 7879, but I'm struggling a bit at the moment.  What I would like to do is to be able to is to manipulate the data in so that I can extract the information that I'm interested in.

So far, I've used Windows Hyperterminal to capture the data from port 7879 to a txt file.  RadarBox V1.3 allows data output in XML format, and V1.4 also allows a non-Radarbox output which is comma delimited with quotation marks around the data fields.

However, neither format seems to give a CR between lines of data, so I end up with one long steam of data rather than individual lines for each data "sentence"

So, I've got all this data, but I can't do anything with it.  Does anybody have any suggestions without getting into the realms of major programming!  I had hoped that I could import the csv data into Excel, but without the CR to break the lines up, I cant get this to work.

thanks

Allocator

tarbat

  • ShipTrax Beta Testers
  • Hero Member
  • *
  • Posts: 4219
    • Radarbox at Easter Ross
Re: Reading Data from Port 7879
« Reply #1 on: February 14, 2008, 05:19:05 PM »
Sorry, I can't think of an easy way of identifying the end of each data line easily.

Surely the lack of CR is going to be a problem anyway.  Looking at the comma-delimited output on port 30003 from Basestation, that has CR's.  I would have thought AirNav would be do better to put CR's on the end of each line of data to help make it compatible with SBS-1 addons.

Could you use the data directly from the SQLite database?  If only I could see what the new SQLite database looked like!!!
« Last Edit: February 14, 2008, 05:21:39 PM by tarbat »

EINN-07

  • Jr. Member
  • **
  • Posts: 88
Re: Reading Data from Port 7879
« Reply #2 on: February 14, 2008, 06:22:33 PM »
Hi Allocator,

I half think I know what you are trying to do and it may be possible in Excel. Can you give an example of a line of data and what you are trying to do with it ?

regards

Gerry

AirNav Support

  • AirNav Systems
  • Hero Member
  • *****
  • Posts: 4125
Re: Reading Data from Port 7879
« Reply #3 on: February 14, 2008, 06:24:01 PM »
Windows Hyperterminal  does not display CR very nicely hence you see a mess. Addons programs will handle it fine.

Anyway with XML output you don't need CRs.
Contact Customer/Technical support via:
http://www.airnavsystems.com/contact.html
[email protected]

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: Reading Data from Port 7879
« Reply #4 on: February 14, 2008, 08:45:56 PM »
Windows Hyperterminal  does not display CR very nicely hence you see a mess. Addons programs will handle it fine.

Anyway with XML output you don't need CRs.

Yes, but what do I do with the XML Output.  This is what I get when I capture the XML to a txt file.  Sorry about the single long line, but no CR

<MODESMESSAGE><DATETIME>20080214203621</DATETIME><MODES>400618</MODES><ALTITUDE>26000</ALTITUDE><VRATE>0</VRATE><LATITUDE>52.6305</LATITUDE><LONGITUDE>-3.0139</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203623</DATETIME><MODES>4CA215</MODES><CALLSIGN>EIN177</CALLSIGN><VRATE>0</VRATE><LATITUDE>0</LATITUDE><LONGITUDE>0</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203631</DATETIME><MODES>4009A0</MODES><ALTITUDE>04405</ALTITUDE><GROUNDSPEED>204</GROUNDSPEED><TRACK>126</TRACK><VRATE>-704</VRATE><LATITUDE>53.289</LATITUDE><LONGITUDE>-2.6561</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203632</DATETIME><MODES>400474</MODES><ALTITUDE>27900</ALTITUDE><VRATE>0</VRATE><LATITUDE>52.2656</LATITUDE><LONGITUDE>-3.2188</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203633</DATETIME><MODES>3C6304</MODES><ALTITUDE>27000</ALTITUDE><VRATE>0</VRATE><LATITUDE>52.3871</LATITUDE><LONGITUDE>-2.0051</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203633</DATETIME><MODES>400511</MODES><ALTITUDE>10975</ALTITUDE><VRATE>0</VRATE><LATITUDE>52.9328</LATITUDE><LONGITUDE>-3.0201</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203633</DATETIME><MODES>4CA215</MODES><CALLSIGN>EIN177</CALLSIGN><ALTITUDE>31900</ALTITUDE><GROUNDSPEED>453</GROUNDSPEED><TRACK>305</TRACK><VRATE>896</VRATE><LATITUDE>52.0049</LATITUDE><LONGITUDE>-3.2374</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203633</DATETIME><MODES>4CA117</MODES><ALTITUDE>28000</ALTITUDE><GROUNDSPEED>444</GROUNDSPEED><TRACK>154</TRACK><VRATE>-1472</VRATE><LATITUDE>52.6702</LATITUDE><LONGITUDE>-2.1033</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203633</DATETIME><MODES>40089C</MODES><ALTITUDE>27000</ALTITUDE><VRATE>0</VRATE><LATITUDE>53.0312</LATITUDE><LONGITUDE>-2.7626</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203635</DATETIME><MODES>4CA202</MODES><ALTITUDE>33450</ALTITUDE><GROUNDSPEED>449</GROUNDSPEED><TRACK>273</TRACK><VRATE>832</VRATE><LATITUDE>51.7804</LATITUDE><LONGITUDE>-2.1548</LONGITUDE></MODESMESSAGE><MODESMESSAGE><DATETIME>20080214203635</DATETIME><MODES>471624</MODES>

And this is what I get with text:

"2008/02/14","20:39:33.000","4763108","48ADE4","LOT26","Poland","0","32000","32000","51.6943","-2.0173","0","0","462","274","""2008/02/14","20:39:34.000","5022424","4CA2D8","RYR47Q","Ireland","0","38000","38000","51.6753","-1.2465","0","0","445","275","""2008/02/14","20:39:45.000","4196794","4009BA","EXS864","United Kingdom","0","33025","33025","52.0302","-3.2566","0","0","423","002","""2008/02/14","20:40:00.000","5022424","4CA2D8","RYR47Q","Ireland","0","38000","38000","51.6803","-1.3315","0","0","445","27

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: Reading Data from Port 7879
« Reply #5 on: February 14, 2008, 08:53:11 PM »
Could you use the data directly from the SQLite database?  If only I could see what the new SQLite database looked like!!!

Tarbat,

If you would like a copy of MyLog.db3 to play with, PM me.

It's about 4mb zipped up

Allocator

AirNav Support

  • AirNav Systems
  • Hero Member
  • *****
  • Posts: 4125
Re: Reading Data from Port 7879
« Reply #6 on: February 14, 2008, 09:24:41 PM »
Hi Allocator,

The port output is designed for addon use. Not for copying into excel and hence it not friendly for that purpose.

Using xml you in a program you can very quickly pull out only the details you want. Such as just the Registrations from all the messages received. It take longer using the SBS output.
Contact Customer/Technical support via:
http://www.airnavsystems.com/contact.html
[email protected]

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: Reading Data from Port 7879
« Reply #7 on: February 14, 2008, 09:35:06 PM »
Hi Allocator,

The port output is designed for addon use. Not for copying into excel and hence it not friendly for that purpose.

Using xml you in a program you can very quickly pull out only the details you want. Such as just the Registrations from all the messages received. It take longer using the SBS output.

Ok Support, thanks for that.  I'd really like to create an add-on but I've no idea where to start.  I can't program to the level where I can use XML I'm afraid.

I was going to create a simple add-on using Excel so that users could look at their data as they wished.  I'm running V1.4 so I can export csv data, but this is not all the data sent out of port 7879.  All it would need is a CR at the end of each data line and then import to a whole bunch of database programs would be easy!

I guess that I'll just have to wait until somebody cleverer than me writes an XML program.

I've tried RadarBox Explorer which worked well with the earlier versions of RB, but much of the inforamtion comes out as zeros and the program seems to have stopped development.

I think that when V1.4 is released, users will want to do much more with the recorded data.

tarbat

  • ShipTrax Beta Testers
  • Hero Member
  • *
  • Posts: 4219
    • Radarbox at Easter Ross
Re: Reading Data from Port 7879
« Reply #8 on: February 14, 2008, 10:17:25 PM »
I think that when V1.4 is released, users will want to do much more with the recorded data.
The recorder file (in v1.3)  looks like it's in CSV format with CRs at the end of each data line, perhaps we can work out what the format is.  Here's an example:
$PTA,20080214182529095,400A5B,,24025,400.5,187.6,2368,,56.9670,-4.1841,,
$PTA,20080214182530108,400A5B,,24075,400.5,187.6,2368,,56.9653,-4.1847,,
$PTA,20080214182531121,400A5B,BMA693,24100,400.5,187.6,2368,,56.9635,-4.1849,,
$PTA,20080214182532135,400A5B,,24150,400.5,187.6,2368,,56.9617,-4.1854,,
$PTA,20080214182533150,400A5B,,24175,400.5,187.6,2304,,56.9599,-4.1860,5445,

Allocator

  • RadarBox24.com Beta Testers
  • Hero Member
  • *
  • Posts: 3568
Re: Reading Data from Port 7879
« Reply #9 on: February 15, 2008, 03:28:12 PM »
I think that when V1.4 is released, users will want to do much more with the recorded data.
The recorder file (in v1.3)  looks like it's in CSV format with CRs at the end of each data line, perhaps we can work out what the format is.  Here's an example:
$PTA,20080214182529095,400A5B,,24025,400.5,187.6,2368,,56.9670,-4.1841,,
$PTA,20080214182530108,400A5B,,24075,400.5,187.6,2368,,56.9653,-4.1847,,
$PTA,20080214182531121,400A5B,BMA693,24100,400.5,187.6,2368,,56.9635,-4.1849,,
$PTA,20080214182532135,400A5B,,24150,400.5,187.6,2368,,56.9617,-4.1854,,
$PTA,20080214182533150,400A5B,,24175,400.5,187.6,2304,,56.9599,-4.1860,5445,


The recorder file is actually quite interesting.  Data fields (V1.4) are:

$PTA - no idea what this is
Date_Time
Mode S
Flight ID
Altitude
Speed
Heading
Vertical speed
? - not populated in my recorder file
Latitude
Longitude
SSR (Mode A)

As this is a csv file, it imports very nicely into Excel.  If you then sort in the order:

Mode S/Date_Time/Flight ID

you can follow individual aircraft and see climb/descent, squawk changes and you could plot their relative position if you wanted to.

A bit more work would produce maximum and minimum levels etc.  Excel probably isn't the best tool for this, but it's interesting to be able to manipulate the data.