Hi,
I found the gps unsuccessfully trying to find navlist stations by virtue
of calling findByIdent() with lon, lat parameters not in radians, which
is how that method implementation does want them.
diff -urNad src/Instrumentation/gps.cxx src/Instrumentation/gps.cxx
--- src/Instrumentation/gps.cxx 2007-12-21 14:06:22.000000000 +0100
+++ src/Instrumentation/gps.cxx 2007-12-21 14:09:24.912969347 +0100
@@ -338,8 +338,8 @@
else if (waypont_type == "nav") {
FGNavRecord *n
= globals->get_navlist()->findByIdent(wp0_ID.c_str(),
- longitude_deg,
- latitude_deg);
+
longitude_deg*SGD_DEGREES_TO_RADIANS,
+
latitude_deg*SGD_DEGREES_TO_RADIANS);
if ( n != NULL ) {
//cout << "Nav found" << endl;
wp0_longitude_deg = n->get_lon();
@@ -375,8 +375,8 @@
else if (waypont_type == "nav") {
FGNavRecord *n
= globals->get_navlist()->findByIdent(wp1_ID.c_str(),
- longitude_deg,
- latitude_deg);
+
longitude_deg*SGD_DEGREES_TO_RADIANS,
+
latitude_deg*SGD_DEGREES_TO_RADIANS);
if ( n != NULL ) {
//cout << "Nav found" << endl;
wp1_longitude_deg = n->get_lon();
On a side note, the gps dialog seems to only update its display, when
the underlying code finishes its search "fast" enough. Some playing with
nasal along the lines of the route-manager dialog doesn't work yet.
I somewhere read, that the "dialog-update" command would default to
update all options of a dialog. So basically I removed all the
dialog-update bindings from the gps dialog, and set listeners for the
"instrumentation/gps/wp/wp[0]/name" (and the [1] one) properties,
on the assumption those would change if (and after) any search was
successful.
The listeners function should then call something like
fgcommand("dialog-update");
While the listeners are triggered fine, the update often misses. I tried
all sorts of props.Node.new({"dialog-name": "gps"}) as a second argument
to the fgcommand to no avail. Any hints on that one?
Regards
K. Hoercher
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel