Board index FlightGear Development Aircraft Autopilot and route manager

Is setSpeed() available ?

Designing a stable autopilot is one of the hardest things. Need help?

Is setSpeed() available ?

Postby clm76 » Sun Nov 05, 2017 5:31 pm

Hi,

Is flightplan setSpeed() available ?
I tried :
Code: Select all
flightplan().getWP(ind).setSpeed(250,'at')

Code: Select all
 flightplan().getWP(ind).setSpeed("RESTRICT_AT",250)

Code: Select all
 flightplan().getWP(ind).setSpeed('above',250)

All of that return the error "Bad arguments to setSpeed".
clm76
 
Posts: 149
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.3.0
OS: Linux Mint 18.3

Re: Is setSpeed() available ?

Postby Necolatis » Sun Nov 05, 2017 6:02 pm

The first you list is supposed to work.
But I see that it does not work anymore, it worked in 2017.3.0, seems it got broken.

However it looks like even though it complains, that the speed is actually set. So until fixed you can do like this:

call(func {flightplan().getWP(ind).setSpeed(250,'at')}, nil, var err = []);
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1986
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Is setSpeed() available ?

Postby clm76 » Sun Nov 05, 2017 6:35 pm

Ok thanks Necolatis, it works with

Code: Select all
call(func {flightplan().getWP(ind).setSpeed(250,'at')}, nil, var err = []);
clm76
 
Posts: 149
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.3.0
OS: Linux Mint 18.3


Return to Autopilot and route manager

Who is online

Users browsing this forum: No registered users and 1 guest