mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 00:53:41 +08:00
parse get_settings and set trur IR sensor orientation for simulation with JSBSim
This commit is contained in:
@@ -62,6 +62,7 @@ void update_bat(double bat);
|
||||
void parse_dl_ping(char* argv[]);
|
||||
void parse_dl_acinfo(char* argv[]);
|
||||
void parse_dl_setting(char* argv[]);
|
||||
void parse_dl_get_setting(char* argv[]);
|
||||
void parse_dl_block(char* argv[]);
|
||||
void parse_dl_move_wp(char* argv[]);
|
||||
|
||||
|
||||
@@ -8,11 +8,18 @@
|
||||
#include "jsbsim_hw.h"
|
||||
#include <math.h>
|
||||
|
||||
#ifndef JSBSIM_IR_ROLL_NEUTRAL
|
||||
#define JSBSIM_IR_ROLL_NEUTRAL 0.
|
||||
#endif
|
||||
#ifndef JSBSIM_IR_PITCH_NEUTRAL
|
||||
#define JSBSIM_IR_PITCH_NEUTRAL 0.
|
||||
#endif
|
||||
|
||||
void set_ir(double roll, double pitch) {
|
||||
|
||||
double ir_contrast = 150; //FIXME
|
||||
double roll_sensor = roll + ir_roll_neutral;
|
||||
double pitch_sensor = pitch + ir_pitch_neutral;
|
||||
double roll_sensor = roll + JSBSIM_IR_ROLL_NEUTRAL; // ir_roll_neutral;
|
||||
double pitch_sensor = pitch + JSBSIM_IR_PITCH_NEUTRAL; // ir_pitch_neutral;
|
||||
#ifdef INFRARED
|
||||
ir_roll = sin(roll_sensor) * ir_contrast;
|
||||
ir_pitch = sin(pitch_sensor) * ir_contrast;
|
||||
|
||||
Reference in New Issue
Block a user