mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[fix] utm coord was not initialized in landing module for FW (#3445)
Doxygen / build (push) Has been cancelled
Doxygen / build (push) Has been cancelled
Also - kill throttle after landing - add module takoff/land to demo mission flight plan
This commit is contained in:
committed by
GitHub
parent
33ebce980a
commit
6f7342fdd8
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
|
||||
|
||||
<flight_plan alt="260" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="1500" name="Basic" security_height="25" qfu="180">
|
||||
<flight_plan alt="260" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="1500" name="Basic" security_height="25" qfu="0">
|
||||
<header/>
|
||||
<waypoints>
|
||||
<waypoint name="HOME" x="0" y="0"/>
|
||||
@@ -12,6 +12,7 @@
|
||||
</waypoints>
|
||||
<modules>
|
||||
<module name="mission" type="fw"/>
|
||||
<module name="nav" type="takeoff_and_landing"/>
|
||||
</modules>
|
||||
<exceptions/>
|
||||
<blocks>
|
||||
|
||||
@@ -316,6 +316,7 @@ static bool nav_land_run(void)
|
||||
break;
|
||||
case NAV_LANDING_DONE:
|
||||
default:
|
||||
NavKillThrottle();
|
||||
landing.status = NAV_LANDING_INIT;
|
||||
return false;
|
||||
}
|
||||
@@ -346,7 +347,7 @@ bool nav_land_at_loc(float td_alt, float lat, float lon, float dir, float dist,
|
||||
landing.td_id = 0;
|
||||
landing.af_id = 0;
|
||||
struct LlaCoor_f lla = { RadOfDeg(lat), RadOfDeg(lon), GetAltRef() + td_alt };
|
||||
struct UtmCoor_f utm;
|
||||
struct UtmCoor_f utm = {0};
|
||||
utm_of_lla_f(&utm, &lla);
|
||||
ENU_OF_UTM_DIFF(landing.td_pos, utm, *stateGetUtmOrigin_f());
|
||||
landing.af_pos.x = landing.td_pos.x + dist * sinf(RadOfDeg(dir));
|
||||
|
||||
Reference in New Issue
Block a user