Re: [Flightgear-devel] Improved c172p autopilot

2007-01-04 Thread woodyst

Can you send me your version of the file? Thanks in advance.

On 1/3/07, Roy Vegard Ovesen [EMAIL PROTECTED] wrote:


On Wednesday 03 January 2007 10:27, woodyst wrote:
 It can be fixed in kap140.nas file, I think. I would study that file
well
 and if I can, I will send another patch.

I've overhauled kap140.nas quite extensively. I've changed to more
sensible
property data types like boolenas instead of text. I've also fixed the bug
that Joacim Persson reported.

I'll try to hand it over to someone with write access to CVS tonight.
Because
of this you should hold off studying the code until the new version is in
CVS.


--
Roy Vegard Ovesen

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel





--
Woodyst.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Improved c172p autopilot

2007-01-03 Thread woodyst

On 1/3/07, Dave Perry [EMAIL PROTECTED] wrote:


On Wed, 2007-01-03 at 03:08 +0100, woodyst wrote:

 I've arrived to that conclusion when I saw that the plain wasn't
 unable of performing a 0-0 visibility approach with ILS.

The ILS minimums for non CAT II or CAT III approaches are usually no
less than 200 1/2  (200 ft AGL decision height and 1/2 mile visibility).
It is not legal to do a 0-0 ILS in the C172P with this autopilot. If you
do not have the runway environment well in sight at the decision height
(usually the GS intersects the DH at the middle marker), you are
required to execute a missed approach.

 I have improved the file (I think, I've never used a real Cessna 172
 with the KAP140, so I do not know if this result is more or less
 realistic):

 - In the KAP140 manual there are a lot of references that indicates
 the KAP140 uses elevator trim and not elevator for handling altitudes.
 So I have adapted KAP140.xml file to use elevator trim. It results in
 softer altitude changes and the autopilot does not conflict with
 joystick or yoke.

Note, page 7 of the KAP140 Pilot's Guide shows a pitch servo and a pitch
trim servo as well as a manual electric trim switch on the yoke. There
would be no pitch servo if the autopilot were flying the pitch with
the pitch trim.



But then there would be interesting that the yoke, the pedals would not
produce interferences with the autopilot, because in a real plane, the yoke
moves when autopilot changes the pitch, but in flightgear it is not possible
because of the lack of force feedback in almost all yokes and pedals in the
market.

So I suggest that FlightGear could remember the last yoke and pedals
position and do not apply its values with the autopilot engaged when the
values of this devices didn't have changed. If not, whith the original
KAP140
config file, the plane is doing a lot of hard turns because the program
applies
autopilot's values and eventually yoke and pedals values too.

Do you agree with this reflexion? If you do, do you think it would be very
difficult implementing this solution? I ask it because I have almost started
looking at the code, and I do not know how things operate in FlightGear yet.

For the moment using trim for autopilot makes the fly more acurate because
it does not interfere with input devices. If this problem can not be solved
in FlightGear, I will remain with my config file, because I suffer very much
when I connect autopilot for making a rest and it starts doing very hard
turns
and plane's yoke vibrates a lot.

Do you suffer this effects too?

Note also item 15 on page 85. A flashing PT with arrows indicates the

direction of required pitch trim.  The pilot does not have the feel to
set the trim, since the pitch servo is carrying the out-of-trim load on
the yoke that the pilot would have to carry, were the AP not there.  The
PT annunciator provides this feel feedback. Also see page 89, voice
message 2.  If the autopilot were flying the pitch via pitch trim, this
warning would be meaningless.

It is especially important to pay attention to the PT annunciator (and
correct any out-of-trim condition) when the GS is acquired.  Otherwise,
you will have a very nasty surprise near the ground when you disengage
the autopilot (at or before the decision height is reached) with a
significant out-of-trim condition.  This has caused crashes for real.

I recall reading a NTSB report for a Martin 404 crash caused by the
pilot not noticing a stuck electric trim switch leaving the pitch trim
in full down and then disengaging the autopilot at altitude.  The ac
tried to do an outside loop.



I understand. But my trim indicator goes up and down all the time because
of the effect I have exposed before.


 Also I am interested in the opinion of any pilot that has flown a
 real Cessna and remembers the real autopilot performing.

I have not flown any Cessna autopilots, but I have flown several
hi-performance Piper aircraft that have similar autopilots.  The above
comments agree with that experience.



Does in the real Piper improve the performance of the KAP140 compared
to FlightGear's one or it performs in a similar manner. I use FlightGear as
a
preparation for learning to fly before I start flying one day in real life,
because it is my passion. I want to acquire some experience and I
appreciate the more realistic experience with FlightGear.

I added the KAP140 to the pa24-250 in FlightGear.  I have done a number

of ILS approaches in the fgfs pa24-250 using the KAP140.  It does an
adequate job down to just before the DH is reached.  It does seem to
chase the GS a bit more than I would expect from real experience for
the last mile before the DH is reached.



I solved it incrementing the proportional gain (Kp) from 2 to 3 in the
KAP140.xml file. Can you test if this works for you and if it makes this
autopilot more realistic?

For whatever reason, the KAP140 gives more realistic performance in the

pa24 than in the c172p.  I did not include 

Re: [Flightgear-devel] Improved c172p autopilot

2007-01-03 Thread Joacim Persson
On Wed, 3 Jan 2007, Ralf Gerlich wrote:

 Disabling joystick inputs alltogether should not be an option, except -
 perhaps - if you only disable a single axis. Assume that your AP is in
 ALT hold mode and you want to do turns.

You are right about that of course. And using a separate channel is also a
better idea. (And in some AP implementations, not the kap140, the AP is
disengaged if the controls are moved a certain amount or with a certain
force. But that's beside the kap140 issue.) Noice from the js should be
handled elsewhere: deadzone or filtering ...or simply bin old worn-out
joysticks with dodgy sensors. ;)

 OTOH if we're not that much after exact internal modelling, we might as
 well use the trim channel ;-)

The piloting of the aircraft, including AP, should be realistic. In this
case that involves adjusting the pitch trim (manually) -- why there are
warning lights for it on the kap140 panel (irl and in the sim) to inform
him/her that the pitch trim needs to be adjusted to avoid unpleasent
surprises when the AP is disengaged. So it isn't about internal modelling,
but rather external such. ;)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Improved c172p autopilot

2007-01-03 Thread Ralf Gerlich
Hi,

Joacim Persson wrote:
 OTOH if we're not that much after exact internal modelling, we might as
 well use the trim channel ;-)
 
 The piloting of the aircraft, including AP, should be realistic. In this
 case that involves adjusting the pitch trim (manually) -- why there are
 warning lights for it on the kap140 panel (irl and in the sim) to inform
 him/her that the pitch trim needs to be adjusted to avoid unpleasent
 surprises when the AP is disengaged. So it isn't about internal modelling,
 but rather external such. ;)

I'm confused. Does the KAP140 use the trim or not?

Cheers,
Ralf


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Improved c172p autopilot

2007-01-03 Thread Roy Vegard Ovesen
On Wednesday 03 January 2007 10:27, woodyst wrote:
 It can be fixed in kap140.nas file, I think. I would study that file well
 and if I can, I will send another patch.

I've overhauled kap140.nas quite extensively. I've changed to more sensible 
property data types like boolenas instead of text. I've also fixed the bug 
that Joacim Persson reported.

I'll try to hand it over to someone with write access to CVS tonight. Because 
of this you should hold off studying the code until the new version is in 
CVS.


-- 
Roy Vegard Ovesen

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Improved c172p autopilot

2007-01-02 Thread woodyst

I was investigating about the KAP140. I read the manual and the autopilot
documents of FlightGear and I think there may be some errors in the
KAP140.xml file.

I've arrived to that conclusion when I saw that the plain wasn't unable of
performing a 0-0 visibility approach with ILS.

I have improved the file (I think, I've never used a real Cessna 172 with
the KAP140, so I do not know if this result is more or less realistic):

- In the KAP140 manual there are a lot of references that indicates the
KAP140 uses elevator trim and not elevator for handling altitudes. So I have
adapted KAP140.xml file to use elevator trim. It results in softer altitude
changes and the autopilot does not conflict with joystick or yoke.

- I have changed some parameters trying to make Cessna 172 autopilot capable
of doing an ILS approach and landing without intervention of the user except
for throttle. This new configuration makes autopilot softer than previous.

Please, test it and include it in the CVS if you like it. Also I am
interested in the opinion of any pilot that has flown a real Cessna and
remembers the real autopilot performing.


--
Woodyst.
--- c172p.bkp/Systems/KAP140.xml	2006-12-28 01:33:06.0 +0100
+++ c172p/Systems/KAP140.xml	2007-01-03 02:35:55.0 +0100
@@ -62,7 +62,7 @@
   prop/autopilot/KAP140/settings/target-intercept-angle/prop
 /output
 config
-  Kp2.0/Kp!-- proportional gain --
+  Kp3.0/Kp!-- proportional gain --
   beta1.0/beta!-- input value weighing factor --
   alpha0.1/alpha  !-- low pass filter weighing factor --
   gamma0.0/gamma  !-- input value weighing factor for --
@@ -226,7 +226,7 @@
   gamma0.0/gamma  !-- input value weighing factor for --
   !-- unfiltered derivative error --
   Ti15.0/Ti!-- integrator time --
-  Td0.0/Td!-- derivator time --
+  Td0.000/Td!-- derivator time --
   u_min-0.001/u_min !-- minimum output clamp --
   u_max0.017/u_max  !-- maximum output clamp --
 /config
@@ -256,19 +256,19 @@
   prop/autopilot/KAP140/settings/target-pressure-rate/prop
 /reference
 output
-  prop/controls/flight/elevator/prop
+  prop/controls/flight/elevator-trim/prop
 /output
 config
-  Kp5.0/Kp  !-- proportional gain --
+  Kp7.0/Kp  !-- proportional gain --
   beta1.0/beta!-- input value weighing factor --
   alpha0.1/alpha  !-- low pass filter weighing factor --
   gamma0.0/gamma  !-- input value weighing factor for --
   !-- unfiltered derivative error --
-  Ti4.0/Ti!-- integrator time --
+  Ti8.0/Ti!-- integrator time --
   Td0.0/Td!-- derivator time --
-  u_min-0.5/u_min !-- minimum output clamp --
-  u_max0.5/u_max  !-- maximum output clamp --
+  u_min-5/u_min !-- minimum output clamp --
+  u_max5/u_max  !-- maximum output clamp --
 /config
/pid-controller
 
-/PropertyList
\ No hay ningún carácter de nueva línea al final del fichero
+/PropertyList
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Improved c172p autopilot

2007-01-02 Thread Dave Perry
On Wed, 2007-01-03 at 03:08 +0100, woodyst wrote:

 I've arrived to that conclusion when I saw that the plain wasn't
 unable of performing a 0-0 visibility approach with ILS. 

The ILS minimums for non CAT II or CAT III approaches are usually no
less than 200 1/2  (200 ft AGL decision height and 1/2 mile visibility).
It is not legal to do a 0-0 ILS in the C172P with this autopilot. If you
do not have the runway environment well in sight at the decision height
(usually the GS intersects the DH at the middle marker), you are
required to execute a missed approach.

 I have improved the file (I think, I've never used a real Cessna 172
 with the KAP140, so I do not know if this result is more or less
 realistic):
 
 - In the KAP140 manual there are a lot of references that indicates
 the KAP140 uses elevator trim and not elevator for handling altitudes.
 So I have adapted KAP140.xml file to use elevator trim. It results in
 softer altitude changes and the autopilot does not conflict with
 joystick or yoke.

Note, page 7 of the KAP140 Pilot's Guide shows a pitch servo and a pitch
trim servo as well as a manual electric trim switch on the yoke. There
would be no pitch servo if the autopilot were flying the pitch with
the pitch trim.

Note also item 15 on page 85. A flashing PT with arrows indicates the
direction of required pitch trim.  The pilot does not have the feel to
set the trim, since the pitch servo is carrying the out-of-trim load on
the yoke that the pilot would have to carry, were the AP not there.  The
PT annunciator provides this feel feedback. Also see page 89, voice
message 2.  If the autopilot were flying the pitch via pitch trim, this
warning would be meaningless.

It is especially important to pay attention to the PT annunciator (and
correct any out-of-trim condition) when the GS is acquired.  Otherwise,
you will have a very nasty surprise near the ground when you disengage
the autopilot (at or before the decision height is reached) with a
significant out-of-trim condition.  This has caused crashes for real.

I recall reading a NTSB report for a Martin 404 crash caused by the
pilot not noticing a stuck electric trim switch leaving the pitch trim
in full down and then disengaging the autopilot at altitude.  The ac
tried to do an outside loop.

  Also I am interested in the opinion of any pilot that has flown a
 real Cessna and remembers the real autopilot performing.
 
I have not flown any Cessna autopilots, but I have flown several
hi-performance Piper aircraft that have similar autopilots.  The above
comments agree with that experience.

I added the KAP140 to the pa24-250 in FlightGear.  I have done a number
of ILS approaches in the fgfs pa24-250 using the KAP140.  It does an
adequate job down to just before the DH is reached.  It does seem to
chase the GS a bit more than I would expect from real experience for
the last mile before the DH is reached.

For whatever reason, the KAP140 gives more realistic performance in the
pa24 than in the c172p.  I did not include an autopilot config xml in
the pa24 implementation, i.e. it is using the default configuration.

The only surprise I have noticed compared to the Pilot's Guide is for
the REV acquisition.  The manual says after depressing the REV button,
set the HDG bug to the front course inbound heading while the HDG
annunciator is flashing.  The modeled KAP140 requires the HDG bug to be
set to the reverse heading (the reciprocal of the documentation bug
setting). 

-- 
Dave Perry [EMAIL PROTECTED]


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Improved c172p autopilot

2007-01-02 Thread Dave Perry
On Tue, 2007-01-02 at 23:01 -0700, Dave Perry wrote:

 For whatever reason, the KAP140 gives more realistic performance in the
 pa24 than in the c172p.  I did not include an autopilot config xml in
 the pa24 implementation, i.e. it is using the default configuration.

Correction:  I am using the c172p KAP140.xml autopilot configuration in
the pa24 implementation.
-- 
Dave Perry [EMAIL PROTECTED]


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel