Developer

APM automatic flap deployment ready for testing.

3689421878?profile=original

 

I have uploaded a new revision of APM to the trunk repository (r3665) with automatic flap functionality. I am really pressed for time so am hoping some community members can do some flight testing on it and report back.

 

Flap functionality can be assigned to channel 5 or 6, using the rc_5_funct and rc_6_funct parameters (similar to setting up differential ailerons).  The value to assign for automatic flaps is RC_6_FUNCT_FLAP_AUTO (in your config file) or 2 in the GCS parameter.

 

Flaps will function manually in flight modes of MANUAL through FLY_BY_WIRE_B, and will be set automatically for flight modes of FLY_BY_WIRE_C and higher.  If you want to know what FLY_BY_WIRE_C is, you'll have to wait a couple more days ;)

 

Automatic flap deployment is based on desired speed.  Desired speed is the current value of airspeed_cruise, which can be set with mission commands, or on the fly by changing the parameter value.  If you do not have an airspeed sensor flap deployment is based on the current value of throttle_cruise.  Four parameters have been added that can be set through your configuration file or through the ground station with MAVLink.  These are two speed values and two flap positions.  If the speed setpoint is above flap_1_speed then the flap position will be 0%.  If the speed setpoint is between flap_1_speed and flap_2_speed then the flap position shall be flap_1_percent.  If the speed setpoint is below flap_2_speed then the flap position shall be flap_2_percent.

 

The flap range is set up with the normal radio calibration procedure.  A flap value of 0% corresponds to the minimum value on the flap channel and a flap value of 100% corresponds to the maximum value on the flap channel.

 

Modest flap deployment should be useful for AP applications where you need to fly at a slow speed.  Higher flap deployment will be useful for even slower airspeeds with increased descent rates for landing approaches.

 

Have fun with it and please let me know how it goes.

 

 

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Finally I made it working my problem was too fast reading! And the reverse flap function to be corrected

    Now just some clarification about the flare function as well

    Landing Pitch (ArduPlane:land_pitch_cd)

    Landing flare altitude (ArduPlane:land_flare_alt)

    Landing flare time (ArduPlane:land_flare_sec)

  • Yes, auto flap is working.  The functionality has nothing to do with the actual airspeed or the pitot tube.  Auto flaps works only in the fully autonomous modes and is based on the current airspeed setpoint.  You can test your setup by disconnecting your motor (to keep the prop from spinning up), putting in a mission with a few waypoints, and putting the AP into Auto mode.  Then set FLAP_1_SPEED to some speed and FLAP_1_PERCNT to 100, and change the TRIM_ARSPD_CM parameter to be above and below FLAP_1_SPEED.

    To use auto flaps in a mission use the change speed command...

     

    I am following your instructions and I am very caution so I try on the ground in order to use the flap in auto:

     Rc5 Function on 3 First anomaly if Rc5 Function is on #2 it has no effect on flaps servos

    on # 1 got normal manual control of flap and # 3 works for auto mode  with problems described below,

     so I am testing on the ground no prop the flap get down as soon as I trigger auto mission but the flaps do not go back up when I change the speed in TRIM_ARSPD_CM Furthermore the FLAP_1_SPEED and FLAP_1_PERCNT have no effect even I change them back to 0  from  100% and from 3 M/s respectively, so basically in auto, the flaps stay down no matter the speed.

     how can I fix this behavior? Of course if If I reverse RC5 rev with -1 the flaps won’t move at all in auto so for sure I am doing something wrong and need your help Doug

    Can you give an example how to use the change speed command for auto landing and auto take off since my goal is to use auto flap for those modes?

  • Great thanks! 

  • Developer

    Meters/second.  And I believe it must be an integer value.

  • What are the units for flap_1_speed? cm/s or m/s?

  • Developer
    Thanks for that, that now makes sense :) will try it today, I am being extra careful on this UAV as my last one only lasted 5 seconds after the dodgy HK AIO board failed after takeoff. Running genuine hardware and latest firmware now :)
  • Developer

    Yes, auto flap is working.  The functionality has nothing to do with the actual airspeed or the pitot tube.  Auto flaps works only in the fully autonomous modes and is based on the current airspeed setpoint.  You can test your setup by disconnecting your motor (to keep the prop from spinning up), putting in a mission with a few waypoints, and putting the AP into Auto mode.  Then set FLAP_1_SPEED to some speed and FLAP_1_PERCNT to 100, and change the TRIM_ARSPD_CM parameter to be above and below FLAP_1_SPEED.

    To use auto flaps in a mission use the change speed command...

  • Developer

    Hi All

       Is auto flaps working?

    I am in ground testing with this at the moment and have a servo connected to ch5 and ch6, I have both of these set to Auto_flap. (in auto mode, loiter, RTL, nothing appears to work)

    I have tried multiple settings on the flap speeds and percentages and assume something should happen when I blow into the Pitot tube... but nothing... running arduplane 2.7 at the moment, on a 3DR APM2.5.

  • Does (auto) Flap deployment speed matter?  Wonder, if the flaps deploy too fast 50% and later 100% that APM2 can't keep up with stabilizing.  Should I slow down the flap servo or it doesn't matter?

  • that's great
This reply was deleted.