Re: [Flightgear-devel] cesna autopilot seems messed up
On Thursday 06 May 2004 04:11, Seamus Thomas Carroll wrote: Are there plans to add a route manager to the KAP140? I guess that a reasonable setup for a light aircraft like the C172 would be to have a GPS as the route manager. Currently, the FlightGear GPS module only handles two waypoints to calclulate a leg between the two. You would have to manually change the waypoints, or maybe use a Nasal script to change them automatically. The KAP140 (and I guess most autopilots) have no notion of route or waypoint. It only tries to fly the aircraft based on turn rate, heading bug, course deviation indicator, static pressure (altitude), pressure change rate (vertical speed) and glideslope deviation indicator. Of course the deviations could come from the GPS module instead of from the nav radio module to get the aircraft to fly to the GPS waypoint(s). That would require a change in the autopilot config file to make the controllers get input from the GPS. If not what property do I change to use the generic autopilot? I have tried different changing values in different xml files but with no success. To change autopilot config file of any aircraft look in the *-set.xml file for the aircraft. The entry for the C172 is around line 40: systems autopilot pathAircraft/c172p/Systems/KAP140.xml/path /autopilot *** /systems I guess you have to restart FlightGear for the change to take effect. -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] cesna autopilot seems messed up
On Wednesday 05 May 2004 06:17, Seamus Thomas Carroll wrote: To test if a problem resides with the cesna autopilot i tested using Add Waypoint and instead of the autopilot guiding the plane to the waypoint it just flys in cirlces until it spirals into the ground. This autopilot with the cesna did work correctly that last time I tried it a couple of weeks ago. Has someone changed cesna autopilot config file to cause this incorrect behaviour? The default Cessna (--aircraft=c172-3d and c172-2dpanel) have changed autopilot from the generic to a KAP140 autopilot. A new instrument has been added to the cockpit and this should be visible below the ADF radio. The KAP140 does not have a route manager so consequently you can not define a route for it to fly. For instructions on how to operate the KAP140 you should download the Pilot Guide from the Bendix/King website. Is it a problem with the set up on my end? You can of course edit your *set.xml file to change the autopilot back to the generic. -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] cesna autopilot seems messed up
On Wednesday 05 May 2004 11:55, Roy Vegard Ovesen wrote: The default Cessna (--aircraft=c172-3d and c172-2dpanel) have changed autopilot from the generic to a KAP140 autopilot. I announced this change on this list http://baron.flightgear.org/pipermail/flightgear-devel/2004-April/027384.html -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] cesna autopilot seems messed up
Are there plans to add a route manager to the KAP140? If not what property do I change to use the generic autopilot? I have tried different changing values in different xml files but with no success. Seamus On Wed, 5 May 2004, Roy Vegard Ovesen wrote: On Wednesday 05 May 2004 06:17, Seamus Thomas Carroll wrote: To test if a problem resides with the cesna autopilot i tested using Add Waypoint and instead of the autopilot guiding the plane to the waypoint it just flys in cirlces until it spirals into the ground. This autopilot with the cesna did work correctly that last time I tried it a couple of weeks ago. Has someone changed cesna autopilot config file to cause this incorrect behaviour? The default Cessna (--aircraft=c172-3d and c172-2dpanel) have changed autopilot from the generic to a KAP140 autopilot. A new instrument has been added to the cockpit and this should be visible below the ADF radio. The KAP140 does not have a route manager so consequently you can not define a route for it to fly. For instructions on how to operate the KAP140 you should download the Pilot Guide from the Bendix/King website. Is it a problem with the set up on my end? You can of course edit your *set.xml file to change the autopilot back to the generic. -- Roy Vegard Ovesen ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
[Flightgear-devel] cesna autopilot seems messed up
To test if a problem resides with the cesna autopilot i tested using Add Waypoint and instead of the autopilot guiding the plane to the waypoint it just flys in cirlces until it spirals into the ground. This autopilot with the cesna did work correctly that last time I tried it a couple of weeks ago. Has someone changed cesna autopilot config file to cause this incorrect behaviour? Is it a problem with the set up on my end? I have tried the pa28-161 and the autopilot works correctly. Seamus On Tue, 4 May 2004, Seamus Thomas Carroll wrote: Hi, Last week (maybe two) i was able to create a path for the plane to fly using the following code: void AgentUAV::processWaypointsTable( string flightPathTable ) { double lon, lat; string query = select NumPoints(the_geom) from + flightPathTable + where id = 2;; cout query: query endl; PGresult *resultSet = dbInterface-dbQuery( query.c_str() ); int numPoints = atoi( PQgetvalue( resultSet, 0, 0 ) ); int alt = 2000; string id; cout numPoints: numPoints endl; FGRouteMgr *rm = (FGRouteMgr *)globals-get_subsystem(route-manager); SGWayPoint *wp = NULL; for( int point = 1; point = numPoints; point++ ) { char pointChar[256]; sprintf(pointChar, %d, point); string pointString(pointChar); query = select x(PointN(the_geom,+ pointString + )), y(PointN(the_geom,+ pointString + )) from +flightPathTable+;; cout query: query endl; resultSet = dbInterface-dbQuery( query.c_str() ); lon = atof( PQgetvalue( resultSet, 1, 0 ) ); lat = atof( PQgetvalue( resultSet, 1, 1 ) ); cout lon = lon , lat = lat endl; id = flightPathTable + _ + pointString; wp = new SGWayPoint( lon, lat, alt, SGWayPoint::WGS84, id ); rm-add_waypoint( *wp ); } fgSetString( /autopilot/locks/heading, true-heading-hold ); cout route size: rm-size() endl; } Lots of the code is not important to you. Essentially i pull the (lon, lat) points from the database and add them to the SGWayPoint. Upon running my code after a cvs update the planes no longer follow the path but instead fly in tight circles until the plane eventually crashes. I cant seem to find the change that has occured to cause this effect. Has there been any changes to the autopilot or the FGWaypoint that may have caused this problem? Any help is greatly appreciated, Seamus ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel