1 changed files with 48 additions and 48 deletions
@ -1,48 +1,48 @@ |
|||||||
|
|
||||||
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
|
||||||
#ifndef AP_GPS_IMU_h |
#ifndef AP_GPS_IMU_h |
||||||
#define AP_GPS_IMU_h |
#define AP_GPS_IMU_h |
||||||
|
|
||||||
#include "GPS.h" |
#include "GPS.h" |
||||||
#define MAXPAYLOAD 32 |
#define MAXPAYLOAD 32 |
||||||
|
|
||||||
class AP_GPS_IMU : public GPS { |
class AP_GPS_IMU : public GPS { |
||||||
public: |
public: |
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
AP_GPS_IMU(Stream *s); |
AP_GPS_IMU(Stream *s); |
||||||
virtual void init(enum GPS_Engine_Setting nav_setting); |
virtual void init(enum GPS_Engine_Setting nav_setting); |
||||||
virtual bool read(void); |
virtual bool read(void); |
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
int32_t roll_sensor; // how much we're turning in deg * 100
|
int32_t roll_sensor; // how much we're turning in deg * 100
|
||||||
int32_t pitch_sensor; // our angle of attack in deg * 100
|
int32_t pitch_sensor; // our angle of attack in deg * 100
|
||||||
int16_t airspeed; |
int16_t airspeed; |
||||||
float imu_health; |
float imu_health; |
||||||
uint8_t imu_ok; |
uint8_t imu_ok; |
||||||
|
|
||||||
// Unused
|
// Unused
|
||||||
virtual void setHIL(uint32_t time, float latitude, float longitude, float altitude, |
virtual void setHIL(uint32_t time, float latitude, float longitude, float altitude, |
||||||
float ground_speed, float ground_course, float speed_3d, uint8_t num_sats); |
float ground_speed, float ground_course, float speed_3d, uint8_t num_sats); |
||||||
|
|
||||||
private: |
private: |
||||||
// Packet checksums
|
// Packet checksums
|
||||||
uint8_t ck_a; |
uint8_t ck_a; |
||||||
uint8_t ck_b; |
uint8_t ck_b; |
||||||
uint8_t GPS_ck_a; |
uint8_t GPS_ck_a; |
||||||
uint8_t GPS_ck_b; |
uint8_t GPS_ck_b; |
||||||
|
|
||||||
uint8_t step; |
uint8_t step; |
||||||
uint8_t msg_class; |
uint8_t msg_class; |
||||||
uint8_t message_num; |
uint8_t message_num; |
||||||
uint8_t payload_length; |
uint8_t payload_length; |
||||||
uint8_t payload_counter; |
uint8_t payload_counter; |
||||||
uint8_t buffer[MAXPAYLOAD]; |
uint8_t buffer[MAXPAYLOAD]; |
||||||
|
|
||||||
void join_data(); |
void join_data(); |
||||||
void join_data_xplane(); |
void join_data_xplane(); |
||||||
void GPS_join_data(); |
void GPS_join_data(); |
||||||
void checksum(unsigned char data); |
void checksum(unsigned char data); |
||||||
}; |
}; |
||||||
|
|
||||||
#endif |
#endif |
||||||
|
Loading…
Reference in new issue