mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Tracker: fix start lat, lon sanity check
This commit is contained in:
parent
ecda56006c
commit
52c7123a7d
@ -95,7 +95,7 @@ void Tracker::init_tracker()
|
|||||||
// use given start positions - useful for indoor testing, and
|
// use given start positions - useful for indoor testing, and
|
||||||
// while waiting for GPS lock
|
// while waiting for GPS lock
|
||||||
// sanity check location
|
// sanity check location
|
||||||
if (fabsf(current_loc.lat) <= 90.0f && fabsf(current_loc.lng) <= 180.0f) {
|
if (fabsf(g.start_latitude) <= 90.0f && fabsf(g.start_longitude) <= 180.0f) {
|
||||||
current_loc.lat = g.start_latitude * 1.0e7f;
|
current_loc.lat = g.start_latitude * 1.0e7f;
|
||||||
current_loc.lng = g.start_longitude * 1.0e7f;
|
current_loc.lng = g.start_longitude * 1.0e7f;
|
||||||
gcs_send_text_P(SEVERITY_MEDIUM, PSTR("ignoring invalid START_LATITUDE or START_LONGITUDE parameter"));
|
gcs_send_text_P(SEVERITY_MEDIUM, PSTR("ignoring invalid START_LATITUDE or START_LONGITUDE parameter"));
|
||||||
|
Loading…
Reference in New Issue
Block a user