![]() Printf("Input flaps: %f \n", auto_flaps) įloat auto_steer = filtered_servo_angle(input, 5) // SERVO6_FUNCTION (ch6) printf("Input ail: %f elv %f thr %f rud %f\n", aileron, elevator, throttle, rudder) įloat auto_flaps = filtered_servo_range(input, 4) // SERVO5_FUNCTION (ch5) I then added the following code to JSBSim::send_servos method: // NOTE channel mapping begins at 1įloat aileron = filtered_servo_angle(input, 0) // SERVO1_FUNCTION (ch1)įloat elevator = filtered_servo_angle(input, 1) // SERVO2_FUNCTION (ch2)įloat throttle = filtered_servo_range(input, 2) // SERVO3_FUNCTION (ch3)įloat rudder = filtered_servo_angle(input, 3) // SERVO4_FUNCTION (ch4) In the parameter file, I have mapped SERVO5_FUNCTION to the auto flaps function and SERVO6_FUNCTION to ground steering. I have created a tuned ArduPlane parameter file that successfully flies the full-size C172P in JSBSim in auto mission mode with a modified electric motor. However, I can’t seem to access other servo data outside of the first 5 channels. Update on this… after spending a good deal of time with the code, I understand the servo mapping now. Or… maybe this level of fidelity is not possible with JSBSim and FG? But I don’t understand how this works… or how to map it to set fcs functions… or even if this is the right place to do it.įrom what I understand, if in mavproxy I type rc 8 1900 I am guessing that this sets servo_8 to max PWM and this should eventually get sent to the send_servos method in the JSBSim interface files? Is this information then contained in the sitl_input struct? Or should I perhaps be using a relay rather than a servo?Īny help in posting me in the right direction would be most appreciated. I have spent a good deal of time looking at the SIM_JSBSim.cpp./.h files and I can see where the servo data is sent from ArduPlane to the JSBSim in void JSBSim::send_servos(const struct sitl_input &input). I would like to be able to use the servo-to-function mapping to tie a servo to the starter/ignition function as well as brakes release and possible flap control. The problem I have is that when the C172p model is setup, its engine is not started. ![]() I am working to get the C172p JSBSim model working in Auto Flight mode. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |