Show HN: Flight-Viz – 10K flights on a 3D globe in 3.5MB of Rust+WASM

88 points
1/21/1970
3 days ago
by coolwulf

Comments


ge96

Why is there almost no traffic in places like South America (other than Brazil) and Africa? Data set or reality? Not much in China/Russia either.

3 days ago

coolwulf

The current data is from OpenSky, mainly north america and EU.

3 days ago

whywhywhywhy

Zooming on a mouse wheel on windows is nearly unusable, it goes from whole of europe to town level in one mouse wheel notch.

3 days ago

stingrae

im on a mac and had the same issue.

other bugs: when i pan around (while zoomed far in), the planes arent in a fixed position on the map, they shift with the pan

ux bug: when i zoom in, it zooms into the middle of the browser window instead of where my cursor is.

3 days ago

coolwulf

I just modified zooming algo a lit, now it should improve your user experience.

3 days ago

coolwulf

I will take a look to fix these bugs.

3 days ago

coolwulf

also fixed the parallelex problem of route trail vs. the plane icon

3 days ago

coolwulf

I am on Mac. Will try to get on a Windows box to test this

3 days ago

aduffy

There's something a little off about the projection logic when you drop into the Leaflet view, you'll notice that when you pan around after zooming the planes shift their location.

Very cool demo though!

3 days ago

coolwulf

Need to check my calculations. Thanks for noticing it.

3 days ago

coolwulf

This is fixed now.

3 days ago

maxwg

Impressive. The planes should probably scale up a bit as you zoom though, they become impossible to spot.

I'm surprised all the flights in the world can be represented in a <500KB api call

3 days ago

coolwulf

try change to satellite view it will be more visible

3 days ago

ddoolin

When you zoom in to the street map level, the planes are practically invisible with their color and thin borders. Pretty neat though, that's a lot to load and keep smooth.

3 days ago

coolwulf

If you switch to satelite view, the planes will be very visible.

3 days ago

coolwulf

Updated to version 1.3, now on mobile phone (iOS/Android), it should have better user experience.

2 days ago

coolwulf

For people having problems navigating, you can search flifht number on the left search bar. When click on the flight number, the view will jump over.

3 days ago

christophilus

Makes the divide between the developed and developing world very clear.

Edit: can’t be right. I think this is a dataset problem. China and Brazil should have more dots.

3 days ago

coolwulf

opensky database is limited. I need to find some data source for China and south America

3 days ago

paulnsorensen

Wow. I won't give you a feature request :) just appreciation.

It really puts into perspective the magnitude of air traffic when you have this visualization.

3 days ago

lwansbrough

Could probably extrapolate positions based on heading and speed, to do some fake "real time" positions.

3 days ago

c0nsumer

When zooming in and it switches to the lighter color tiles, the icons basically become invisible.

3 days ago

coolwulf

the airline flight number attached to the icon is in dark color and should be visible, also could switch to satelite view when zoom in, which is dark color

3 days ago

concensure

Did you pay for flight api? Getting comprehensive real time flight data is quite a monetary challenge

3 days ago

coolwulf

I registered on OpenSky and using their API

3 days ago

ab_testing

How are you getting that real time flight data from . Is there a free source for this ?

3 days ago

coolwulf

you can check OpenSky, they have API with free tier.

2 days ago

pstomi

It render extremely fast on my side (firefox, macOS). Which UI stack are you using? Is it egui?

3 days ago

coolwulf

It's mainly eGui + WebGPU

3 days ago

Glubker

Really cool! Curious to know how you made it render everything so fast with barely any loading.

Good work.

3 days ago

coolwulf

:P just optimize to the extreme

3 days ago

ryaker

QWhere are you getting the flight data?

2 days ago

Levitating

The wasm file (flight_viz_bg.wasm) was 10.94 MB as reported by firefox.

3 days ago

coolwulf

I changed a higher resolution image and that is why now it is a little bigger...

3 days ago

Levitating

If it's just the image, you could try using more aggressive compression?

3 days ago

sensarts

wow, more than 10K airbuses just over the NA. Looks like airplanes are the major source of air pollution.

2 days ago

moci

It seems there is very little flight data from China.

3 days ago

coolwulf

That's the limitation of current OpenSky api. Most of Chinese airlines data are not in it.

3 days ago

amelius

Can you add pinch zoom?

3 days ago

coolwulf

Currently I developed this for desktop browser, so it might not work well on mobile. But I will improve and update it.

3 days ago

pohl

You should be able to do pinch zoom support for laptops with a trackpad, too. I think it would be

window.addEventListener('wheel', ... )

Fantastic work!

3 days ago

amelius

Ok, I'm on desktop now. And I notice another "issue". When I use my mouse wheel to zoom, the point that my mouse cursor is on is not stationary. This makes it hard to zoom in on e.g. a specific aircraft or landmark.

3 days ago

coolwulf

I can take a look. The current zoom is zooming to screen center. Maybe I should change it to cursor location.

3 days ago

amelius

Yes, that will definitely be an improvement.

3 days ago

coolwulf

Updated to version 1.3, now on mobile phone (iOS/Android), it should have better user experience.

2 days ago