Code Monkey home page Code Monkey logo

instantweather's Introduction

InstantWeather

Badges

http://forum.phpvms.net/topic/24355-simple-instantweather-module/

Hey guys! I've made a weather module that shows you real time and

instant weather informations of the current airport where the logged in pilot is.

DEMO VIDEO: [(www.youtube.com/watch?v=Cx0HCaW-a5I)]

INSTALLATION

  1. Copy the "core/modules/InstantWeather"-folder into your "core/modules"-folder of your va

  2. Copy the "core/templates/instantweather"-folder into your "core/templates"-folder of your va

  3. To show the modulein the navigation:<li><a href="<?php echo url('/instantweather'); ?>">InstantWeather</a></li>

(Tested on PHPVMS Version simpilot 5.5.2)

OPTIMIZATION

You can change the displayed value indicator of the temperature now (with Update v1.3). To change between FAHRENHEIT and CELSIUS do the following:

  1. Go to the file "core/modules/InstantWeather/InstantWeather.php"

  2. Change the variable value in line 12 to "c" for celsius or "f" for fahrenheit

Example:

define("TEMPERATURE", "c"); // shows temperature in CELSIUS
define("TEMPERATURE", "f"); // shows temperature in FAHRENHEIT

You can change the displayed value indicator of the visibility now (with Update v1.6). To change between MILES and KILOMETERS do the following:

  1. Go to the file "core/modules/InstantWeather/InstantWeather.php"

  2. Change the variable value in line 13 to "m" for miles or "k" for kilometers

Example:

define("VISIBILITY", "m"); // shows visibility in MILES
define("VISIBILITY", "k"); // shows visibility in KILOMETERS

MANUALLY SET ICAO

  1. To set manually an icao (airport) you have to add a get request via php. Do it like this: Add at the end of the InstantWeather URL "?icao=ICAO_HERE" like this example: http://phpvms.philippdalheimer.de/index.php/instantweather?icao=edfh

USE INFORMATION ON OTHER PAGES (v 1.9)

Use MainController::Run to display all different information of the table on other pages. Available functions:

<?php MainController::Run('InstantWeather', 'metar'); ?>        // example: EDDS 070920Z 26004KT 230V300 9999 FEW012 SCT025 BKN068 18/16 Q1015 NOSIG
<?php MainController::Run('InstantWeather', 'pressure'); ?>     // example: 982 mbar
<?php MainController::Run('InstantWeather', 'wind_speed'); ?>   // example: 4 kts
<?php MainController::Run('InstantWeather', 'wind_degrees'); ?> // example: 260°
<?php MainController::Run('InstantWeather', 'temperature'); ?>  // example: 18.0 °C
<?php MainController::Run('InstantWeather', 'dewpoint'); ?>     // example: 16.0 °C
<?php MainController::Run('InstantWeather', 'visibility'); ?>   // example: 6.21 mile

<?php MainController::Run('InstantWeather', 'skycondition'); ?> 
/* example: Sky condition level 1 FEW 1200 ft 
            Sky condition level 2 SCT 2500 ft (Scattered)
            Sky condition level 3 BKN 6800 ft (Broken)
*/

instantweather's People

Contributors

karamellwuerfel avatar

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.