On Monday 23 February 2004 00:56, Seamus Thomas Carroll wrote:
> I am trying to update my autopilot route code to reflect the latest
> changes.  I read a set of points from a table in a database.
> I used to use globals->get_route()->add_waypoint( *wp );
> to add the waypoints and then I would activate the autopilot by calling,
> globals->get_autopilot()->set_HeadingEnabled( true );
> globals->get_autopilot()->set_HeadingMode( FGAutopilot::FG_HEADING_WAYPOINT
> );
>
> I am now adding waypoints using:
> FGRouteMgr *rm = (FGRouteMgr *)globals->get_subsystem("route-manager");
> SGWayPoint *wp = new SGWayPoint( lon, lat, alt, SGWayPoint::WGS84, id );
> rm->add_waypoint( *wp );
>
> The question now is how to activate the autopilot.  I tried
> fgSetString( "/autopilot/locks/heading", "true-heading-hold" ); but this
> does not result in a change of the flight path.
>
> I am guessing that I am missing one line of code and any help would be
> greatly appreciated,
>
> Thankyou,
>
> Seamus

Does the a/c you're using for testing actually have an autopilot?  An AP now 
needs to be specifically added to the a/c 'set' file, under <systems>, like 
the electrical system.

LeeE


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to