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 6: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: 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: Is setSpeed() available ?

Postby Necolatis » Sun Nov 05, 2017 7: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
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Is setSpeed() available ?

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

Ok thanks Necolatis, it works with

Code: Select all
call(func {flightplan().getWP(ind).setSpeed(250,'at')}, nil, var err = []);
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


Return to Autopilot and route manager

Who is online

Users browsing this forum: No registered users and 2 guests