|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
35 #define VN_DATA_START 10
36 #define VN_BUFFER_SIZE 512
37 #define GPS_SEC_IN_DAY 86400
83 unsigned short crc = 0;
84 for (i = 0; i < length; i++) {
85 crc = (
unsigned char)(
crc >> 8) | (
crc << 8);
87 crc ^= (
unsigned char)(
crc & 0xff) >> 4;
89 crc ^= (
crc & 0x00ff) << 5;
105 struct timeval curTime;
106 gettimeofday(&curTime, NULL);
107 int milli = curTime.tv_usec / 1000;
109 localtime_r(&curTime.tv_sec, &t_res);
110 struct tm *tt = &t_res;
128 memcpy(&fdm_data, fdm_ins,
sizeof(
struct NpsFdm));
172 vn_data.
PosU[0] = 2.5+(((float)rand())/RAND_MAX)*0.1;
173 vn_data.
PosU[1] = 2.5+(((float)rand())/RAND_MAX)*0.1;
174 vn_data.
PosU[2] = 2.5+(((float)rand())/RAND_MAX)*0.1;
187 vn_data.
YprU[0] = 2.5+(((
float)rand())/RAND_MAX)*0.1;
188 vn_data.
YprU[1] = 0.5+(((float)rand())/RAND_MAX)*0.1;
189 vn_data.
YprU[2] = 0.5+(((float)rand())/RAND_MAX)*0.1;
225 idx += 3 *
sizeof(float);
229 idx += 3 *
sizeof(float);
234 idx += 3 *
sizeof(double);
239 idx += 3 *
sizeof(float);
243 idx += 3 *
sizeof(float);
259 idx += 3 *
sizeof(float);
263 idx +=
sizeof(float);
267 idx += 3 *
sizeof(float);
271 idx += 3 *
sizeof(float);
280 idx += 3 *
sizeof(float);
struct DoubleVect3 body_ecef_accel
acceleration in body frame, wrt ECEF frame
static uint16_t VN_GROUP_FIELD_4
uint8_t vn_buffer[VN_BUFFER_SIZE]
static uint16_t VN_GROUP_FIELD_1
struct DoubleVect3 body_accel
acceleration in body frame as measured by an accelerometer (incl.
static uint16_t VN_GROUP_FIELD_3
static uint8_t VN_OUTPUT_GROUP
struct NedCoor_d ltp_ecef_vel
velocity in LTP frame, wrt ECEF frame
static uint16_t VN_GROUP_FIELD_2
struct DoubleRates body_ecef_rotvel
static uint64_t vn_get_time_of_week(void)
void ins_vectornav_event(void)
Event handling for Vectornav.
struct VectornavData vn_data
void ins_vectornav_init(void)
Initialize Vectornav struct.
struct DoubleEulers ltp_to_body_eulers
static short vn_calculate_crc(unsigned char data[], unsigned int length)
Calculates the 16-bit CRC for the given ASCII or binary message.
void nps_ins_fetch_data(struct NpsFdm *fdm_ins)
Fetch data from FDM and store them into vectornav packet NOTE: some noise is being added,...
uint16_t nps_ins_fill_buffer(void)
unsigned long long uint64_t