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

Implement wind estimation #2450

Merged
merged 29 commits into from May 27, 2018

Conversation

Projects
None yet
7 participants
@fiam
Copy link
Member

commented Nov 1, 2017

  • Import code from PR #2284
  • Move code into navigation/
  • Use functions from navigation system rather than checking GPS and IMU directly.
  • Fix code (probably a lot of errors still in there)
  • Implement basic OSD indicators
  • Full OSD indicators (symbols, proper unit support)
  • Decide wether we want to show the wind relative to earth with just YAW rotation or wind relative to aircraft
  • Reset OSD indicators in pgResetFn_osdConfig()

Configurator support at iNavFlight/inav-configurator#300

@fiam fiam added this to the 1.9 milestone Nov 1, 2017

@Linjieqiang

This comment has been minimized.

Copy link
Contributor

commented Nov 2, 2017

Nice.I will follow up and test it if I have free time.

@fiam

This comment has been minimized.

memcpy(lastFuselageDirection, fuselageDirection, sizeof(lastFuselageDirection));
memcpy(lastGroundVelocity, groundVelocity, sizeof(lastGroundVelocity));

float theta = atan2f(groundVelocityDiff[1], groundVelocityDiff[0]) - atan2f(groundVelocityDiff[1], groundVelocityDiff[0]);// equation 9

This comment has been minimized.

Copy link
@digitalentity

digitalentity Nov 3, 2017

Member

We need to use fastmath functions here: atan2_approx, sin_approx and cos_approx.

@fiam

This comment has been minimized.

Copy link
Member Author

commented Nov 3, 2017

This should now be good for some field testing. I'd appreciate if someone can give it a try, since it's raining here and I can't flight test.

@shellixyz

This comment has been minimized.

Copy link
Collaborator

commented Nov 4, 2017

Great, and thank you for linking the paper ! I will try as soon as I have got a plane with FPV ready but it could take a couple of weeks.

memcpy(lastFuselageDirection, fuselageDirection, sizeof(lastFuselageDirection));
memcpy(lastGroundVelocity, groundVelocity, sizeof(lastGroundVelocity));

float theta = atan2f(groundVelocityDiff[1], groundVelocityDiff[0]) - atan2f(groundVelocityDiff[1], groundVelocityDiff[0]);// equation 9

This comment has been minimized.

Copy link
@junwoo091400

junwoo091400 Nov 6, 2017

Contributor

Is this correct?? Wouldnt this give 0 every time??

This comment has been minimized.

Copy link
@alexbojko

alexbojko Nov 15, 2017

as far as I understand from documentation here should be the difference between vectors of ground velocity speed and fuselage direction. I think it will work:

float theta = atan2f(groundVelocityDiff[1], groundVelocityDiff[0]) - atan2f(fuselageDirectionDiff[1], fuselageDirectionDiff[0]);

This comment has been minimized.

Copy link
@junwoo091400

junwoo091400 Nov 16, 2017

Contributor

Yes, I didn't see the document, but your suggestion seems better.

@Dronek

This comment has been minimized.

Copy link

commented Jan 23, 2018

In the comments of the DIYdrones thread there is the following statement:
"The idea from the start was to see how much performance we could squeeze out of a minimal hardware design using only GPS, gyros, and accelerometers."

I think it would be a much more versatile and dynamic approach to estimate wind speed based on heading, course, airspeed and groundspeed as described here:
ShikOfTheRa/scarab-osd#381

Hardware-wise airspeed support is available in iNav (lilmited to logging as of now) and compass works with multi-rotors, so why shouldn't it be used for fixed wing as well? Wind estimation without an airspeed sensor seems very limiting and restricted to rare flight conditions, especially for the target of the initial idea: aircraft with minimal hardware design.

@junwoo091400

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2018

Yes. I also was used to having no magnetometer sensor on fixed wing but didn't know Why. Since fixed wing has a lot of surface and has less motor than Quadcopter, it would be easier to avoid ElectroMagneticInterference too. Really, why not use magnetometer on fixed wing?? Sems like a good Idea.

@digitalentity digitalentity modified the milestones: 1.9, 2.0 Feb 12, 2018

@fiam fiam force-pushed the agh_wind_estimation branch from 96a0a70 to cd12faa Feb 14, 2018

@fiam fiam force-pushed the agh_wind_estimation branch from cd12faa to 28b1d1a Feb 26, 2018

@digitalentity digitalentity modified the milestones: 2.0, Future Apr 16, 2018

@fiam fiam force-pushed the agh_wind_estimation branch 2 times, most recently from ddf8e27 to 19bb454 May 11, 2018

@fiam fiam force-pushed the agh_wind_estimation branch 3 times, most recently from 634b141 to 87f39a3 May 20, 2018

@fiam fiam modified the milestones: Future, 2.0 May 22, 2018

@fiam fiam force-pushed the agh_wind_estimation branch from 87f39a3 to 9c7f2cc May 22, 2018

fiam added some commits Nov 3, 2017

Move check for valid GPS heading to a function
Allows calling it from both the IMU and the wind estimator
Check for valid GPS heading, not valid nav system heading
We're using just information from the GPS, so having a valid heading
due to the presence of a compass won't work. This also makes this
code not depend on the NAV system anymore, so we'll move it
somewhere else.
Tweak the filtering for estimated wind speed a bit
Remove conditional which allowed only negative or small positive
changes to the estimated wind speed. Leave the current 0.95 and
0.05 weights for past estimate/current estimate. Eventually we'll
add a proper filter.
Calculate wind speed in cm/s
Due to incorrect scaling, it was calculated in m/s
Change wind velocity presentation to the user in OSD
Don't change speed in Z axis, always show vertical wind speed in
earth frame.
For the XY plane, just calculate magnitude and angle relative to
the aircraft in osd.c. This way we don't need to perform a full
3D rotation.

This lets use remove the getEstimatedWindVelocityBodyFrame()
function.
When wind estimation isn't valid, show indicators as '---'
Allows users to tell apart unknown wind from wind detected as
zero.
Make wind estimator require GPS support
It doesn't depend on NAV anymore, just GPS
Move wind estimator to flight/, call it only on GPS updates
- Move navigation_wind_estimator.{c,h} to flight/wind_estimator.{c,h}
- Rename gpsThread() to gpsUpdate(), make it return a bool which is
true iff new GPS data was received.
- When the GPS returns new data, call into the wind estimator to
update itself.
- Make sure wind estimator can be disabled at compile time via
the USE_WIND_ESTIMATOR #ifdef
- Disable OSD wind indicators when wind estimator support is not
compiled in.
- Don't check for both GPS and USE_WIND_ESTIMATOR in ifdefs, instead
fail compilation with an error in USE_WIND_ESTIMATOR is defined
without defining GPS.
Add Wind Estimation paper by William Premerlani
Used to implement the wind estimator
Add back check for bounding wind updates
Allow either updates which lower the total wind speed or increase
it slightly. Arduplane uses a similar algorithm, so let's fly
test this and see what happens.
Add WIND_ESTIMATOR debug mode
Uses debug[0-2] to log estimated wind in earth frame X, Y, Z.
Fix value of DEBUG_WIND_ESTIMATOR
After latest rebase, it should be placed after DEBUG_STAGE2
Fix threshold for maximum estimated wind length increase
- Threshold was in m/s, while the wind is calculated in cm/s.
- Fix debug[] values, no need to *100 since wind is already cm/s.
- Replace a runtime sqrtf() with a compile time sq().
- Rename a few variables to snakeCase.

@fiam fiam force-pushed the agh_wind_estimation branch from e171b3a to af0c2a9 May 27, 2018

Refactor calculation for horizontal wind speed to wind_estimator.c
Add float getEstimatedHorizontalWindSpeed(uint16_t *angle)

@fiam fiam force-pushed the agh_wind_estimation branch from af0c2a9 to 4f58602 May 27, 2018

@fiam fiam merged commit 6ccd0cc into development May 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@fiam fiam deleted the agh_wind_estimation branch May 27, 2018

shellixyz added a commit to shellixyz/inav that referenced this pull request May 29, 2018

Squashed commit of the following: upstream/development
commit 5c76229
Merge: 6ccd0cc 8f6d7a0
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Mon May 28 22:14:36 2018 +0100

    Merge pull request iNavFlight#3289 from giacomo892/fix_fakegps

    Fix FAKE_GPS not providing good position/velocity data

commit 8f6d7a0
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 17:02:14 2018 +0200

    Fix for FAKE_GPS

commit 6ccd0cc
Merge: fe70d31 4f58602
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 22:32:45 2018 +0100

    Merge pull request iNavFlight#2450 from iNavFlight/agh_wind_estimation

    Implement wind estimation

commit 4f58602
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 27 21:10:37 2018 +0100

    Refactor calculation for horizontal wind speed to wind_estimator.c

    Add float getEstimatedHorizontalWindSpeed(uint16_t *angle)

commit fe70d31
Merge: 2c32ebb f2ffbe8
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:43 2018 +0100

    Merge pull request iNavFlight#3241 from iNavFlight/agh_map_radar_fixes

    Reduce initial map scale, break early when we're too close to home

commit 2c32ebb
Merge: cde920e 4623e36
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:24 2018 +0100

    Merge pull request iNavFlight#3264 from iNavFlight/agh_cms_osd_alarms

    Add entries for adjusting all OSD alarms in CMS

commit e0862c3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu May 24 10:32:42 2018 +0100

    Remove extra semicolon at end of line

commit 0b62513
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 21:57:08 2018 +0100

    Re-enable OSD wind speed indicators

commit 042a10d
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 21 10:50:33 2018 +0100

    Increase wind measurement timeout to 10s

commit 39d3076
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 20 12:08:13 2018 +0100

    Fix threshold for maximum estimated wind length increase

    - Threshold was in m/s, while the wind is calculated in cm/s.
    - Fix debug[] values, no need to *100 since wind is already cm/s.
    - Replace a runtime sqrtf() with a compile time sq().
    - Rename a few variables to snakeCase.

commit 04e5ced
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 14 22:25:28 2018 +0100

    Fix value of DEBUG_WIND_ESTIMATOR

    After latest rebase, it should be placed after DEBUG_STAGE2

commit eb0fd00
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 11 14:03:37 2018 +0100

    Add WIND_ESTIMATOR debug mode

    Uses debug[0-2] to log estimated wind in earth frame X, Y, Z.

commit c21718b
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Feb 14 17:23:26 2018 +0000

    Fix incorrect calculation for theta during wind estimation

    Kudos to @junwoo091400 and @alexbojko for spotting it

commit b535fec
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun Nov 5 18:31:54 2017 +0000

    Add back check for bounding wind updates

    Allow either updates which lower the total wind speed or increase
    it slightly. Arduplane uses a similar algorithm, so let's fly
    test this and see what happens.

commit 462e5e0
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:14:22 2017 +0000

    Add Wind Estimation paper by William Premerlani

    Used to implement the wind estimator

commit 24f1327
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:10:26 2017 +0000

    Move wind estimator to flight/, call it only on GPS updates

    - Move navigation_wind_estimator.{c,h} to flight/wind_estimator.{c,h}
    - Rename gpsThread() to gpsUpdate(), make it return a bool which is
    true iff new GPS data was received.
    - When the GPS returns new data, call into the wind estimator to
    update itself.
    - Make sure wind estimator can be disabled at compile time via
    the USE_WIND_ESTIMATOR #ifdef
    - Disable OSD wind indicators when wind estimator support is not
    compiled in.
    - Don't check for both GPS and USE_WIND_ESTIMATOR in ifdefs, instead
    fail compilation with an error in USE_WIND_ESTIMATOR is defined
    without defining GPS.

commit b93ae78
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:23:58 2017 +0000

    Make wind estimator require GPS support

    It doesn't depend on NAV anymore, just GPS

commit ad6bccb
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:22:57 2017 +0000

    When wind estimation isn't valid, show indicators as '---'

    Allows users to tell apart unknown wind from wind detected as
    zero.

commit 6437432
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:57:57 2017 +0000

    Change wind velocity presentation to the user in OSD

    Don't change speed in Z axis, always show vertical wind speed in
    earth frame.
    For the XY plane, just calculate magnitude and angle relative to
    the aircraft in osd.c. This way we don't need to perform a full
    3D rotation.

    This lets use remove the getEstimatedWindVelocityBodyFrame()
    function.

commit 68f634e
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:26:30 2017 +0000

    Add comments explaning how the wind estimator works

commit a013861
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:59 2017 +0000

    Calculate wind speed in cm/s

    Due to incorrect scaling, it was calculated in m/s

commit 6f77d3c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:23 2017 +0000

    Remove unused include

commit 6ff6c22
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:22:55 2017 +0000

    Tweak the filtering for estimated wind speed a bit

    Remove conditional which allowed only negative or small positive
    changes to the estimated wind speed. Leave the current 0.95 and
    0.05 weights for past estimate/current estimate. Eventually we'll
    add a proper filter.

commit a416827
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:20:35 2017 +0000

    Check for valid GPS heading, not valid nav system heading

    We're using just information from the GPS, so having a valid heading
    due to the presence of a compass won't work. This also makes this
    code not depend on the NAV system anymore, so we'll move it
    somewhere else.

commit 78e62d3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:18:02 2017 +0000

    Move check for valid GPS heading to a function

    Allows calling it from both the IMU and the wind estimator

commit c52f687
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 10:38:36 2017 +0000

    Remove double ;

    Thanks to @giacomo892 for pointing it

commit 9719562
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:46:11 2017 +0000

    Check gpsSol flags for valid VelNE and VelD before using them

commit 03c06f9
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:43:27 2017 +0000

    Only estimate wind speed in fixed wing

commit 91c919f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:47:25 2017 +0000

    Respect OSD units when formatting wind speed

    Move formatting to a new osdFormatWindSpeedStr() function
    which is used for both wind speed indicators.

commit 13c3b6f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:04:51 2017 +0000

    Rename OSD field constants for wind indicators

    Cosmetic change

    OSD_HORIZONTAL_WIND -> OSD_WIND_SPEED_HORIZONTAL
    OSD_VERTICAL_WIND -> OSD_WIND_SPEED_VERTICAL

commit d9a6b4f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:02:53 2017 +0000

    Use dedicated symbols for OSD wind indicators

commit e3c5882
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 22:02:28 2017 +0000

    Initial, very basic implementation of OSD wind indicators

    An indicator shows the wind in the XY plane while another shows
    the Z axis.

commit 9a45a0c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 19:24:40 2017 +0000

    Move wind estimator to navigation

    - Move est_wind_airspeed to navigation_wind_estimator
    - Make a few stylistical changes in all the file to use
    INAV conventions and constants for better readability.
    - Add function for retrieving wind estimates in body frame.
    - Mark with missing stuff with TODO

commit 41013ad
Author: LinJieqiang <517503838@qq.com>
Date:   Sun Oct 8 10:10:52 2017 +0800

    Use GPS and DCM to estimate the airspeed for fixwing.

commit cde920e
Merge: 46f0ca8 69080ba
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Fri May 25 14:10:26 2018 +0200

    Merge pull request iNavFlight#3272 from iNavFlight/dzikuvx-docs-update

    Various docs updated and simplifications

commit 69080ba
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:53:18 2018 +0200

    various doc updates

commit 64bdaeb
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:16:21 2018 +0200

    We do not have it, so just drop it

commit 4623e36
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 22:33:23 2018 +0100

    Add entries for adjusting all OSD alarms

commit f2ffbe8
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 18 15:53:15 2018 +0100

    Reduce initial map scale, break early when we're too close to home

    Reduce minum map scale to 10m in SI/0.01mi in IMP. This way the radar
    can draw symbols even when the craft is very close to home.

    Also, when the craft is too close to the map center to be drawn,
    break out early to save some time.

shellixyz added a commit to shellixyz/inav that referenced this pull request May 29, 2018

Squashed commit of the following: auto_pitch_down_when_throttle_bello…
…w_cruise

commit b33e1d01ba02e3c020c6e1aa0852cd320068792d
Author: Michel Pastor <shellixyz@gmail.com>
Date:   Sat May 26 04:01:51 2018 +0200

    Automatically pitch down in angle mode when throttle is bellow cruise throttle

commit 5c76229
Merge: 6ccd0cc 8f6d7a0
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Mon May 28 22:14:36 2018 +0100

    Merge pull request iNavFlight#3289 from giacomo892/fix_fakegps

    Fix FAKE_GPS not providing good position/velocity data

commit 8f6d7a0
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 17:02:14 2018 +0200

    Fix for FAKE_GPS

commit 6ccd0cc
Merge: fe70d31 4f58602
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 22:32:45 2018 +0100

    Merge pull request iNavFlight#2450 from iNavFlight/agh_wind_estimation

    Implement wind estimation

commit 4f58602
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 27 21:10:37 2018 +0100

    Refactor calculation for horizontal wind speed to wind_estimator.c

    Add float getEstimatedHorizontalWindSpeed(uint16_t *angle)

commit fe70d31
Merge: 2c32ebb f2ffbe8
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:43 2018 +0100

    Merge pull request iNavFlight#3241 from iNavFlight/agh_map_radar_fixes

    Reduce initial map scale, break early when we're too close to home

commit 2c32ebb
Merge: cde920e 4623e36
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:24 2018 +0100

    Merge pull request iNavFlight#3264 from iNavFlight/agh_cms_osd_alarms

    Add entries for adjusting all OSD alarms in CMS

commit e0862c3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu May 24 10:32:42 2018 +0100

    Remove extra semicolon at end of line

commit 0b62513
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 21:57:08 2018 +0100

    Re-enable OSD wind speed indicators

commit 042a10d
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 21 10:50:33 2018 +0100

    Increase wind measurement timeout to 10s

commit 39d3076
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 20 12:08:13 2018 +0100

    Fix threshold for maximum estimated wind length increase

    - Threshold was in m/s, while the wind is calculated in cm/s.
    - Fix debug[] values, no need to *100 since wind is already cm/s.
    - Replace a runtime sqrtf() with a compile time sq().
    - Rename a few variables to snakeCase.

commit 04e5ced
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 14 22:25:28 2018 +0100

    Fix value of DEBUG_WIND_ESTIMATOR

    After latest rebase, it should be placed after DEBUG_STAGE2

commit eb0fd00
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 11 14:03:37 2018 +0100

    Add WIND_ESTIMATOR debug mode

    Uses debug[0-2] to log estimated wind in earth frame X, Y, Z.

commit c21718b
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Feb 14 17:23:26 2018 +0000

    Fix incorrect calculation for theta during wind estimation

    Kudos to @junwoo091400 and @alexbojko for spotting it

commit b535fec
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun Nov 5 18:31:54 2017 +0000

    Add back check for bounding wind updates

    Allow either updates which lower the total wind speed or increase
    it slightly. Arduplane uses a similar algorithm, so let's fly
    test this and see what happens.

commit 462e5e0
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:14:22 2017 +0000

    Add Wind Estimation paper by William Premerlani

    Used to implement the wind estimator

commit 24f1327
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:10:26 2017 +0000

    Move wind estimator to flight/, call it only on GPS updates

    - Move navigation_wind_estimator.{c,h} to flight/wind_estimator.{c,h}
    - Rename gpsThread() to gpsUpdate(), make it return a bool which is
    true iff new GPS data was received.
    - When the GPS returns new data, call into the wind estimator to
    update itself.
    - Make sure wind estimator can be disabled at compile time via
    the USE_WIND_ESTIMATOR #ifdef
    - Disable OSD wind indicators when wind estimator support is not
    compiled in.
    - Don't check for both GPS and USE_WIND_ESTIMATOR in ifdefs, instead
    fail compilation with an error in USE_WIND_ESTIMATOR is defined
    without defining GPS.

commit b93ae78
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:23:58 2017 +0000

    Make wind estimator require GPS support

    It doesn't depend on NAV anymore, just GPS

commit ad6bccb
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:22:57 2017 +0000

    When wind estimation isn't valid, show indicators as '---'

    Allows users to tell apart unknown wind from wind detected as
    zero.

commit 6437432
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:57:57 2017 +0000

    Change wind velocity presentation to the user in OSD

    Don't change speed in Z axis, always show vertical wind speed in
    earth frame.
    For the XY plane, just calculate magnitude and angle relative to
    the aircraft in osd.c. This way we don't need to perform a full
    3D rotation.

    This lets use remove the getEstimatedWindVelocityBodyFrame()
    function.

commit 68f634e
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:26:30 2017 +0000

    Add comments explaning how the wind estimator works

commit a013861
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:59 2017 +0000

    Calculate wind speed in cm/s

    Due to incorrect scaling, it was calculated in m/s

commit 6f77d3c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:23 2017 +0000

    Remove unused include

commit 6ff6c22
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:22:55 2017 +0000

    Tweak the filtering for estimated wind speed a bit

    Remove conditional which allowed only negative or small positive
    changes to the estimated wind speed. Leave the current 0.95 and
    0.05 weights for past estimate/current estimate. Eventually we'll
    add a proper filter.

commit a416827
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:20:35 2017 +0000

    Check for valid GPS heading, not valid nav system heading

    We're using just information from the GPS, so having a valid heading
    due to the presence of a compass won't work. This also makes this
    code not depend on the NAV system anymore, so we'll move it
    somewhere else.

commit 78e62d3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:18:02 2017 +0000

    Move check for valid GPS heading to a function

    Allows calling it from both the IMU and the wind estimator

commit c52f687
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 10:38:36 2017 +0000

    Remove double ;

    Thanks to @giacomo892 for pointing it

commit 9719562
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:46:11 2017 +0000

    Check gpsSol flags for valid VelNE and VelD before using them

commit 03c06f9
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:43:27 2017 +0000

    Only estimate wind speed in fixed wing

commit 91c919f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:47:25 2017 +0000

    Respect OSD units when formatting wind speed

    Move formatting to a new osdFormatWindSpeedStr() function
    which is used for both wind speed indicators.

commit 13c3b6f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:04:51 2017 +0000

    Rename OSD field constants for wind indicators

    Cosmetic change

    OSD_HORIZONTAL_WIND -> OSD_WIND_SPEED_HORIZONTAL
    OSD_VERTICAL_WIND -> OSD_WIND_SPEED_VERTICAL

commit d9a6b4f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:02:53 2017 +0000

    Use dedicated symbols for OSD wind indicators

commit e3c5882
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 22:02:28 2017 +0000

    Initial, very basic implementation of OSD wind indicators

    An indicator shows the wind in the XY plane while another shows
    the Z axis.

commit 9a45a0c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 19:24:40 2017 +0000

    Move wind estimator to navigation

    - Move est_wind_airspeed to navigation_wind_estimator
    - Make a few stylistical changes in all the file to use
    INAV conventions and constants for better readability.
    - Add function for retrieving wind estimates in body frame.
    - Mark with missing stuff with TODO

commit 41013ad
Author: LinJieqiang <517503838@qq.com>
Date:   Sun Oct 8 10:10:52 2017 +0800

    Use GPS and DCM to estimate the airspeed for fixwing.

commit cde920e
Merge: 46f0ca8 69080ba
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Fri May 25 14:10:26 2018 +0200

    Merge pull request iNavFlight#3272 from iNavFlight/dzikuvx-docs-update

    Various docs updated and simplifications

commit 69080ba
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:53:18 2018 +0200

    various doc updates

commit 64bdaeb
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:16:21 2018 +0200

    We do not have it, so just drop it

commit 4623e36
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 22:33:23 2018 +0100

    Add entries for adjusting all OSD alarms

commit f2ffbe8
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 18 15:53:15 2018 +0100

    Reduce initial map scale, break early when we're too close to home

    Reduce minum map scale to 10m in SI/0.01mi in IMP. This way the radar
    can draw symbols even when the craft is very close to home.

    Also, when the craft is too close to the map center to be drawn,
    break out early to save some time.

shellixyz added a commit to shellixyz/inav that referenced this pull request May 29, 2018

Squashed commit of the following: auto_pitch_down_when_throttle_bello…
…w_cruise

commit ba3839a
Author: Michel Pastor <shellixyz@gmail.com>
Date:   Sat May 26 04:01:51 2018 +0200

    Automatically pitch down in angle mode when throttle is bellow cruise throttle

commit 5c76229
Merge: 6ccd0cc 8f6d7a0
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Mon May 28 22:14:36 2018 +0100

    Merge pull request iNavFlight#3289 from giacomo892/fix_fakegps

    Fix FAKE_GPS not providing good position/velocity data

commit 8f6d7a0
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 17:02:14 2018 +0200

    Fix for FAKE_GPS

commit 6ccd0cc
Merge: fe70d31 4f58602
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 22:32:45 2018 +0100

    Merge pull request iNavFlight#2450 from iNavFlight/agh_wind_estimation

    Implement wind estimation

commit 4f58602
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 27 21:10:37 2018 +0100

    Refactor calculation for horizontal wind speed to wind_estimator.c

    Add float getEstimatedHorizontalWindSpeed(uint16_t *angle)

commit fe70d31
Merge: 2c32ebb f2ffbe8
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:43 2018 +0100

    Merge pull request iNavFlight#3241 from iNavFlight/agh_map_radar_fixes

    Reduce initial map scale, break early when we're too close to home

commit 2c32ebb
Merge: cde920e 4623e36
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:24 2018 +0100

    Merge pull request iNavFlight#3264 from iNavFlight/agh_cms_osd_alarms

    Add entries for adjusting all OSD alarms in CMS

commit e0862c3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu May 24 10:32:42 2018 +0100

    Remove extra semicolon at end of line

commit 0b62513
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 21:57:08 2018 +0100

    Re-enable OSD wind speed indicators

commit 042a10d
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 21 10:50:33 2018 +0100

    Increase wind measurement timeout to 10s

commit 39d3076
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 20 12:08:13 2018 +0100

    Fix threshold for maximum estimated wind length increase

    - Threshold was in m/s, while the wind is calculated in cm/s.
    - Fix debug[] values, no need to *100 since wind is already cm/s.
    - Replace a runtime sqrtf() with a compile time sq().
    - Rename a few variables to snakeCase.

commit 04e5ced
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 14 22:25:28 2018 +0100

    Fix value of DEBUG_WIND_ESTIMATOR

    After latest rebase, it should be placed after DEBUG_STAGE2

commit eb0fd00
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 11 14:03:37 2018 +0100

    Add WIND_ESTIMATOR debug mode

    Uses debug[0-2] to log estimated wind in earth frame X, Y, Z.

commit c21718b
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Feb 14 17:23:26 2018 +0000

    Fix incorrect calculation for theta during wind estimation

    Kudos to @junwoo091400 and @alexbojko for spotting it

commit b535fec
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun Nov 5 18:31:54 2017 +0000

    Add back check for bounding wind updates

    Allow either updates which lower the total wind speed or increase
    it slightly. Arduplane uses a similar algorithm, so let's fly
    test this and see what happens.

commit 462e5e0
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:14:22 2017 +0000

    Add Wind Estimation paper by William Premerlani

    Used to implement the wind estimator

commit 24f1327
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:10:26 2017 +0000

    Move wind estimator to flight/, call it only on GPS updates

    - Move navigation_wind_estimator.{c,h} to flight/wind_estimator.{c,h}
    - Rename gpsThread() to gpsUpdate(), make it return a bool which is
    true iff new GPS data was received.
    - When the GPS returns new data, call into the wind estimator to
    update itself.
    - Make sure wind estimator can be disabled at compile time via
    the USE_WIND_ESTIMATOR #ifdef
    - Disable OSD wind indicators when wind estimator support is not
    compiled in.
    - Don't check for both GPS and USE_WIND_ESTIMATOR in ifdefs, instead
    fail compilation with an error in USE_WIND_ESTIMATOR is defined
    without defining GPS.

commit b93ae78
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:23:58 2017 +0000

    Make wind estimator require GPS support

    It doesn't depend on NAV anymore, just GPS

commit ad6bccb
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:22:57 2017 +0000

    When wind estimation isn't valid, show indicators as '---'

    Allows users to tell apart unknown wind from wind detected as
    zero.

commit 6437432
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:57:57 2017 +0000

    Change wind velocity presentation to the user in OSD

    Don't change speed in Z axis, always show vertical wind speed in
    earth frame.
    For the XY plane, just calculate magnitude and angle relative to
    the aircraft in osd.c. This way we don't need to perform a full
    3D rotation.

    This lets use remove the getEstimatedWindVelocityBodyFrame()
    function.

commit 68f634e
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:26:30 2017 +0000

    Add comments explaning how the wind estimator works

commit a013861
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:59 2017 +0000

    Calculate wind speed in cm/s

    Due to incorrect scaling, it was calculated in m/s

commit 6f77d3c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:23 2017 +0000

    Remove unused include

commit 6ff6c22
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:22:55 2017 +0000

    Tweak the filtering for estimated wind speed a bit

    Remove conditional which allowed only negative or small positive
    changes to the estimated wind speed. Leave the current 0.95 and
    0.05 weights for past estimate/current estimate. Eventually we'll
    add a proper filter.

commit a416827
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:20:35 2017 +0000

    Check for valid GPS heading, not valid nav system heading

    We're using just information from the GPS, so having a valid heading
    due to the presence of a compass won't work. This also makes this
    code not depend on the NAV system anymore, so we'll move it
    somewhere else.

commit 78e62d3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:18:02 2017 +0000

    Move check for valid GPS heading to a function

    Allows calling it from both the IMU and the wind estimator

commit c52f687
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 10:38:36 2017 +0000

    Remove double ;

    Thanks to @giacomo892 for pointing it

commit 9719562
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:46:11 2017 +0000

    Check gpsSol flags for valid VelNE and VelD before using them

commit 03c06f9
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:43:27 2017 +0000

    Only estimate wind speed in fixed wing

commit 91c919f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:47:25 2017 +0000

    Respect OSD units when formatting wind speed

    Move formatting to a new osdFormatWindSpeedStr() function
    which is used for both wind speed indicators.

commit 13c3b6f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:04:51 2017 +0000

    Rename OSD field constants for wind indicators

    Cosmetic change

    OSD_HORIZONTAL_WIND -> OSD_WIND_SPEED_HORIZONTAL
    OSD_VERTICAL_WIND -> OSD_WIND_SPEED_VERTICAL

commit d9a6b4f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:02:53 2017 +0000

    Use dedicated symbols for OSD wind indicators

commit e3c5882
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 22:02:28 2017 +0000

    Initial, very basic implementation of OSD wind indicators

    An indicator shows the wind in the XY plane while another shows
    the Z axis.

commit 9a45a0c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 19:24:40 2017 +0000

    Move wind estimator to navigation

    - Move est_wind_airspeed to navigation_wind_estimator
    - Make a few stylistical changes in all the file to use
    INAV conventions and constants for better readability.
    - Add function for retrieving wind estimates in body frame.
    - Mark with missing stuff with TODO

commit 41013ad
Author: LinJieqiang <517503838@qq.com>
Date:   Sun Oct 8 10:10:52 2017 +0800

    Use GPS and DCM to estimate the airspeed for fixwing.

commit cde920e
Merge: 46f0ca8 69080ba
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Fri May 25 14:10:26 2018 +0200

    Merge pull request iNavFlight#3272 from iNavFlight/dzikuvx-docs-update

    Various docs updated and simplifications

commit 69080ba
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:53:18 2018 +0200

    various doc updates

commit 64bdaeb
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:16:21 2018 +0200

    We do not have it, so just drop it

commit 4623e36
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 22:33:23 2018 +0100

    Add entries for adjusting all OSD alarms

commit f2ffbe8
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 18 15:53:15 2018 +0100

    Reduce initial map scale, break early when we're too close to home

    Reduce minum map scale to 10m in SI/0.01mi in IMP. This way the radar
    can draw symbols even when the craft is very close to home.

    Also, when the craft is too close to the map center to be drawn,
    break out early to save some time.

shellixyz added a commit to shellixyz/inav that referenced this pull request May 29, 2018

Squashed commit of the following: giacomo892/nav_cruise_mode
commit 7215e2a
Merge: 5c76229 23fe9c8
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Tue May 29 15:54:37 2018 +0200

    Rebase On Development

commit 23fe9c8
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Tue May 29 10:50:12 2018 +0200

    ULTIMATE FIX

commit 5c76229
Merge: 6ccd0cc 8f6d7a0
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Mon May 28 22:14:36 2018 +0100

    Merge pull request iNavFlight#3289 from giacomo892/fix_fakegps

    Fix FAKE_GPS not providing good position/velocity data

commit 8f6d7a0
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 17:02:14 2018 +0200

    Fix for FAKE_GPS

commit a06ea84
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 16:42:28 2018 +0200

    added more debug

commit 299cdba
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 16:36:15 2018 +0200

    logic fixes

commit 1cc9d50
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 13:37:28 2018 +0200

    cleanup and logic improvements

commit 6ccd0cc
Merge: fe70d31 4f58602
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 22:32:45 2018 +0100

    Merge pull request iNavFlight#2450 from iNavFlight/agh_wind_estimation

    Implement wind estimation

commit 4f58602
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 27 21:10:37 2018 +0100

    Refactor calculation for horizontal wind speed to wind_estimator.c

    Add float getEstimatedHorizontalWindSpeed(uint16_t *angle)

commit fe70d31
Merge: 2c32ebb f2ffbe8
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:43 2018 +0100

    Merge pull request iNavFlight#3241 from iNavFlight/agh_map_radar_fixes

    Reduce initial map scale, break early when we're too close to home

commit 2c32ebb
Merge: cde920e 4623e36
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:24 2018 +0100

    Merge pull request iNavFlight#3264 from iNavFlight/agh_cms_osd_alarms

    Add entries for adjusting all OSD alarms in CMS

commit e0862c3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu May 24 10:32:42 2018 +0100

    Remove extra semicolon at end of line

commit 0b62513
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 21:57:08 2018 +0100

    Re-enable OSD wind speed indicators

commit 042a10d
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 21 10:50:33 2018 +0100

    Increase wind measurement timeout to 10s

commit 39d3076
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 20 12:08:13 2018 +0100

    Fix threshold for maximum estimated wind length increase

    - Threshold was in m/s, while the wind is calculated in cm/s.
    - Fix debug[] values, no need to *100 since wind is already cm/s.
    - Replace a runtime sqrtf() with a compile time sq().
    - Rename a few variables to snakeCase.

commit 04e5ced
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 14 22:25:28 2018 +0100

    Fix value of DEBUG_WIND_ESTIMATOR

    After latest rebase, it should be placed after DEBUG_STAGE2

commit eb0fd00
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 11 14:03:37 2018 +0100

    Add WIND_ESTIMATOR debug mode

    Uses debug[0-2] to log estimated wind in earth frame X, Y, Z.

commit c21718b
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Feb 14 17:23:26 2018 +0000

    Fix incorrect calculation for theta during wind estimation

    Kudos to @junwoo091400 and @alexbojko for spotting it

commit b535fec
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun Nov 5 18:31:54 2017 +0000

    Add back check for bounding wind updates

    Allow either updates which lower the total wind speed or increase
    it slightly. Arduplane uses a similar algorithm, so let's fly
    test this and see what happens.

commit 462e5e0
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:14:22 2017 +0000

    Add Wind Estimation paper by William Premerlani

    Used to implement the wind estimator

commit 24f1327
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:10:26 2017 +0000

    Move wind estimator to flight/, call it only on GPS updates

    - Move navigation_wind_estimator.{c,h} to flight/wind_estimator.{c,h}
    - Rename gpsThread() to gpsUpdate(), make it return a bool which is
    true iff new GPS data was received.
    - When the GPS returns new data, call into the wind estimator to
    update itself.
    - Make sure wind estimator can be disabled at compile time via
    the USE_WIND_ESTIMATOR #ifdef
    - Disable OSD wind indicators when wind estimator support is not
    compiled in.
    - Don't check for both GPS and USE_WIND_ESTIMATOR in ifdefs, instead
    fail compilation with an error in USE_WIND_ESTIMATOR is defined
    without defining GPS.

commit b93ae78
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:23:58 2017 +0000

    Make wind estimator require GPS support

    It doesn't depend on NAV anymore, just GPS

commit ad6bccb
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:22:57 2017 +0000

    When wind estimation isn't valid, show indicators as '---'

    Allows users to tell apart unknown wind from wind detected as
    zero.

commit 6437432
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:57:57 2017 +0000

    Change wind velocity presentation to the user in OSD

    Don't change speed in Z axis, always show vertical wind speed in
    earth frame.
    For the XY plane, just calculate magnitude and angle relative to
    the aircraft in osd.c. This way we don't need to perform a full
    3D rotation.

    This lets use remove the getEstimatedWindVelocityBodyFrame()
    function.

commit 68f634e
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:26:30 2017 +0000

    Add comments explaning how the wind estimator works

commit a013861
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:59 2017 +0000

    Calculate wind speed in cm/s

    Due to incorrect scaling, it was calculated in m/s

commit 6f77d3c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:23 2017 +0000

    Remove unused include

commit 6ff6c22
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:22:55 2017 +0000

    Tweak the filtering for estimated wind speed a bit

    Remove conditional which allowed only negative or small positive
    changes to the estimated wind speed. Leave the current 0.95 and
    0.05 weights for past estimate/current estimate. Eventually we'll
    add a proper filter.

commit a416827
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:20:35 2017 +0000

    Check for valid GPS heading, not valid nav system heading

    We're using just information from the GPS, so having a valid heading
    due to the presence of a compass won't work. This also makes this
    code not depend on the NAV system anymore, so we'll move it
    somewhere else.

commit 78e62d3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:18:02 2017 +0000

    Move check for valid GPS heading to a function

    Allows calling it from both the IMU and the wind estimator

commit c52f687
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 10:38:36 2017 +0000

    Remove double ;

    Thanks to @giacomo892 for pointing it

commit 9719562
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:46:11 2017 +0000

    Check gpsSol flags for valid VelNE and VelD before using them

commit 03c06f9
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:43:27 2017 +0000

    Only estimate wind speed in fixed wing

commit 91c919f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:47:25 2017 +0000

    Respect OSD units when formatting wind speed

    Move formatting to a new osdFormatWindSpeedStr() function
    which is used for both wind speed indicators.

commit 13c3b6f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:04:51 2017 +0000

    Rename OSD field constants for wind indicators

    Cosmetic change

    OSD_HORIZONTAL_WIND -> OSD_WIND_SPEED_HORIZONTAL
    OSD_VERTICAL_WIND -> OSD_WIND_SPEED_VERTICAL

commit d9a6b4f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:02:53 2017 +0000

    Use dedicated symbols for OSD wind indicators

commit e3c5882
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 22:02:28 2017 +0000

    Initial, very basic implementation of OSD wind indicators

    An indicator shows the wind in the XY plane while another shows
    the Z axis.

commit 9a45a0c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 19:24:40 2017 +0000

    Move wind estimator to navigation

    - Move est_wind_airspeed to navigation_wind_estimator
    - Make a few stylistical changes in all the file to use
    INAV conventions and constants for better readability.
    - Add function for retrieving wind estimates in body frame.
    - Mark with missing stuff with TODO

commit 41013ad
Author: LinJieqiang <517503838@qq.com>
Date:   Sun Oct 8 10:10:52 2017 +0800

    Use GPS and DCM to estimate the airspeed for fixwing.

commit 691a779
Author: giacomo892 <giacomo@MacBook-Pro-di-Giacomo.local>
Date:   Sun May 27 08:12:28 2018 +0200

    fixed typo

commit 4bea058
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Fri May 25 10:52:15 2018 +0200

    cleanup

commit cde920e
Merge: 46f0ca8 69080ba
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Fri May 25 14:10:26 2018 +0200

    Merge pull request iNavFlight#3272 from iNavFlight/dzikuvx-docs-update

    Various docs updated and simplifications

commit 6e5e559
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Thu May 24 12:02:33 2018 +0200

    fixed mode switching

commit 69080ba
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:53:18 2018 +0200

    various doc updates

commit 64bdaeb
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:16:21 2018 +0200

    We do not have it, so just drop it

commit cb70cb9
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Thu May 24 11:42:42 2018 +0200

    fixes

commit 3b7baaa
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Wed May 23 12:18:40 2018 +0200

    hacks to have control of roll and thr in CRUISE

commit 4623e36
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 22:33:23 2018 +0100

    Add entries for adjusting all OSD alarms

commit c632237
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Tue May 22 18:05:15 2018 +0200

    changed debug

commit 7928c11
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Tue May 22 17:24:44 2018 +0200

    extra fix for oscillations

commit 6bc2b5e
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Tue May 22 12:04:13 2018 +0200

    added settings

commit b2a26c0
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 21 16:21:29 2018 +0200

    nav cruise mode

commit f2ffbe8
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 18 15:53:15 2018 +0100

    Reduce initial map scale, break early when we're too close to home

    Reduce minum map scale to 10m in SI/0.01mi in IMP. This way the radar
    can draw symbols even when the craft is very close to home.

    Also, when the craft is too close to the map center to be drawn,
    break out early to save some time.

shellixyz added a commit to shellixyz/inav that referenced this pull request May 29, 2018

Squashed commit of the following: try_to_fix_applyFixedWingPitchRollT…
…hrottleController_mess

commit ffce1dd
Author: Michel Pastor <shellixyz@gmail.com>
Date:   Tue May 29 03:52:09 2018 +0200

    try_to_fix_applyFixedWingPitchRollThrottleController_mess cleaning

commit d9f5202
Author: Michel Pastor <shellixyz@gmail.com>
Date:   Tue May 29 03:50:33 2018 +0200

    try_to_fix_applyFixedWingPitchRollThrottleController_mess

commit 5c76229
Merge: 6ccd0cc 8f6d7a0
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Mon May 28 22:14:36 2018 +0100

    Merge pull request iNavFlight#3289 from giacomo892/fix_fakegps

    Fix FAKE_GPS not providing good position/velocity data

commit 8f6d7a0
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Mon May 28 17:02:14 2018 +0200

    Fix for FAKE_GPS

commit 6ccd0cc
Merge: fe70d31 4f58602
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 22:32:45 2018 +0100

    Merge pull request iNavFlight#2450 from iNavFlight/agh_wind_estimation

    Implement wind estimation

commit 4f58602
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 27 21:10:37 2018 +0100

    Refactor calculation for horizontal wind speed to wind_estimator.c

    Add float getEstimatedHorizontalWindSpeed(uint16_t *angle)

commit fe70d31
Merge: 2c32ebb f2ffbe8
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:43 2018 +0100

    Merge pull request iNavFlight#3241 from iNavFlight/agh_map_radar_fixes

    Reduce initial map scale, break early when we're too close to home

commit 2c32ebb
Merge: cde920e 4623e36
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Sun May 27 21:14:24 2018 +0100

    Merge pull request iNavFlight#3264 from iNavFlight/agh_cms_osd_alarms

    Add entries for adjusting all OSD alarms in CMS

commit e0862c3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu May 24 10:32:42 2018 +0100

    Remove extra semicolon at end of line

commit 0b62513
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 21:57:08 2018 +0100

    Re-enable OSD wind speed indicators

commit 042a10d
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 21 10:50:33 2018 +0100

    Increase wind measurement timeout to 10s

commit 39d3076
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 20 12:08:13 2018 +0100

    Fix threshold for maximum estimated wind length increase

    - Threshold was in m/s, while the wind is calculated in cm/s.
    - Fix debug[] values, no need to *100 since wind is already cm/s.
    - Replace a runtime sqrtf() with a compile time sq().
    - Rename a few variables to snakeCase.

commit 04e5ced
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon May 14 22:25:28 2018 +0100

    Fix value of DEBUG_WIND_ESTIMATOR

    After latest rebase, it should be placed after DEBUG_STAGE2

commit eb0fd00
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 11 14:03:37 2018 +0100

    Add WIND_ESTIMATOR debug mode

    Uses debug[0-2] to log estimated wind in earth frame X, Y, Z.

commit c21718b
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Feb 14 17:23:26 2018 +0000

    Fix incorrect calculation for theta during wind estimation

    Kudos to @junwoo091400 and @alexbojko for spotting it

commit b535fec
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun Nov 5 18:31:54 2017 +0000

    Add back check for bounding wind updates

    Allow either updates which lower the total wind speed or increase
    it slightly. Arduplane uses a similar algorithm, so let's fly
    test this and see what happens.

commit 462e5e0
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:14:22 2017 +0000

    Add Wind Estimation paper by William Premerlani

    Used to implement the wind estimator

commit 24f1327
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 18:10:26 2017 +0000

    Move wind estimator to flight/, call it only on GPS updates

    - Move navigation_wind_estimator.{c,h} to flight/wind_estimator.{c,h}
    - Rename gpsThread() to gpsUpdate(), make it return a bool which is
    true iff new GPS data was received.
    - When the GPS returns new data, call into the wind estimator to
    update itself.
    - Make sure wind estimator can be disabled at compile time via
    the USE_WIND_ESTIMATOR #ifdef
    - Disable OSD wind indicators when wind estimator support is not
    compiled in.
    - Don't check for both GPS and USE_WIND_ESTIMATOR in ifdefs, instead
    fail compilation with an error in USE_WIND_ESTIMATOR is defined
    without defining GPS.

commit b93ae78
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:23:58 2017 +0000

    Make wind estimator require GPS support

    It doesn't depend on NAV anymore, just GPS

commit ad6bccb
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 16:22:57 2017 +0000

    When wind estimation isn't valid, show indicators as '---'

    Allows users to tell apart unknown wind from wind detected as
    zero.

commit 6437432
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:57:57 2017 +0000

    Change wind velocity presentation to the user in OSD

    Don't change speed in Z axis, always show vertical wind speed in
    earth frame.
    For the XY plane, just calculate magnitude and angle relative to
    the aircraft in osd.c. This way we don't need to perform a full
    3D rotation.

    This lets use remove the getEstimatedWindVelocityBodyFrame()
    function.

commit 68f634e
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:26:30 2017 +0000

    Add comments explaning how the wind estimator works

commit a013861
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:59 2017 +0000

    Calculate wind speed in cm/s

    Due to incorrect scaling, it was calculated in m/s

commit 6f77d3c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:25:23 2017 +0000

    Remove unused include

commit 6ff6c22
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:22:55 2017 +0000

    Tweak the filtering for estimated wind speed a bit

    Remove conditional which allowed only negative or small positive
    changes to the estimated wind speed. Leave the current 0.95 and
    0.05 weights for past estimate/current estimate. Eventually we'll
    add a proper filter.

commit a416827
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:20:35 2017 +0000

    Check for valid GPS heading, not valid nav system heading

    We're using just information from the GPS, so having a valid heading
    due to the presence of a compass won't work. This also makes this
    code not depend on the NAV system anymore, so we'll move it
    somewhere else.

commit 78e62d3
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 15:18:02 2017 +0000

    Move check for valid GPS heading to a function

    Allows calling it from both the IMU and the wind estimator

commit c52f687
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri Nov 3 10:38:36 2017 +0000

    Remove double ;

    Thanks to @giacomo892 for pointing it

commit 9719562
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:46:11 2017 +0000

    Check gpsSol flags for valid VelNE and VelD before using them

commit 03c06f9
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 20:43:27 2017 +0000

    Only estimate wind speed in fixed wing

commit 91c919f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:47:25 2017 +0000

    Respect OSD units when formatting wind speed

    Move formatting to a new osdFormatWindSpeedStr() function
    which is used for both wind speed indicators.

commit 13c3b6f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:04:51 2017 +0000

    Rename OSD field constants for wind indicators

    Cosmetic change

    OSD_HORIZONTAL_WIND -> OSD_WIND_SPEED_HORIZONTAL
    OSD_VERTICAL_WIND -> OSD_WIND_SPEED_VERTICAL

commit d9a6b4f
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Nov 2 19:02:53 2017 +0000

    Use dedicated symbols for OSD wind indicators

commit e3c5882
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 22:02:28 2017 +0000

    Initial, very basic implementation of OSD wind indicators

    An indicator shows the wind in the XY plane while another shows
    the Z axis.

commit 9a45a0c
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Nov 1 19:24:40 2017 +0000

    Move wind estimator to navigation

    - Move est_wind_airspeed to navigation_wind_estimator
    - Make a few stylistical changes in all the file to use
    INAV conventions and constants for better readability.
    - Add function for retrieving wind estimates in body frame.
    - Mark with missing stuff with TODO

commit 41013ad
Author: LinJieqiang <517503838@qq.com>
Date:   Sun Oct 8 10:10:52 2017 +0800

    Use GPS and DCM to estimate the airspeed for fixwing.

commit cde920e
Merge: 46f0ca8 69080ba
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Fri May 25 14:10:26 2018 +0200

    Merge pull request iNavFlight#3272 from iNavFlight/dzikuvx-docs-update

    Various docs updated and simplifications

commit 69080ba
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:53:18 2018 +0200

    various doc updates

commit 64bdaeb
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Thu May 24 13:16:21 2018 +0200

    We do not have it, so just drop it

commit 4623e36
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 22:33:23 2018 +0100

    Add entries for adjusting all OSD alarms

commit f2ffbe8
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 18 15:53:15 2018 +0100

    Reduce initial map scale, break early when we're too close to home

    Reduce minum map scale to 10m in SI/0.01mi in IMP. This way the radar
    can draw symbols even when the craft is very close to home.

    Also, when the craft is too close to the map center to be drawn,
    break out early to save some time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.