Re: [Flightgear-devel] Autopilot tuning

2010-01-29 Thread Pete Morgan
Thanks James. It seems to work with my test buzzing london and associated VOR/ILS am now trying to refine autopilot in concert. pete James Turner wrote: On 28 Jan 2010, at 04:00, syd adams wrote: you can also check the instrumentation/nav/nav-loc , but it seems to stay stuck on true

Re: [Flightgear-devel] Autopilot tuning

2010-01-29 Thread Jari Häkkinen
Ok, and then the final step is the bits.test(bar,0). I spent a couple of minutes searching the web but could not find docs for the bits.test function. I assume bits.test(oddnumber,0) returns 1 and something else for even numbers, presumably 0? Jari - learning Nasal On 1/29/10 2:34 AM, Ron

Re: [Flightgear-devel] Autopilot tuning

2010-01-29 Thread Anders Gidenstam
On Fri, 29 Jan 2010, Jari Häkkinen wrote: Ok, and then the final step is the bits.test(bar,0). I spent a couple of minutes searching the web but could not find docs for the bits.test function. I assume bits.test(oddnumber,0) returns 1 and something else for even numbers, presumably 0? You'll

Re: [Flightgear-devel] Autopilot tuning

2010-01-29 Thread Ron Jensen
On Fri, 2010-01-29 at 15:34 +0100, Anders Gidenstam wrote: On Fri, 29 Jan 2010, Jari Häkkinen wrote: Ok, and then the final step is the bits.test(bar,0). I spent a couple of minutes searching the web but could not find docs for the bits.test function. I assume bits.test(oddnumber,0)

Re: [Flightgear-devel] Autopilot tuning

2010-01-29 Thread Jari Häkkinen
Thanks. Jari On 1/29/10 4:07 PM, Ron Jensen wrote: On Fri, 2010-01-29 at 15:34 +0100, Anders Gidenstam wrote: On Fri, 29 Jan 2010, Jari Häkkinen wrote: Ok, and then the final step is the bits.test(bar,0). I spent a couple of minutes searching the web but could not find docs for the

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread James Turner
On 28 Jan 2010, at 04:00, syd adams wrote: you can also check the instrumentation/nav/nav-loc , but it seems to stay stuck on true if you tune another frequency that's out of range or invalid... not sure when that broke. My fault, just checked the code and it's trivial to fix. WIl commit

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread James Turner
On 28 Jan 2010, at 03:45, Ron Jensen wrote: Here is a nasal function to determine if a frequency is a localizer. It accepts a frequency in megahertz and returns 1 if the frequency is an ILS frequency. var isILS=func(freq) { if(freq 108.10) return 0; if(freq 111.95) return 0; var

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread James Turner
On 28 Jan 2010, at 09:18, James Turner wrote: My fault, just checked the code and it's trivial to fix. WIl commit it ASAP. Committed now - also made the same fix for 'has-gs' which was similarly getting stuck on the old value when no valid station was tuned. James

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread Jari Häkkinen
I can't read Nasal so I can't say if the function below is correct. For what it is worth: A frequency between 108.100 and 111.950 (including end points) is a localizer frequency if the first decimal is an odd number. Jari On 2010-01-28 04.45, Ron Jensen wrote: On Wed, 2010-01-27 at 09:06

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread Curtis Olson
Nasal is like C, C++, perl, and php in many ways so if you can read any of those, you should be pretty confident that what you think nasal is doing is what it's actually doing. Writing nasal code from scratch is harder of course because it requires knowledge of all the picky language syntax

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread Jari Häkkinen
For me the Nasal function looks strange. I can't understand what the addition of 0.001 to freq does? For me it seems to be a waste of precious CPU time. Jari On 2010-01-28 21.39, Curtis Olson wrote: Nasal is like C, C++, perl, and php in many ways so if you can read any of those, you

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread Ron Jensen
On Thu, 2010-01-28 at 21:21 +0100, Jari Häkkinen wrote: I can't read Nasal so I can't say if the function below is correct. For what it is worth: A frequency between 108.100 and 111.950 (including end points) is a localizer frequency if the first decimal is an odd number. Jari Right,

Re: [Flightgear-devel] Autopilot tuning

2010-01-28 Thread Ron Jensen
On Thu, 2010-01-28 at 21:59 +0100, Jari Häkkinen wrote: For me the Nasal function looks strange. I can't understand what the addition of 0.001 to freq does? For me it seems to be a waste of precious CPU time. Jari var bar=int((freq+0.001)*10)-int(freq)*10; The 0.001 ensures we get the

Re: [Flightgear-devel] Autopilot tuning

2010-01-27 Thread Giuseppe Venanzoni
2010/1/26 syd adams adams@gmail.com: I wouldnt spend too much time on the b1900d , as Ive already redone most of it ,and added the CLM /DSC modes , and will probably commit tonight . OK, I tuned only implemented modes on old aircraft :) My patches are only suggestions The main problem

Re: [Flightgear-devel] Autopilot tuning

2010-01-27 Thread syd adams
Yes Ive sorted some of that out . What makes it a bit more difficult is that all pitch modes have to be output to target-pitch-deg to run the flight director bars . If you want to experiment with the version I just uploaded , I'm sure it could be greatly improved. But I'd prefer if you posted

Re: [Flightgear-devel] Autopilot tuning

2010-01-27 Thread syd adams
you can also check the instrumentation/nav/nav-loc , but it seems to stay stuck on true if you tune another frequency that's out of range or invalid... not sure when that broke. On Wed, Jan 27, 2010 at 7:45 PM, Ron Jensen w...@jentronics.com wrote: On Wed, 2010-01-27 at 09:06 +, Pete

[Flightgear-devel] Autopilot tuning

2010-01-26 Thread Giuseppe Venanzoni
Hi! I would like to join the discussion about AP tuning. I recently posted a message on the forum (http://www.flightgear.org/forums/viewtopic.php?f=4t=6853) for b1900d. With enclosed files, action is quite smooth and autopilot seems stable, at least on my conputer. For vertical stabilization

Re: [Flightgear-devel] Autopilot tuning

2010-01-26 Thread syd adams
I wouldnt spend too much time on the b1900d , as Ive already redone most of it ,and added the CLM /DSC modes , and will probably commit tonight . The main problem i found on that is the yaw damper was fighting any turn in roll modes,so at the moment Ive disabled it. I'm still tuning the pitch

Re: [Flightgear-devel] Autopilot tuning

2010-01-26 Thread Pete Morgan
Wonderful, brilliant stuff Giuseppe, The way that the autopilot works with those patches is the way I expected. Hope this stuff makes its way into CVS so at least there's a good reference implementation. pete Giuseppe Venanzoni wrote: Hi! I would like to join the discussion about AP

Re: [Flightgear-devel] Autopilot Tuning

2010-01-25 Thread leee
On Monday 25 Jan 2010, Pete Morgan wrote: I'm having a successful time tuning my first autopilot on the 787. I've managed to get rid of the jerks and wobbles, mainly by using a noise-spike filter with max-rate-of-change. That thanks to Syd Adams for that wonderful tip. All flight level

Re: [Flightgear-devel] Autopilot Tuning

2010-01-25 Thread Pete Morgan
thanks lee for the reply, particular about the thinking it through part; and am already thinking about a problem I've encountered, although I'm still trying to get the hang of the autopilot. VNAV. - (don't know how to explain the problem well) I've managed to get the Altitude hold, Vertical

Re: [Flightgear-devel] Autopilot Tuning

2010-01-25 Thread leee
On Monday 25 Jan 2010, Pete Morgan wrote: thanks lee for the reply, particular about the thinking it through part; and am already thinking about a problem I've encountered, although I'm still trying to get the hang of the autopilot. VNAV. - (don't know how to explain the problem well)

Re: [Flightgear-devel] Autopilot Tuning

2010-01-25 Thread Pete Morgan
Thanks leee.. for all the tips.. Is one of you aircraft in CVS so I cant study the autopilot. pete leee wrote: On Monday 25 Jan 2010, Pete Morgan wrote: thanks lee for the reply, particular about the thinking it through part; and am already thinking about a problem I've encountered,

Re: [Flightgear-devel] Autopilot Tuning

2010-01-25 Thread Torsten Dreyer
On Monday 25 Jan 2010, Pete Morgan wrote: I'm having a successful time tuning my first autopilot on the 787. I've managed to get rid of the jerks and wobbles, mainly by using a noise-spike filter with max-rate-of-change. That thanks to Syd Adams for that wonderful tip. All flight

Re: [Flightgear-devel] Autopilot Tuning

2010-01-25 Thread Pete Morgan
Would it be possible to wire up the VNav autopilot as follows, or is it a bad idea. http://i.imgur.com/UkGHG.png I'm trying to figure out a way that will allow smooth switching between the pids, which would mean taking into account the current elevator position. Also is it possible to make

[Flightgear-devel] Autopilot Tuning

2010-01-24 Thread Pete Morgan
I'm having a successful time tuning my first autopilot on the 787. I've managed to get rid of the jerks and wobbles, mainly by using a noise-spike filter with max-rate-of-change. That thanks to Syd Adams for that wonderful tip. All flight level changes, and NAV, heading can be tuned very