7 ms·
Show HN: Flight Instruments in Snap SVG and JavaScript
- duncanmeech 6y agoI wrote these a while ago with some intention of creating flight training tools. I'm making them available to all the other programmer / pilots out there who might find them useful. https://codesandbox.io/s/six-pack-flight-instruments-fl7b8 https://codesandbox.io/s/six-pack-flight-instruments-fl7b8
- fit2rule 6y agoThis is really nice - you know what it inspires me to do: make a synthesiser interface with the same tech/look and feel. Do you have a repo link where I might contribute something in that regard? Wired up to MIDI, this could be the basis of a very nice set of synth visualisation tools ..
- duncanmeech 6y agoOriginally, the code was in this repo but its a full nodejs / express app. https://bitbucket.org/duncanmeech/flying/src/master/ https://bitbucket.org/duncanmeech/flying/src/master/ Just the frontend part can be found here...https://codesandbox.io/s/six-pack-flight-instruments-fl7b8 https://codesandbox.io/s/six-pack-flight-instruments-fl7b8
- fit2rule 6y agoSweet, thanks for sharing!
- phkahler 6y agoThis is one of those things that "someone must have already done, it must be out there." Thank you for being that person.
- diminish 6y agoThose type of awesome contributions are what drives humanity ahead :)
- spankalee 6y agoNice! These would be great as web components :)
- bitwize 6y agoWhen Flight Simulator hits that "A programmer had a problem and thought 'I know! I'll make it a web app!'" phase...
- heleninboodler 6y agoUnfair and needlessly condescending criticism. He implemented them for training materials. The knee-jerk assumption of stupidity around here is getting really old.
- 5cott0 6y agoVery nice work! Unfortunately it appears Snap.svg has been sunsetted and has not been updated for a few years.
- duncanmeech 6y agoToo bad, was only a thin wrapper at best though. Maybe time for a new open source SVG library.
- runawaybottle 6y agoWhat’s considered the goto one now days?
- 5cott0 6y agod3 would be the obvious choice to me. I have only taken a cursory look at your code but strikes me that it could be fairly straight forward to rewrite it using d3.
- redis_mlc 6y agod3 is just a low-level combination of HTML, CSS, JS and SVG. It's seldom obvious how anything is easy to do "using d3," unless manipulating a table of data. Essentially, if you're a raw d3 programmer, you're a front-end web engineer.
- 5cott0 6y agohttps://medium.com/@Elijah_Meeks/d3-is-not-a-data-visualization-library-67ba549e8520 https://medium.com/@Elijah_Meeks/d3-is-not-a-data-visualizat...
- deleted 6y ago[deleted]
- sansnomme 6y agoImagine the next jumbo jet using avionics rendered on Electron.
- FridgeSeal 6y agoI could have done without that thought thank you. * your plane crashes because the avionics computer OOM’s because you’re running chrome * your plane crashes because JS decides that the pitch angle is suddenly NaN and plows the plane into the ground. * your plane won’t take off, because there’s been yet another NPM dependency breakage because someone got annoyed and removed their single line “right pad” package, which causes the avionics to break because some dependency 400 layers down the tree used it to align an ad that displays on the command line at startup * the plane crashes because in an emergency the pilots couldn’t find the instrumentation they were looking for, because the UI was updated for the 15th time that month and that disk has been removed “because A/B testing showed nobody clicked on it”.
- Tade0 6y ago* the plane crashes because there was an undiscovered bug in an important library whose sole maintainer is currently in a penal colony.
- osobo 6y agoOddly specific
- FridgeSeal 6y agoIf you are out-of-the-loop, it’s a reference to this: https://www.theregister.co.uk/2020/03/26/corejs_maintainer_jailed_code_release/ https://www.theregister.co.uk/2020/03/26/corejs_maintainer_j... Associated HN thread: https://news.ycombinator.com/item?id=22681860 https://news.ycombinator.com/item?id=22681860
- samschooler 6y ago* the plane crashes because its not connected to the internet and the auto pilot cannot get a gps route via the google maps directions api
- jcutrell 6y agoAny plans to use these in tandem with X-Plane? Looks really fantastic!
- pageandrew 6y agoHey, they look great & realistic! Possible issue with the Altimeter. I'm not sure if this was meant as an accurate simulation, or just a technical demonstration of what is possible with the component, but I've noticed that the Altimeter pressure setting (small window) is changing on its own as the altitude hand sweeps around. That never happens, the altimeter setting is a fixed setting set by the pilot used to calibrate the altimeter readout to be relative to a known/shared pressure setting.
- ericpauley 6y agoLooks like the site is demoing the altimeter reading changing as the setting is changed. Note the altitude is changing properly with respect to altimeter setting.
- duncanmeech 6y agoCorrect! If you play with the source on codesandbox you can disable the demo mode and actually rotate the Kollsman window using the BARO button. The calculations for pressure and resulting altitude are from standard physics texts.
- skanga 6y agoWell done! They look gorgeous ...
- imsofuture 6y agoLooks great. I have have a mind to make a VOR + map combo sometime, but I haven't mustered the effort yet.
- redis_mlc 6y agoAlso check out Project Magenta for MS FSX and Pr3par3d pro flight controls (FMC, etc.): https://www.projectmagenta.com/ https://www.projectmagenta.com/ It's commercial software, but there's free demo versions of the controls, and a personal license is 600 euros, which is a good deal if it does what you want.
- Jahak 6y agoUpload the source code to github
- duncanmeech 6y agoThe original app is on bitbucket git clone git@bitbucket.org:duncanmeech/flying.git
- junke 6y agoThis could be a game where you have to fly a plane, looking only at the instruments (this kind of training exists for real pilots).