ardupilot/libraries/SITL/SIM_VectorNav.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
C
Raw Permalink Normal View History

2020-12-29 06:30:07 -04:00
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
simulate serial VectorNav AHRS
Usage example:
SERIAL5_PROTOCOL = 36
AHRS_EKF_TYPE = 11
EAHRS_TYPE=1
sim_vehicle.py -D --console --map -A --serial5=sim:VectorNav
2020-12-29 06:30:07 -04:00
*/
#pragma once
#include "SIM_Aircraft.h"
#include <SITL/SITL.h>
#include "SIM_SerialDevice.h"
namespace SITL {
class VectorNav : public SerialDevice {
public:
VectorNav();
// update state
void update(void);
private:
uint32_t last_pkt1_us;
uint32_t last_pkt2_us;
uint32_t last_type_us;
2020-12-29 06:30:07 -04:00
void send_packet1();
void send_packet2();
void nmea_printf(const char *fmt, ...);
2020-12-29 06:30:07 -04:00
};
}