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 );
The waypoint is a location north of Vancouver, BC. The lat and long is in decimal degrees. When this code executes nothing happens. 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? Seamus On Thu, 9 Oct 2003, Norman Vine wrote: > Seamus Thomas Carroll writes: > > > > To begin a prototyping I was thinking of copying the > > behaviour of autopilot when add to waypoint is called. I have traced the > > code to void AddWayPoint(puObject *cb) in auto_gui.cxx but that is when > > the code gets confusing because the old method of displaying a > > dialog box is used. Is anyone who understands this code willing to step > > me through the process of obtaining waypoints and > > using these waypoints to decide the heading of the plane and overriding > > other inputs while in autopilot? > > Just call > int NewWaypoint( string Tgt_Alt ); > > with an appropriate string > > or > > SGWayPoint wp( f.get_lon(), f.get_lat(), alt, > SGWayPoint::WGS84, TgtAptId ); > globals->get_route()->add_waypoint( wp ); > > 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
