RogerBW's Blog

A shim between Flightgear and Viking 20 August 2020

I've been renewing my interest in the Flightgear flight simulator. And it turns out there's a neat trick you can do with it.

Real-world aviation charts are expensive, as are most things that are required by regulation and have only a monopoly provider. To the flight simmer, though, there's another problem: the charts may not exactly match the scenery built into the simulator.

So what one really wants for flight planning is a system to which one can add one's own data (for airports, navigational aids, etc.), and then plot directions and distances: if I want to be at this point, what's the distance and bearing to that VOR-DME transmitter?

(In case it needs to be said: all this is not for real-world aviation.)

Fortunately there's a system that can do that: the same Viking software that I already use for planning walks and providing maps during on-line RPGs. But can we take this a step further? Specifically, Flightgear has an extensive system of diagnostics which make the aircraft's current position available, and Viking can plot the output of a GPS receiver…

What's needed is an adaptor. So I wrote one. Using AnyEvent for asynchronous operation, it interrogates Flightgear's httpd for position information, converts the numbers, and allows connections to an imitation gpsd; Viking then connects to that fake server and plots positions.

And it works!

Of course, you might not find much use for this:

when Flightgear already gives you this:

but Viking can do more: I can add to it the navaids that are in the scenery rather than in the current real-world data, I can rule off distances and bearings, and I can save that track and export it as a GPX file.

Once I've tidied this up a bit I'll release the code.

Comments on this post are now closed. If you have particular grounds for adding a late comment, comment on a more recent post quoting the URL of this one.

Tags 1920s 1930s 1940s 1950s 1960s 1970s 1980s 1990s 2000s 2010s 3d printing action aeronautics aikakirja anecdote animation anime army astronomy audio audio tech aviation base commerce battletech beer boardgaming book of the week bookmonth chain of command children chris chronicle church of no redeeming virtues cold war comedy computing contemporary cornish smuggler cosmic encounter coup covid-19 cycling dead of winter doctor who documentary drama driving drone ecchi economics espionage essen 2015 essen 2016 essen 2017 essen 2018 essen 2019 existential risk falklands war fandom fanfic fantasy feminism film firefly first world war flash point flight simulation food garmin drive gazebo genesys geocaching geodata gin gkp gurps gurps 101 gus harpoon historical history horror hugo 2014 hugo 2015 hugo 2016 hugo 2017 hugo 2018 hugo 2019 hugo 2020 hugo-nebula reread in brief avoid instrumented life javascript julian simpson julie enfield kickstarter kotlin learn to play leaving earth linux liquor lovecraftiana lua mecha men with beards museum music mystery naval non-fiction one for the brow opera parody paul temple perl perl weekly challenge photography podcast politics postscript powers prediction privacy project woolsack pyracantha python quantum rail raku ranting raspberry pi reading reading boardgames social real life restaurant reviews romance rpg a day rpgs ruby rust science fiction scythe second world war security shipwreck simutrans smartphone south atlantic war squaddies stationery steampunk stuarts suburbia superheroes suspense television the resistance the weekly challenge thirsty meeples thriller tin soldier torg toys trailers travel type 26 type 31 type 45 vietnam war war wargaming weather wives and sweethearts writing about writing x-wing young adult
Special All book reviews, All film reviews
Produced by aikakirja v0.1