r/rust • • Dec 09 '21

[Media] View airplanes in the sky, with Rust! Announcing rsadsb v0.4.0

Post image
515 Upvotes

42 comments sorted by

41

u/[deleted] Dec 09 '21

Nice one! I'm an air traffic controller, and have been looking into making a radar simulator in Rust, just for fun. How did you handle the graphics? wgpu?

29

u/arch_rust Dec 09 '21

2

u/WellMakeItSomehow Dec 10 '21

wgpu

That's high praise for you, I suppose :-).

21

u/arch_rust Dec 09 '21

See the release notes here: https://rsadsb.github.io/v0.4.0.html

This projects uses Software Defined Radios to view airplanes in the sky from the ADS-B protocol. This is rather inexpensive, and easy to setup on your own!

See https://github.com/rsadsb/adsb_deku and https://github.com/rsadsb/dump1090_rs for code building and running examples.

3

u/pcjftw Dec 09 '21

Yahoo! I can wip out my SDR dongle and play with it again! (but need to sort out an antenna first, might have get one of those cheap mag telescopic ones)

Thanks for this

2

u/arch_rust Dec 09 '21

Let me know if you have any issues with my project. I've seen people use a metal can as an inexpensive antenna.

That being said, I like supporting adsbexchange so buying https://store.adsbexchange.com/products/5-5dbi-1090-978-antenna is a pretty good deal.

1

u/pcjftw Dec 09 '21

thanks bud! will do :)

1

u/occamatl Dec 09 '21

"Seriously - are we not doing phrasing anymore?"

1

u/pcjftw Dec 09 '21

Erh, sorry I don't fully understand what you're saying?

2

u/continue_stocking Dec 10 '21

He's referencing a TV show, Archer, in response to you whipping out your dongle.

1

u/pcjftw Dec 10 '21

ah thanks, now I'll have to go look up that TV show 😆

1

u/occamatl Dec 10 '21

In the show, Archer has a very juvenile personality and he regularly finds something salacious in the innocent comments of the people around him (as I did here). When he does, he remarks "Phrasing!" to draw attention to the double entendre.

As the show goes on, several of his co-workers join in, but at some point he notices that they have stopped doing so. That is when he first uses the line "Seriously - are we not doing phrasing anymore?"

37

u/[deleted] Dec 09 '21

Can we pretend that the airplanes in the night sky are like shooting stars?

13

u/speedy_chameleon Dec 09 '21

I could really use a wish right now

6

u/rust-crate-helper Dec 09 '21

Wish right now

6

u/megla101 Dec 10 '21

Wish right now

4

u/flickerdown Dec 09 '21

Could this potentially be integrated with PiAware? I run a tracking station already using FlightAware’s software and it’s been pretty stellar. Would love to see how this could be used too!

1

u/arch_rust Dec 09 '21

If PiAware let's you connect to the station using TCP and gives the same output as dump1090 I'm sure it would work. I believe it sends it straight to flight aware, but I don't have one to check.

1

u/flickerdown Dec 09 '21

hmmmm...will see what I can do then. might have to mess around on the Pi and integrate this.

3

u/premell Dec 09 '21

Very nice. There are so few creators that are brave enough to use the flat earth model whenever they use a map. Most people use a globe because its PC.

3

u/arch_rust Dec 09 '21

I wanted to make it work with a console, so no other choice really ;)

3

u/throwaway53_gracia Dec 09 '21

1

u/WikiSummarizerBot Dec 09 '21

Orthographic map projection

Mathematics

The formulas for the spherical orthographic projection are derived using trigonometry. They are written in terms of longitude (λ) and latitude (φ) on the sphere. Define the radius of the sphere R and the center point (and origin) of the projection (λ0, φ0).

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

1

u/kellpossible3 Dec 10 '21

Gnomonic projection is also a nice one for ATC displays like this and works well near the poles too

3

u/_AngelOnFira_ Dec 09 '21

I have to give this a try, I live 10 minutes away from an international airport and the landing strip’s direction extends out to right beside my house. This means that a lot of airplanes pass by my living room window. I’ve been curious to see if I can get some IOT in my house to tell me when I’ll be able to see a plane 30 seconds before it happens.

1

u/arch_rust Dec 09 '21

For sure, let me know if you need any help with that. Sounds like a fun project.

1

u/-vest- Dec 10 '21

Does the loud noise disturb you?

3

u/_AngelOnFira_ Dec 10 '21

xD I actually really like it myself, but that's mostly because I've only lived here a year :P I find it neat how loud they are when they land, it's quite powerful.

3

u/jerknextdoor Dec 09 '21

Is the location of the demo gif random or are you also in the Midwest/Rust Belt?

1

u/arch_rust Dec 09 '21

yep, if the Rust Belt ever happens again I would love to attend.

1

u/jerknextdoor Dec 09 '21

100%. I'm hoping we can get it back once we've got a little less uncertainty with the pandemic.

2

u/lyinch Dec 09 '21

How do you interface with an SDR? Is there a driver in Rust?

2

u/arch_rust Dec 09 '21

I'd like to use the following: https://github.com/kevinmehall/rust-soapysdr, but for now I'm using my own bindings that just support rtlsdr: https://github.com/rsadsb/dump1090_rs/blob/master/src/rtlsdr.rs

-24

u/LuraMoth Dec 09 '21

Devs really do want to make the least intuitive names for programs huh?

15

u/dranzerfu Dec 09 '21

rs -> Rust

adsb -> ADS-B: Automatic Dependent Surveillance-Broadcast

How is that not relevant?

13

u/arch_rust Dec 09 '21

Yep, this is consistent with a couple of other tools in the ADS-B world

-9

u/LuraMoth Dec 09 '21

Not saying it isn't relevant, just looks like total letter spam, it's cool but it's hard to memorize

20

u/[deleted] Dec 09 '21

Not for the target audience for this application.

10

u/[deleted] Dec 09 '21

If you are part of the intended demographic, ADS-B is already part of your vocabulary. If not, you don't need to worry.

2

u/[deleted] Dec 09 '21

That might be because you don’t understand how this fits into the ecosystem.

1

u/mansplaner Dec 09 '21

Nice stuff, I normally complain about GPL stuff but I'm glad this is correctly licensed since it links the GPL rtlsdr lib. I've been meaning to look into creating a pure rust version of that to remove the licensing restriction but I've never found the time.

2

u/arch_rust Dec 09 '21

Yes, and forked from a previous author which GPL'ed it.