Coder Social home page Coder Social logo

rfgfs's Introduction

rfgfs - An R package

A flight planner and companion R package for FlightGear flight simulator (fgfs)

The rfgfs R package allows planning a route between two airports, using the airport, airway, navaid and navfix data that ship with FlightGear. These data have been parsed into .RData, are included with the package internally, and can be retrieved with the function flightData().

The main workhorse of the package is the function planRoute(); this returns a full flight plan as a data.frame, and this can be further written to a kml file (that can be opened with Google Earth or other kml viewer) using function makeKml().

The package also includes a few additional functions, including magvar() to calculate magnetic declination for any set of coordinates. Thus the flight plans that planRoute() creates include both true and magnetic course for every leg.

Installation

Open R, and give:

  devtools::install_git("https://github.com/thlytras/rfgfs.git")

If you do not have the package "devtools", first install it from CRAN with:

  install.packages("devtools")

Why an R package? Why not an [insert favorite platform/language] application?

Well, R is what I am most familiar and spend most of my time with. I wanted an easy way to create flight plans to use with my favorite aircraft in flightgear (Tu-154B), so R was the natural choice for me. Hopefully it will be useful to other people as well

Acknowledgement

In writing these functions I was greatly helped by Ed Williams' Aviation Formulary webpage, to whom I am very grateful for compiling such a comprehensive resource.

rfgfs's People

Contributors

thlytras avatar

Stargazers

Andrea Vezzali avatar youwurenjian avatar Luke Frisken avatar

Watchers

James Cloos avatar Andrea Vezzali avatar  avatar Luke Frisken avatar youwurenjian avatar

Forkers

gispda

rfgfs's Issues

Route plan reversing/duplicating fixes

Hi, just checking out this fantastic code you've written. Had an issue generating a plan where it would put waypoints going backwards along a route:

plan <- planRoute("YMHB", "NZQN", fixes=c("PECOB", "FONLO", "BUGBA"))

fix fixLat fixLon fullName freq range elevation dev 1 YMHB -42.83617 147.5118 Hobart NA NA 12 NA 2 HB -42.84712 147.5267 HOBART VOR-DME 11270 130 48 14 3 PECOB -43.16194 150.9369 <NA> NA NA NA NA 4 FONLO -43.48111 157.7744 <NA> NA NA NA NA 5 ELGUN -43.44856 163.0000 <NA> NA NA NA NA 6 KABIN -43.15103 168.5522 <NA> NA NA NA NA 7 SUPRA -42.91822 166.5489 <NA> NA NA NA NA 8 OMKIN -42.41439 163.0000 <NA> NA NA NA NA 9 ADKOS -44.61711 166.8804 <NA> NA NA NA NA 10 BUGBA -43.81561 163.0000 <NA> NA NA NA NA 11 ADKOS -44.61711 166.8804 <NA> NA NA NA NA 12 SH -44.98411 168.7826 SLOPE HILL VOR-DME 11360 50 1394 24 13 NZQN -45.02055 168.7454 Queenstown NA NA 1171 NA magdecl dist course magcourse awy baseFL topFL altawy 1 15.04356 1.719517 135.14931 120.10575 SID NA NA NA 2 14.97280 280.223330 98.35569 83.38289 M643 180 600 NA 3 16.82900 555.592859 96.01389 79.18490 M643 245 600 NA 4 19.93623 422.816389 91.30656 71.37033 M643 245 600 NA 5 21.62235 451.652299 87.69684 66.07449 M643 245 600 NA 6 22.75610 165.292057 278.34895 255.59285 L508 245 600 NA 7 22.14670 296.241273 279.72156 257.57486 L508 245 600 NA 8 20.87837 397.701406 129.37659 108.49821 P766 245 600 NA 9 23.53264 322.579191 284.71711 261.18446 P753 245 600 NA 10 21.89700 322.579191 107.42381 85.52681 P753 245 600 NA 11 23.58282 155.916599 105.88027 82.29745 P753 160 600 NA 12 24.39322 4.998831 215.84838 191.45516 STAR NA NA NA 13 24.41599 NA NA NA <NA> NA NA NA

ADKOS is listed twice (going backwards and forwards)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.