Board index FlightGear Development Nasal

fgcommand doco ?

Nasal is the scripting language of FlightGear.

fgcommand doco ?

Postby gkick » Tue Jul 02, 2019 3:56 am

Hi,

Anyone knows if there is a listing somewhere of available fgcommands ? Looking for a way to load a scenario bypassing the launcher and the ai dialog

thks
gkick
 
Posts: 106
Joined: Mon Jan 02, 2017 12:04 am

Re: fgcommand doco ?

Postby wlbragg » Tue Jul 02, 2019 5:53 am

Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: fgcommand doco ?

Postby gkick » Tue Jul 02, 2019 6:30 am

Thanks you, however I am looking for an equivalent fgcommand(..... which can be imbedded in a nasal script
gkick
 
Posts: 106
Joined: Mon Jan 02, 2017 12:04 am

Re: fgcommand doco ?

Postby Octal450 » Tue Jul 02, 2019 6:53 am

Leto did something like like this in the f16, maybe it is use to you: https://github.com/NikolaiVChr/f16/blob ... /mig28.nas

Kind Regards,
Josh
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5583
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: fgcommand doco ?

Postby gkick » Tue Jul 02, 2019 7:05 am

Thanks Josh
gkick
 
Posts: 106
Joined: Mon Jan 02, 2017 12:04 am

Re: fgcommand doco ?

Postby Johan G » Thu Jul 04, 2019 11:10 pm

gkick wrote in Tue Jul 02, 2019 3:56 am:Anyone knows if there is a listing somewhere of available fgcommands ?

Not that it was what you where looking for, but in case someone find this topic looking for more on them, see the README.commands file for a (hopefully rather complete) list and the FlightGear wiki article Bindings (permalink) which might be of additional help.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: fgcommand doco ?

Postby Hooray » Sat Jul 06, 2019 12:14 pm

Actually, that's exactly right: fgcommands are documented in README.commands, which unfortunately hasn't been updated in a while.

Like you say, these days many subsystems register their own fgcommands, so that it would make sense to expose the SGCommandMgr to Nasal to obtain a list of commands dynamically, possibly in conjunction with fields documenting purpose and syntax/usage.

This would be a really simply C++ modification that would nicely fit the addcommand/removecommand APIs, i.e. an API to retrieve a list of available fgcommands, along with a help string, and an example.

That way, the list of fgcommands could be dynamically retrieved and shown on-screen, directly inside FlightGear, e.g. as part of the Nasal Console.

This would be superior to anything involving README files or wiki articles, because FlightGear fgcommands would become self-documenting
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Nasal

Who is online

Users browsing this forum: No registered users and 4 guests