Coder Social home page Coder Social logo

renanmsv / landing_rate Goto Github PK

View Code? Open in Web Editor NEW
11.0 6.0 3.0 67 KB

FlightGear Landing Rate addon. Show your landing stats.

Home Page: https://wiki.flightgear.org/Landing_Rate_addon

License: GNU General Public License v3.0

Nasal 100.00%
flightgear nasal flightgear-addon landing-rate

landing_rate's Introduction

FlightGear Landing Rate addon

Landing Rate addon can show your landing stats. Depending on your rate of descent upon touchdown it rates your landing accordingly.

Example

Features

  • Rates your landings.
  • Can automatically send your landing rate in a message if you are in a multiplayer server.
  • It works with most aircraft by default, without the user having to make modifications or configure it.

Requirements

FlightGear 2018.2 version.

How to install Landing Rate addon

Extract the zipped landing_rate folder to any place you want.

e.g C:\Users\USERNAME\FlightGear\Addons\landing_rate

Note: Remember to replace USERNAME with your OS username.

From now on you have two options. Either will install it successfully. Choose the one you find easier.

Option 1 - Installing from the launcher (recommended)

  • In the launcher click at the "Add-ons" button.
  • Then in the "Add-ons Module folders" section click in the Add button.
  • Locate the folder where you have extracted the landing_rate folder and confirm.

Now Landing Rate should appear as an installed add-on.

Option 2 - Installing by the command line

Add this command line to your FlightGear shortcut:

--addon="C:\Users\USERNAME\FlightGear\Addons\landing_rate"

Do not know how to set command lines? Check here: http://wiki.flightgear.org/Command_line

Dealing with errors

Since each plane is different, for now most aircrafts are compatible. If you're using an incompatible aircraft a message will be shown and the addon will be disabled.

ErrorExample

User settings

The settings menu can be found by clicking the Landing Rate option of your menu bar.

Send landing stats at multiplayer chat

The addon can automatically send your landing rate in a message if you are in a multiplayer server. You can activate it in the addon settings menu.

Note: This setting will be persistent across sessions. Some pilots may find these messages disturbing, especially if you are at a busy airport. Use with moderation.

For aircraft developers

Making sure your aircraft is compatible

To make the plane compatible, it should initialize and calculate the following properties:

  • /accelerations/pilot-gdamped
  • /instrumentation/vertical-speed-indicator/indicated-speed-fpm
  • /instrumentation/vertical-speed-indicator/indicated-speed-mps

Note: If any of these properties are missing or if they return nil, the addon will be shut down

The addon also expects your aircraft to have at least one of the following gear properties:

  • /gear/gear[0]/wow
  • /gear/gear[1]/wow
  • /gear/gear[2]/wow

Note: It might not work as expected if your aircraft has more than 3 gears or if their property ids are greater than 2.

Presets based on ICAO wake turbulence category

If your plane defines the /aircraft/icao/wake-turbulence-category property (either L, M, H or J), the addon initializes a preset for that category as it guesses the size of the plane.

Overriding landing category limits

Its possible that your aircraft needs to override the default rates settings, for example, you can break the gear of the C172p and still get "acceptable" using the default settings.

You can specify addon-hints in your aircraft.xml to override the landing category limits like this:

<sim>
    <addon-hints>
        <landing_rate>
            <ranks>
                <bad>
                    <min-fpm>150</min-fpm>
                </bad>
            </ranks>
        </landing_rate>
    </addon-hints>
</sim>

Note: addon-hints rates have a higher priority over turbulence category rates

Valid <ranks> tags are: bad, acceptable, good, very-good, excellent. Use fgfs --log-level=debug --log-class=nasal to see what is actually loaded.

landing_rate's People

Contributors

hbeni avatar pascal-olin avatar playerom avatar renanmsv avatar vezza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

landing_rate's Issues

Support addon-hints so aircraft can optionally specify own definitions of "good"/"bad"

Hi,
right now the categories for good/bad are hardcoded in the addon.
This is not suitable for all aircraft, for example you can break the gear of the C172p and still get "acceptable" (which it is clearly not ๐Ÿ˜„ ).

It would be cool, it the aircraft.xml could specify hints for the addon like this:

<sim>
    <addon-hints>
        <landing_rate>
                <ranks>
                        <bad>
                            <min-fpm>150</min-fpm>
                        </bad>
                        <acceptable>
                            <min-fpm>100</min-fpm>
                        </acceptable>
                        <good>
                            <min-fpm>75</min-fpm>
                        </good>
                        <very-good>
                            <min-fpm>50</min-fpm>
                        </very-good>
                        <!-- excellent is fine and need not to be overwritten -->
                </ranks>
        </landing_rate>
    </addon-hints>
</sim>

If present, these could override the hardcoded settings.

Make sharemp dynamic parameter (read by property) + GUI

To enable it go to landing_rate folder and open addon-config.xml. Find sharemp line.
0
Change sharemp value (1 for yes and 0 for no). Restart your simulator. Done.

It would be nice if:

  • <sharemp> would be dynamically read from a property below /addons/by-id/landing_rate
  • default to false
  • setting to true therefore would, from that point onwards, share it in the chat. Setting to false again would disable sharing from that point onwards.
  • a small config GUI would provide access to that property for normal users.
  • correct readme.md
# Init GUI menu entry
    var menuTgt = "/sim/menubar/default/menu[7]";  # 7=multiplayer
    var menudata = {
		label   : "Landing Rate",
		name    : "landing_rate",
		binding : { command : "dialog-show", "dialog-name" : "landing_rate_settings" }
	};
	props.globals.getNode(menuTgt).addChild("item").setValues(menudata);
	fgcommand("gui-redraw");

Re: the menu bar index; I believe there is a standardized "Addons" menu index we should use.

Add rate properties to addon GUI

Would be cool to be able to adjust the ranks config not only by property tree manipulations, but let the user access them from the addons GUI menu.

This way:

  • one can alter the values if the guessing routines didn't came up with a good config
  • those configs can easily be seen and reported to inclusion into the addon or the aircraft
  • It may provoke pilots to play around with the values, yielding better coverage over time

Feature Request: Record more stats

I'd like to see three more stats on touchdown:

  • Distance from the center-line
  • Crab angle on touchdown... for crosswind landings.
  • Ground speed for helicopter landings

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.