|
|
|
@ -594,6 +594,13 @@ void AP_Logger::Write_CameraInfo(enum LogMessages msg, const Location ¤t_l
@@ -594,6 +594,13 @@ void AP_Logger::Write_CameraInfo(enum LogMessages msg, const Location ¤t_l
|
|
|
|
|
|
|
|
|
|
void AP_Logger::Write_Underwater_Sonar(const Location ¤t_loc) |
|
|
|
|
{ |
|
|
|
|
int32_t altitude_gps; |
|
|
|
|
const AP_GPS &gps = AP::gps(); |
|
|
|
|
if (gps.status() >= AP_GPS::GPS_OK_FIX_3D) { |
|
|
|
|
altitude_gps = gps.location().alt; |
|
|
|
|
} else { |
|
|
|
|
altitude_gps = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const Underwater_Sonar sonar = AP::underwater_sonar(); |
|
|
|
|
struct log_Underwater_Sonar pkt{ |
|
|
|
@ -601,7 +608,7 @@ void AP_Logger::Write_Underwater_Sonar(const Location ¤t_loc)
@@ -601,7 +608,7 @@ void AP_Logger::Write_Underwater_Sonar(const Location ¤t_loc)
|
|
|
|
|
time_us : AP_HAL::micros64(), |
|
|
|
|
latitude : current_loc.lat, |
|
|
|
|
longitude : current_loc.lng, |
|
|
|
|
altitude : current_loc.alt, |
|
|
|
|
altitude : altitude_gps, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
for (uint8_t i = 0; i < 8; i++) { |
|
|
|
|