mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 13:23:33 +08:00
ekf2: get the rad to deg conversion right
This commit is contained in:
@@ -376,8 +376,8 @@ void Ekf2::task_main()
|
||||
lpos.xy_global =
|
||||
_ekf->position_is_valid();// true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
|
||||
lpos.z_global = true;// true if z is valid and has valid global reference (ref_alt)
|
||||
lpos.ref_lat = _ekf->_posRef.lat_rad * (double)180.0 * M_PI; // Reference point latitude in degrees
|
||||
lpos.ref_lon = _ekf->_posRef.lon_rad * (double)180.0 * M_PI; // Reference point longitude in degrees
|
||||
lpos.ref_lat = _ekf->_posRef.lat_rad * 180.0 / M_PI; // Reference point latitude in degrees
|
||||
lpos.ref_lon = _ekf->_posRef.lon_rad * 180.0 / M_PI; // Reference point longitude in degrees
|
||||
lpos.ref_alt =
|
||||
_ekf->_gps_alt_ref; // Reference altitude AMSL in meters, MUST be set to current (not at reference point!) ground level
|
||||
|
||||
|
||||
Reference in New Issue
Block a user