mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 15:20:35 +08:00
navigator: update mapprojection usage
This commit is contained in:
@@ -823,8 +823,8 @@ Navigator::task_main()
|
||||
_global_pos_valid = _vstatus.condition_global_position_valid;
|
||||
|
||||
/* set reference for map _projection if global pos is valid and home position is valid and we have not done so already */
|
||||
if (!map_projection_initialized() && _global_pos_valid && _home_pos.valid) {
|
||||
map_projection_init(_home_pos.lat, _home_pos.lon, _home_pos.timestamp);
|
||||
if (!map_projection_global_initialized() && _global_pos_valid && _home_pos.valid) {
|
||||
map_projection_global_init(_home_pos.lat, _home_pos.lon, _home_pos.timestamp);
|
||||
}
|
||||
|
||||
/* publish position setpoint triplet if updated */
|
||||
|
||||
Reference in New Issue
Block a user