Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Stratux Information #651

Closed
1 task
Sara1371 opened this issue Jul 25, 2017 · 16 comments
Closed
1 task

Getting Stratux Information #651

Sara1371 opened this issue Jul 25, 2017 · 16 comments
Labels

Comments

@Sara1371
Copy link

  1. Stratux version: home-built with RPI3

  2. Stratux config:

    SDR

    • single
    • [ x] dual

    GPS

    • [x
      picture 1
      picture 2

] yes
- [ ] no
type:

AHRS
  - [ ] yes
  - [ ] no

power source:

usb cable:
  1. EFB app and version: (e.g., WingX Pro7 8.6.2)

    EFB platform: (e.g., iOS 9.2)

    EFB hardware: (e.g., iPad Mini 2)

  2. Description of your issue:
    I want to get information through this link as an example. http://192.168.10.1/getSituation
    , but what I get instead of picture 1 is picture 2. What is the reason?

If possible, enable "Replay Logs", reproduce the problem, and provide a copy of the logs in http://192.168.10.1/logs/stratux/ and http://192.168.10.1/logs/stratux.log.

@Nokomis449
Copy link

Nokomis449 commented Jul 25, 2017

Don't know if this is helpful, but you can see how the (old?) Python screen script pulls the data by looking at the file https://github.com/cyoung/stratux/blob/master/test/screen/screen.py

Specifically:
response = urllib2.urlopen('http://localhost/getStatus')
getStatusHTML = response.read()
getStatusData = json.loads(getStatusHTML)
CPUTemp = getStatusData["CPUTemp"]
uat_current = getStatusData["UAT_messages_last_minute"]
uat_max = getStatusData["UAT_messages_max"]
es_current = getStatusData["ES_messages_last_minute"]
es_max = getStatusData["ES_messages_max"]

(EDIT: getSituation would work the same way)

@kdknigga
Copy link
Contributor

kdknigga commented Jul 25, 2017 via email

@Sara1371
Copy link
Author

Ok. Thanks a lot. Here is my issue: I am looking for the information of the aircraft in the picture attached. I mean their lat, long and etc. What I am getting in python while typing these are lat=0, long=0 and.... I could get nothing related to the aircraft seen in the traffic part of Stratux website. Why am I getting lat =0, lng=0?
screenshot 19
Many thanks for the help.

@kdknigga
Copy link
Contributor

kdknigga commented Jul 25, 2017 via email

@Sara1371
Copy link
Author

Thanks a lot. I want to see what raw data is coming into Stratux or more specifically Raspberry Pi, that then is converted to the format we can see in 192.168.10.1/traffic website. I want to see any information which an ADS_B message contains. (all information as location, address, ICAO, velocity, etc. Is there any way for me to get that?

@kdknigga
Copy link
Contributor

kdknigga commented Jul 26, 2017 via email

@Sara1371
Copy link
Author

Dear kdknigga,
Thanks a lot for your help. I looked up at those links you gave and it seems they are exactly what I am looking for a long time. I need this data for part of my research at Electrical Engineering department so, I am a beginner in this particular area. Is there a possibility for you to give a more detailed guide about where I should start? Is there any specific program that I should install? As I am not familiar with Stratux related programming, the explanation written is not clear for me.

@kdknigga
Copy link
Contributor

kdknigga commented Jul 26, 2017 via email

@Sara1371
Copy link
Author

Where should I run this program? Does it need special programming tool? I can see nothing written about that.

@cyoung
Copy link
Owner

cyoung commented Jul 26, 2017

For dump1090 and dump978 you'll have to install the programs and their dependencies.

It really depends what you mean by "raw data". The "raw data" might just be a radio recording. The /traffic websocket passes through an update every time it gets data over the air. But it does combine messages like altitude updates with the last known (lat,lng).

https://github.com/cyoung/stratux/blob/master/notes/app-vendor-integration.md

See the section on part at the bottom, ws://192.168.10.1/traffic.

@Sara1371
Copy link
Author

Hello again. I am now on Linux trying to go through the dump-1090 instructions. I downloaded the related zip file and tried to go through the instructions given. When I typed "make" it said you do not have librtlsdr.pc on your PC. I am attaching the screen shot here. Is there any other extra file that I should have beside dump1090-master file?
screenshot from 2017-07-27 22-12-47
Many thanks for the help.

@alexberryman
Copy link

@Sara1371 This looks like a fix for your specific error: antirez/dump1090#108

This guide will get you the rest of the way https://ferrancasanovas.wordpress.com/2013/09/26/dump1090-installation/

Also checkout Virtual Radar Server for real-time visualization of this data. If you're not going to be flying with your Stratux device a then something like this plus dump1090 might be an easier setup to work with. Otherwise, if you stick with the Stratux device you can enable "Replay Logs" and just use SQL to get the data out of /var/log/stratux.sqlite with a select statement like this:

select traffic.Reg, traffic.Tail, traffic.Icao_addr, traffic.TargetType, traffic.Lng, traffic.Lat, traffic.Alt, timestamp.GPSClock_value FROM traffic INNER JOIN timestamp ON traffic.timestamp_id=timestamp.id;

@Sara1371
Copy link
Author

Sara1371 commented Aug 2, 2017

@bearcode
Thank you very much. This was exactly what I was looking for. I have another question I wonder if you can help me. I want to store the data which I am getting through ./dump1090 --raw. Is there any possibility for doing that?

@cyoung
Copy link
Owner

cyoung commented Aug 4, 2017

The sqlite logs that @bearcode references should have that data.

@Sara1371
Copy link
Author

Sara1371 commented Aug 4, 2017

@cyoung
Thanks for your help. Actually I am seeking a way to be able to store or save the raw data when displaying on Rpi's terminal and decode the file with a program written by myself. Is this possible to save the file? As far as I understood from @bearcode 's comment, sqlite is for when we are using Stratux, but know I am using ./dump1090 --raw to get the data.
Thanks a lot for your time.

@cyoung
Copy link
Owner

cyoung commented Aug 18, 2017

@Sara1371 - looks like you've got information needed for your project, re-open if you need anything further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants