ardupilot/ArduCopter/inertia.pde

18 lines
591 B
Plaintext
Raw Normal View History

/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
2012-08-16 21:50:02 -03:00
// 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 = pv_alt_above_home(inertial_nav.get_altitude());
current_loc.flags.relative_alt = true;
climb_rate = inertial_nav.get_velocity_z();
}