Thanks for the help.  The autopilot now works.  Two things to note is that 
i have the lat and lon backwards below when declaring SGWayPoint and after 
calling set_HeadingMode i needed to call 
globals->get_autopilot()->set_HeadingEnabled( true );

Hope this helps others,

Seamus

On Fri, 17 Oct 2003, Norman Vine wrote:

> Seamus Thomas Carroll writesL
> > 
> > Hi,
> > 
> > I am trying to add a waypoint using the following code:
> > SGWayPoint *wp = new SGWayPoint( 49.390545, -121.438942, 4000, SGWayPoint::WGS84, 
> > "HOPE" );
> > globals->get_route()->add_waypoint( *wp );
> 
> This looks OK.
>  
> > The waypoint is a location north of Vancouver, BC.  The lat and long is in 
> > decimal degrees.  When this code executes nothing happens.  
> 
> You probably didn't turn the AP on :-)  
> < see below >
> 
> > Is there a flag I need to set to get the autopilot to work?  I have traced 
> > through the code and have added cout statements and have observed that 
> > "void FGAutopilot::update (double dt)"  is being called.
> > 
> > Any suggestions?
> 
> There is a way to do this with the fgCommand Interface also but 
> the *raw* 'C' command is 
> 
> void FGAutopilot::set_HeadingMode( fgAutoHeadingMode mode ) {
> 
> You want to use FG_HEADING_WAYPOINT for 'mode'
> 
> HTH
> 
> Norman
> 
> 
> _______________________________________________
> 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

Reply via email to