Is there a way to assign an instantaneous joystick button, but not have
the value jump directly from one value to another? Currently I have the
following code in my joystick file but it results in the brakes snapping
on and off. I wanted to get a smoother transition to be more realistic
in gr
I want the 737's heading bug to be set to the aircraft's current magnetic
heading at startup. I put a nasal script in 737-jsbsim-set.xml like this:
setprop("/autopilot/settings/heading-bug-deg",
getprop("/orientation/heading-magnetic-deg"));
The problem is that t
I have hit a snag while writing some Nasal script for the Spitfire model:
I put this in the spitfireIIa-set.xml file
1
1
I then try to access it elsewhere.
This works:
nasal
setprop("controls/engines/engine/m
Josh Babcock wrote:
> I tried propertySlew() but it seems that the value wasn't going to
> the numbers I supplied, but only slewing for a very short period of
> time taht wasn't even consistant.
You need to mark the bindings repeatable. See the trim bindings for
examples.
The propertySlew() func
Andy Ross wrote:
You need to mark the bindings repeatable. See the trim bindings for
examples.
Whoops. Typo, or cut-and-past-o I guess. That's what you get for coding
with the flu I. Now the brakes go on like I want, but I have the same
problem with them coming off. Apparently repeatable
Never mind. I just remembered interpolate. This works perfectly.
Josh
Left Brake
true
nasal
interpolate("/controls/gear/brake-left",
props.globals.getNode("/controls/gear/brake-left").getValue(), 0, 1,
0.1)
true
nasal
interpolate("/controls/gear/brake-left",
props.globals.getNod
Some quick suggestions:
You wrote:
> interpolate("/controls/gear/brake-left",
> props.globals.getNode("/controls/gear/brake-left").getValue(),
> 0, 1, 0.1)
Actually, the implementation of interpolate() always starts from the
current value of a property, so in fact there's
David Culp wrote:
> The problem is that the script is executed while the aircraft's
> heading is still zero, prior to it being oriented with the runway. Is
> there a way to have the script execute only after the aircraft is
> aligned with the runway?
As an immediate hack, you can set it up to run
> settimer(func { setprop(SRCPROP, getprop(DSTPROP)) }, DELAY);
Thanks Andy, six seconds works well for me, which seems like a lot. I wonder
how much variation there is among users. It would be nice if we had a
standard nasal script, init-complete.nas, that is called after everything
else
Vivian Meazza wrote:
I have hit a snag while writing some Nasal script for the Spitfire model:
I put this in the spitfireIIa-set.xml file
1
1
I then try to access it elsewhere.
This works:
nasal
setprop("controls/engines/engine/magne
Curtis L. Olson wrote:
Vivian Meazza wrote:
I have hit a snag while writing some Nasal script for the Spitfire model:
I put this in the spitfireIIa-set.xml file
1
1
I then try to access it elsewhere.
This works:
nasal
setprop("cont
Josh Babcock wrote:
Curtis L. Olson wrote:
Vivian Meazza wrote:
I have hit a snag while writing some Nasal script for the Spitfire
model:
I put this in the spitfireIIa-set.xml file
1
1
I then try to access it elsewhere.
This works:
nasal
Curtis L. Olson
> Josh Babcock wrote:
>
> > Curtis L. Olson wrote:
> >
> >> Vivian Meazza wrote:
> >>
> >>> I have hit a snag while writing some Nasal script for the Spitfire
> >>> model:
> >>>
> >>> I put this in the spitfireIIa-set.xml file
> >>>
> >>>
> >>> 1
> >>>
Vivian Meazza wrote:
> Curtis L. Olson wrote:
> > Right, but the aircraft I have seen have just one *switch* ... off,
> > both, left, right (and sometimes starter power is rolled in too.)
> >
> > If the physical aircraft has a separate switch for each magneto, then
> > the underlying logic should j
Vivian Meazza wrote:
> This works:
> setprop("controls/engines/engine/magneto-switch[0]",1);
> But this doesn't:
> setprop("controls/engines/engine/magneto-switch[1]",1);
>
> I can work around it no problem, but I think that it should work. I
can see,
> but can't access ../magneto-switch[1] in
Andy Ross wrote:
Actually, it might be cleaneast to model the engine control properties
as something like:
/engines/engine[n]/magneto[0] (boolean)
/engines/engine[n]/magneto[1] (boolean)
/engines/engine[n]/starter(boolean)
And re-write the "standard" switch binding such that it sets the
a
Andy Ross wrote
> Sent: 17 June 2004 19:36
> To: FlightGear developers discussions
> Subject: Re: [Flightgear-devel] Nasal - Question
>
>
> Vivian Meazza wrote:
> > Curtis L. Olson wrote:
> > > Right, but the aircraft I have seen have just one
> *switc
Andy Ross advised
> Sent: 17 June 2004 19:32
> To: FlightGear developers discussions
> Subject: Re: [Flightgear-devel] Nasal - Question
>
>
> Vivian Meazza wrote:
> > This works:
> > setprop("controls/engines/engine/magneto-switch[0]",1);
>
18 matches
Mail list logo