-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add remaining flight time and distance calculations and OSD items #2863
Add remaining flight time and distance calculations and OSD items #2863
Conversation
2037d60
to
a9d233f
Compare
This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help. |
Testing is in progress. It is working but I did some minor adjustments and need to test fly it one more time. |
@shellixyz Distance left in combination with distance from home could yield an automatic RTH feature. |
Yes it is planned :). It is already possible with this code. The distance to home is already taken into account and soon the wind estimation from #2450. |
@shellixyz I don't think even DJI uses wind estimation for the auto RTH feature. |
7624a4c
to
bf5d1b1
Compare
I've updated this PR. It has been tested and is ready for review/merge. |
@shellixyz Travis doesn't agree. |
bf5d1b1
to
6bf8d40
Compare
@teckel12 Now it does :) |
0be765c
to
471374a
Compare
471374a
to
b7056b5
Compare
b7056b5
to
83148a0
Compare
Answers #2804 and partially #2792. Also closes #3215.
Calculates the remaining available flight time and travel distance before needing to go straight to home based on GPS distance from home, remaining battery capacity, average power draw, altitude and direction change during RTH and wind estimation. The OSD items will blink when the timer reaches 0.
New settings:
osd_use_wind_compensation
: use wind estimation to compensate for time/distance calculation ON/OFFidle_power
: power drawn by the system when the motor(s) are stoppedcruise_power
: power drawn by the motor(s) at cruise throttle in cW (0.01W)nav_fw_cruise_speed
: speed at cruise throttle in cm/srth_energy_margin
: desired energy left after arriving to home (for landing) in % of usable battery capacityIt will only display the time if the following conditions are met:
cruise_power
andnav_fw_cruise_speed
settings have been set (>0)Obviously be careful with this:
nav_fw_cruise_speed
a bit lower than the real speed andcruise_power
10% higher than the power at cruise throttle to ensure variations in throttle during cruise won't draw more power than estimated.