Struggling with Waypoint Navigation #1299
Closed
ChewJinCheng
started this conversation in
Support requests
Replies: 1 comment 1 reply
-
Can you post what you did to fix the issue? So that other JSBSim users in the future who do a search regarding JSBSim autopilot issues they're having might come across your post with your solution. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was following Section 5. Modeling a Waypoint Navigation System from https://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf.
My script runs safely without any runtime error but according to the logs, the plane is not moving towards the set waypoints after successful takeoff.
After adding debugging logs, I found that fcs/wp-distance was always 0 despite correct ap/wp long and lat values.
An example output:
Time Notify (Event 0) executed at time: 56.008109
Latitude (geod, rad): = 0.513943
Longitude (geod, rad): = -1.660959
Altitude (AGL, ft): = 805.744635
Heading (true, rad): = 6.172515
Calibrated Airspeed (kts): = 73.290845
X-Accel (forward, ft/s2): = 11.929118
Y-Accel (side_sway, ft/s2): = 0.237707
Z-Accel (vertical, ft/s2): = -29.933293
Active Waypoint #: = 2.000000
Target WP Latitude (rad): = 0.518238
Target WP Longitude (rad): = -1.664727
Distance to WP: = 0.000000
I am unable to figure out why.
These are my main changes:
ap/attitude_hold
ap/altitude_hold
ap/heading_hold
ap/yaw_damper
ap/active-waypoint
ap/altitude_setpoint
ap/heading_setpoint
ap/heading-setpoint-select
ap/aileron_cmd
ap/elevator_cmd
ap/rudder_cmd
ap/airspeed_setpoint
ap/airspeed_hold
ap/throttle-cmd-norm
=====================================================
Waypoint Navigation Functions
-->
This run is for testing the c310 waypoint navigation and cruise performance
Beta Was this translation helpful? Give feedback.
All reactions