Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flightplan] Navigation parameters belong in the airframe #1315

Closed
wants to merge 13 commits into from

Conversation

dewagter
Copy link
Member

Navigation parameters are aircraft depending.

We end up with many flightplans that only differ 1 number.

If this approach is good I can change more airframes.

Other option is a set of variables that can also be set/stored in a rotorcraft_performance_parameters.h file.

…U I2C slaves

- add new configuration option (IMU_INIT) to test_progs Makefile. Example use:
    <target name="test_baro_board"          board="apogee_1.0">
      <subsystem name="imu" type="apogee"/>
      <configure name="IMU_INIT" value="1"/>
    </target>

- add overridable functions -
  test_baro_board_imu_{init,periodic_task,event_task} to the main
  test_baro_board program.

- add a new C module with implementation that enables and manages
  IMU so that the baro board works as slave
…t_progs

- the airframe allows verifying basic functionality of the IMU,
  actuators, communication ports
@gautierhattenberger
Copy link
Member

This is a good idea, I want to do this for a long time. But I think you can go further, with the default parameters in the navigation.h files and maybe have settings so you can change the value without reflashing.

@dewagter dewagter force-pushed the navigation_parameters_in_airframe branch from 69c5c30 to 9ce0ef9 Compare August 27, 2015 21:17
@dewagter
Copy link
Member Author

like this?

cfr34k and others added 8 commits August 28, 2015 15:31
- get rid of using the imu subsystem and global struct
- call InsEvent in rotorcraft
- add missing shared vectornav makefile
- remove ahrs stuff from ins vectornav, not used anyway...
cleaned up version of INS/AHRS/IMU Vectornav VN-200
closes #1305
- dashboard is totally outdated...
- keep radioframe as an example...
Implemented MILLIAMP_AT_IDLE_THROTTLE in current estimation
IMU testing + test airframe for apogee
@@ -3,6 +3,12 @@
<flight_plan alt="152" ground_alt="147" lat0="43 33 50.83" lon0="1 28 52.61" max_dist_from_home="150" name="Rotorcraft Basic (Enac)" security_height="2">
<header>
#include "autopilot.h"
#ifndef TAKEOFF_CLIMB_SPEED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not used anymore and can be removed again...

@flixr
Copy link
Member

flixr commented Sep 1, 2015

Aparat from the now superflous defines in the flight plan (as already commented), it looks good to me...

@dewagter dewagter closed this in e827cf2 Sep 2, 2015
@flixr flixr deleted the navigation_parameters_in_airframe branch September 2, 2015 12:49
dewagter added a commit that referenced this pull request Sep 2, 2015
@hooperfly
Copy link
Contributor

Simulation is not working for any of my aircraft. I tried adding the NAV block to one of my airframes and it made it even worse:

+  <section name="NAVIGATION" prefix="NAV_">
+    <define  name="CLIMB_VSPEED" value="1.0" />
+    <define  name="DESCEND_VSPEED" value="-1.0" />
+  </section>  

Something is broke for me now across all my airframes. I noticed the problem when the aircraft started gaining altitude upon entering the flare block during the landing sequence.

@hooperfly
Copy link
Contributor

So I've discovered that I can make the simulation behave correctly as long as I have ADAPT_THROTTLE_ENABLED set to TRUE in the airframes. I see the problem in simulation when I set it to FALSE. Am I missing something else with respect to airframe configuration if I disable the adaptive throttle? I would like to not have to use the adaptive throttle if possible since I'm not carrying variable payloads at this point. Any ideas or thoughts are appreciated.

@dewagter
Copy link
Member Author

dewagter commented Sep 9, 2015

@hooperfly sorry for the trouble, but with the defines above the default flare block should result in a vmode=climb with negative speed.

You can adjust and verify this descend rate value via the settings.

It has flown many times already with this commit, so I'm lost to what the cause could be in your case.

@dewagter
Copy link
Member Author

dewagter commented Sep 9, 2015

Can you first of all check while in simulation in settings that NAV nav_descend_vspeed is set to a negative value: e.g. -1 (minus 1).

Then, when ADAPT_THROTTLE set to OFF make sure your nominal_throttle matches the value you see when hovering. If the value is too high and the integrator is low, you can make a MAV climb. I just tested this in simulation as well: (bebop -> set nominal_throttle to 0.8 while the sim only needs 0.25. Set Ki gain low to 10. Then during flare it climbs dramatically.

The only thing is: it's been like that for a while.

@hooperfly
Copy link
Contributor

Hi @dewagter,

I think you are correct in that the problem has been here for a while. I hadn't seen it because I was always using ADPT_THROTTLE_ENABLED set to TRUE. I think the simulation may not model the actuators as they really are, so that might be part of the issue. I reverted all my airframes back to using the adaptive throttle setting for now. I know that, in the field, I have disabled the attribute in the Settings panel and the aircraft seems to work as expected.

By the way, I like the cleanup and consolidation of the NAV attributes, much appreciated. I'll keep thinking and testing to see if I can understand better the difference between the simulation and the live aircraft behavior.

@dewagter
Copy link
Member Author

@hooperfly,

You can safely fly without adapt_throttle with no problem (if your weight
is not changing too much), just make sure your nominal_throttle is more
or less correct for your real airframe, and make the Ki gain in the
vertical loop large enough to cope with the remaining error. In order for
the simulation to work well too, you might need to change the
nominal_throttle for the simulator to work well. Since its a define it
could be added in the <target defines with a different value for
simulator and for ap

-Christophe

@hooperfly
Copy link
Contributor

@dewagter I'm going to stick with the adapt_throttle_enabled for now. My challenge is to get the takeoffs cleaner/snappier with adapt_throttle. I'm going to go to the test field today and see if I get them to hop off the ground in a more predictable way. I'm flying 3 different airframes with different hardware, so it a bit of a combinatorial exercise. :) Might be nice to expose parts of the guidance_v_adapt parameters in the settings at some point.

@flixr flixr added this to the v5.8 milestone Nov 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants