Board index FlightGear Development Nasal

Spoken GCA

Nasal is the scripting language of FlightGear.

Re: Spoken GCA

Postby Hooray » Thu Feb 01, 2018 10:02 pm

Yes, excellent pointer actually !


http://wiki.flightgear.org/Walk_view
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

Re: Spoken GCA

Postby AndersG » Thu Feb 01, 2018 10:05 pm

Possibly so, but it is not THAT walk view... (AFAIK, at least...)

The walker / external walk view might also be a good example of a view manager managed view, though, but I don't know anything about it.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2525
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Spoken GCA

Postby clm76 » Sun Feb 18, 2018 11:42 am

Hi,

A little problem with the button "Flip": the ground is on the ceiling. :?

Image
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: Spoken GCA

Postby rleibner » Tue Feb 20, 2018 3:08 pm

clm76 wrote in Sun Feb 18, 2018 11:42 am:A little problem with the button "Flip": the ground is on the ceiling. :?

Well, that is precisely what flip means, right? :lol: :lol:
Speaking seriously now, a new PA_Radar addon is almost ready.

PA_Radar will replace the current SpokenGCA. Its logic structure is much simpler and cleaner:
    The user can instance a PAR instrument (or more than one) and configure its parms by clicking its buttons.
    A "GCA" button is used to request the GCA assistance.
    Pilot can hide the instrument, follow the GCA directives and after landing show it again in order to analyze his plotted pattern.
I hope to upload PA_Radar addon in a few days.
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4

Re: Spoken GCA

Postby wkitty42 » Wed Feb 21, 2018 2:55 am

FWIW: i would figure that "flip" means only to swap the channels... that's how we used it back in the day some 20+ years back when i still played with O'scopes ;)

but maybe i'm thinking of [swap]?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Spoken GCA

Postby clm76 » Wed Feb 21, 2018 9:37 am

Hi Rodolpho,

I made some changes to your code to have a correct flip :

Image Image

But I will wait your new simpler version. You’re right, there are some useless functions in the actual version.. :D
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: Spoken GCA

Postby yanes » Wed Feb 21, 2018 11:22 pm

after installing the addon and launching FG ,pressing > makes no apparent effect in the sim window, but in the terminal a nasal error has been reported

Code: Select all
<Nasal runtime error: No such member: Control
  at /input/keyboard/key[62]/binding, line 1


running gca.control(); in the canvas-REPL throws this :
Code: Select all
No such member: control:
 at <canvas-repl>, line 1



I'm running 2017.4.0

another question :Is FGPlot & oscilloscope addons required for this in order to work properly ?
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Spoken GCA

Postby rleibner » Thu Feb 22, 2018 3:12 pm

Hi Yanes,

It seems that the control.nas file was not loaded.

Somewhere at the terminal should read:
Code: Select all
Initializing addon 'Spoken GCA' version 0.3.6 from /..../addon-main.nas in __addon[org.flightgear.addons.SpokenGCA]__
GCA control 0.3.5 loaded
GCA tools loaded.


yanes wrote in Wed Feb 21, 2018 11:22 pm:running gca.control(); ...
in the canvas-REPL Try gca.Control();
yanes wrote in Wed Feb 21, 2018 11:22 pm:Is FGPlot & oscilloscope addons required for this in order to work properly ?
Not at all. Each addon is "standalone".
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4

Re: Spoken GCA

Postby rleibner » Thu Feb 22, 2018 6:27 pm

Hi all,

I've just uploaded the new PAR addon and you can download it from here.
This addon will replace the current SpokenGCA. If all runs OK, there will be no reason to keep SpokenGCA into the repository.
I must still document it on the wiki, but it is quite intuitive.

As always, feedback and comments are welcome.
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4

Re: Spoken GCA

Postby yanes » Thu Feb 22, 2018 10:40 pm

It seems to be loaded at startup , and UNLOADED due to a fatal error caused by failed lookup for the oscilloscope addon
That's why I asked if any dependency exist
you can look here :
Image

the last error msg is shown when I pressed the "<" key .


EDIT: worked perfectly when installed and started with oscilloscope add-on in the command line .
User avatar
yanes
 
Posts: 135
Joined: Tue Sep 02, 2014 2:14 pm
Location: Tunisia
Callsign: YANES
Version: 2018.2.2
OS: Linux

Re: Spoken GCA

Postby rleibner » Thu Feb 22, 2018 11:35 pm

yanes wrote in Thu Feb 22, 2018 10:40 pm:t seems to be loaded at startup , and UNLOADED due to a fatal error caused by failed lookup for the oscilloscope addon
You are right, yanes: is my fault.
Please edit control.nas (line 7) replacing "org.flightgear.addons.Oscilloscope" with "org.flightgear.addons.SpokenGCA".
All should be fine after that.

Anyway, please see my previous post:
rleibner wrote in Thu Feb 22, 2018 6:27 pm:I've just uploaded the new PAR addon and you can download it from here.
This addon will replace the current SpokenGCA. If all runs OK, there will be no reason to keep SpokenGCA into the repository.


And the wiki page is available now.

Thanks for reporting the bug.
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4

Re: Spoken GCA

Postby clm76 » Fri Feb 23, 2018 5:36 pm

Hi,

Waouh !!!… The PAR is really a good job ! :D

A few comments :
1 – A nasal error occurs line 291 showing that the « err » variable is not define.
Code: Select all
if (size(err)) {

This can be solved by initializing this variable at the beginning, line 6 , like this :
Code: Select all
….
var gcaCtrl = nil;
var err = [];  # new

var instrument = func(){ # Shows hidden screens (if any) or instanciate a new one.
….


2 – A nasal error occurs when we change the final distance :
Nasal runtime error: non-objects have no members
at /home/chris/fg2018_2/install/flightgear/fgdata/Nasal/canvas/gui/Widget.nas, line 125


3 – A vertical blue line appears when the PAR is launched ???

Image

4 - It seems that the 3 degree slope is not correct. With the "ils" activated on the autopilot, the course of the aircraft is above the red slope.

Image Image
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: Spoken GCA

Postby rleibner » Fri Feb 23, 2018 7:15 pm

clm76 wrote in Fri Feb 23, 2018 5:36 pm:1 – A nasal error occurs line 291 showing that the « err » variable is not define.
That bug was fixed yesterday. Only par.nas changes, so you can update it from
https://sourceforge.net/p/flightgear/fg ... AR/par.nas
clm76 wrote in Fri Feb 23, 2018 5:36 pm:2 – A nasal error occurs when we change the final distance :
and also occurs when changing RWY.
For some reason, the MessageBox triggers that error. (although I'm using the sintaxis suggested by its wiki. :?:

clm76 wrote in Fri Feb 23, 2018 5:36 pm:4 - It seems that the 3 degree slope is not correct
May be because there is not a 3deg slope anywhere :lol:
The heuristic is as follows:
Code: Select all
drawCones: func(){
 var mS = mSlope(me.profile, me.TerrainResolution); # as ft/nm
 me.minSlope = math.atan2(mS,6076)*R2D; # 6076 ft = 1 nm
 var xvec = [10, 0, 10];
 var yvec = [10*mS, 0, 10*(mS+425)]; # 425 ft = tan(4°)
 me.Vcone = me.xzGraph.polyline( xvec, yvec, white);
 yvec = [10*math.tan(6*D2R), 0, -10*math.tan(6*D2R)];
 me.Hcone = me.xyGraph.polyline( xvec, yvec, white);
 me.Vcenter = me.xzGraph.line([0,0],[10,10*(mS+212)],red); # 212 ft = tan(2°)
 me.Hcenter = me.xyGraph.line([0,0],[10,0],red);
},

A 'minimumSlope' is calculated according the terrain. (not always will be zero).
The 'maxSlope' = minimumSlope + 4 deg.
The normal 'glideSlope' = minimumSlope + 2 deg.

I know this may seem a bit arbitrary. For that reason (among others) my plan is to allow customizations using the "Set" button...

Thanks for your report. All comments are a real help to me.

By the way, clm76: How beautiful and precise was your half-standard turn !!! 8)
Rodolfo
*************************
Non-shared knowledge is lost knowledge
User avatar
rleibner
 
Posts: 269
Joined: Fri May 19, 2017 8:17 pm
Location: Uruguay - SUMU
Callsign: CX-BEX
Version: next
OS: Ubuntu 18.04.4

Re: Spoken GCA

Postby clm76 » Sat Feb 24, 2018 12:03 pm

That bug was fixed yesterday. Only par.nas changes, so you can update it from

With the new par.nas, the nasal error « undefined symbol err » is still there (line 293), but not if « var err = [] » is declared on the top of the code.

A 'minimumSlope' is calculated according the terrain. (not always will be zero).
The 'maxSlope' = minimumSlope + 4 deg.
The normal 'glideSlope' = minimumSlope + 2 deg.

I know this may seem a bit arbitrary. For that reason (among others) my plan is to allow customizations using the "Set" button...

I understand your point of view and I think it will be a real step forward if the user could choose the slope angle according to the aeronautic charts. (example : LFPG = 3°, LOWI = 3.8° …). Most airports ILS are around 3 deg except in mountains.

By the way, clm76: How beautiful and precise was your half-standard turn !!

I have no merit with a flight plan and the FMS activated !.. :D
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: Spoken GCA

Postby Hooray » Sat Feb 24, 2018 1:06 pm

To improve the terrain getVertProfilefunction when unloaded tiles are needed.


I do believe that a Nasal space workaround using the AI system should work, but before spending any significant amount of time implementing this, I'd suggest to check back with the developers mailing list - simply because most core developers are rather opposed to seeing more and more Nasal workarounds added to sim, and some even offered to help fix up/implement the corresponding C++ code instead.

In this particular case, I do believe that James Turner is the one who originally implemented the "navdb/navcache" - which is the back-end providing the navigational data to Nasal.
Personally, I consider a tile-cache based navcache implementation to be problematic - and I also think that Stuart is likely hitting the same issue sooner or later, due to his ongoing FG1000 effort.

Thus, I'd suggest to check back with Stuart and James to see if they'd like you to use a corresponding workaround or if there's any chance of seeing the underlying C++ code changed accordingly.

Obviously, it would be helpful to have a tiny snippet of Nasal code that illustrates the problem - so that people looking at the underlying C++ code can easily reproduce the issue without having to install any addons or actually fly a certain aircraft. If in doubt, I'd suggest 5 lines of Nasal code to look up navdata using an airport that is out of range.
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

PreviousNext

Return to Nasal

Who is online

Users browsing this forum: No registered users and 4 guests