mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 22:48:29 -04:00
50e024fe8f
This is required so common Log_Write_Camera can calculate relative and abs altitudes provided by either copter or plane pair programmed with Craig Elder
18 lines
572 B
Plaintext
18 lines
572 B
Plaintext
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
// read_inertia - read inertia in from accelerometers
|
|
static void read_inertia()
|
|
{
|
|
// inertial altitude estimates
|
|
inertial_nav.update(G_Dt);
|
|
}
|
|
|
|
// read_inertial_altitude - pull altitude and climb rate from inertial nav library
|
|
static void read_inertial_altitude()
|
|
{
|
|
// with inertial nav we can update the altitude and climb rate at 50hz
|
|
current_loc.alt = inertial_nav.get_altitude();
|
|
current_loc.flags.relative_alt = true;
|
|
climb_rate = inertial_nav.get_velocity_z();
|
|
}
|