- Sebastien Marque: Turnpoint is managed using "OBS mode", the route is still managed by zkv500's Nasal, only "obs" mode is available (see http://wiki.flightgear.org/index.php/GPS_internals). It should be "leg mode" but I can't get it to work as I expect to.
This commit is contained in:
parent
e8e1db4f0b
commit
d04b398e9b
3 changed files with 22 additions and 35 deletions
|
@ -182,17 +182,13 @@ var screenNavigationMain = {
|
||||||
waypointindex += 1;
|
waypointindex += 1;
|
||||||
next = gps_data.getNode("route/Waypoint[" ~ waypointindex ~ "]/",1);
|
next = gps_data.getNode("route/Waypoint[" ~ waypointindex ~ "]/",1);
|
||||||
if (next != nil) {
|
if (next != nil) {
|
||||||
gps_wp.getNode("wp/longitude-deg",1).setValue(gps_wp.getNode("wp[1]/longitude-deg",1).getValue());
|
var scratch = gps_data.getNode("scratch");
|
||||||
gps_wp.getNode("wp/latitude-deg",1).setValue(gps_wp.getNode("wp[1]/latitude-deg",1).getValue());
|
scratch.getNode("longitude-deg",1).setValue(next.getNode("longitude-deg",1).getValue());
|
||||||
gps_wp.getNode("wp/altitude-ft",1).setValue(gps_wp.getNode("wp[1]/altitude-ft",1).getValue());
|
scratch.getNode("latitude-deg",1).setValue(next.getNode("latitude-deg",1).getValue());
|
||||||
gps_wp.getNode("wp/ID",1).setValue(gps_wp.getNode("wp[1]/ID",1).getValue());
|
scratch.getNode("altitude-ft",1).setValue(next.getNode("altitude-ft",1).getValue());
|
||||||
|
scratch.getNode("type",1).setValue(next.getNode("waypoint-type",1).getValue());
|
||||||
gps_wp.getNode("wp[1]/longitude-deg",1).setValue(next.getNode("longitude-deg",1).getValue());
|
scratch.getNode("ident",1).setValue(next.getNode("ID",1).getValue());
|
||||||
gps_wp.getNode("wp[1]/latitude-deg",1).setValue(next.getNode("latitude-deg",1).getValue());
|
gps_data.getNode("command").setValue("obs");
|
||||||
gps_wp.getNode("wp[1]/altitude-ft",1).setValue(next.getNode("altitude-ft",1).getValue());
|
|
||||||
gps_wp.getNode("wp[1]/waypoint-type",1).setValue(next.getNode("waypoint-type",1).getValue());
|
|
||||||
gps_wp.getNode("wp[1]/ID",1).setValue(next.getNode("ID",1).getValue());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
page = 0; #screenTaskSelect
|
page = 0; #screenTaskSelect
|
||||||
|
|
|
@ -19,18 +19,8 @@ var screenTaskSelect = {
|
||||||
}));
|
}));
|
||||||
foreach (var c; gps_data.getNode("route").getChildren("Waypoint"))
|
foreach (var c; gps_data.getNode("route").getChildren("Waypoint"))
|
||||||
screenWaypointsList.n += 1;
|
screenWaypointsList.n += 1;
|
||||||
gps_wp.getNode("wp/latitude-deg",1).setValue(gps_data.getNode("indicated-latitude-deg",1).getValue());
|
waypointindex = -1;
|
||||||
gps_wp.getNode("wp/longitude-deg",1).setValue(gps_data.getNode("indicated-longitude-deg",1).getValue());
|
screenNavigationMain.nextWaypoint();
|
||||||
gps_wp.getNode("wp/altitude-ft",1).setValue(gps_data.getNode("indicated-altitude-ft",1).getValue());
|
|
||||||
gps_wp.getNode("wp/ID").setValue("startpos");
|
|
||||||
|
|
||||||
gps_wp.getNode("wp[1]/latitude-deg",1).setValue(gps_data.getNode("route/Waypoint/latitude-deg",1).getValue());
|
|
||||||
gps_wp.getNode("wp[1]/longitude-deg",1).setValue(gps_data.getNode("route/Waypoint/longitude-deg",1).getValue());
|
|
||||||
gps_wp.getNode("wp[1]/altitude-ft",1).setValue(gps_data.getNode("route/Waypoint/altitude-ft",1).getValue());
|
|
||||||
gps_wp.getNode("wp[1]/waypoint-type",1).setValue(gps_data.getNode("route/Waypoint/waypoint-type",1).getValue());
|
|
||||||
gps_wp.getNode("wp[1]/ID",1).setValue(gps_data.getNode("route/Waypoint/ID",1).getValue());
|
|
||||||
|
|
||||||
waypointindex = 0;
|
|
||||||
me.loaded = 1;
|
me.loaded = 1;
|
||||||
},
|
},
|
||||||
enter : func {
|
enter : func {
|
||||||
|
|
|
@ -18,20 +18,21 @@ var screenTurnpointSelect = {
|
||||||
},
|
},
|
||||||
start : func {
|
start : func {
|
||||||
me.n > 0 or return;
|
me.n > 0 or return;
|
||||||
gps_wp.getNode("wp/latitude-deg",1).setValue(gps_data.getNode("indicated-latitude-deg",1).getValue());
|
|
||||||
gps_wp.getNode("wp/longitude-deg",1).setValue(gps_data.getNode("indicated-longitude-deg",1).getValue());
|
|
||||||
gps_wp.getNode("wp/altitude-ft",1).setValue(gps_data.getNode("indicated-altitude-ft",1).getValue());
|
|
||||||
gps_wp.getNode("wp/ID").setValue("startpos");
|
|
||||||
|
|
||||||
var bookmark = gps_data.getNode("bookmarks/bookmark["~me.selected~"]/");
|
var bookmark = gps_data.getNode("bookmarks/bookmark["~me.selected~"]/");
|
||||||
gps_wp.getNode("wp[1]/latitude-deg",1).setValue(bookmark.getNode("latitude-deg").getValue());
|
var scratch = gps_data.getNode("scratch");
|
||||||
gps_wp.getNode("wp[1]/longitude-deg",1).setValue(bookmark.getNode("longitude-deg").getValue());
|
scratch.getNode("latitude-deg",1).setValue(bookmark.getNode("latitude-deg").getValue());
|
||||||
gps_wp.getNode("wp[1]/altitude-ft",1).setValue(bookmark.getNode("altitude-ft").getValue());
|
scratch.getNode("longitude-deg",1).setValue(bookmark.getNode("longitude-deg").getValue());
|
||||||
gps_wp.getNode("wp[1]/ID").setValue(bookmark.getNode("ID").getValue());
|
scratch.getNode("altitude-ft",1).setValue(bookmark.getNode("altitude-ft").getValue());
|
||||||
|
scratch.getNode("ident").setValue(bookmark.getNode("ID").getValue());
|
||||||
if (bookmark.getNode("name") != nil)
|
if (bookmark.getNode("name") != nil)
|
||||||
gps_wp.getNode("wp[1]/name",1).setValue(bookmark.getNode("name").getValue());
|
scratch.getNode("name",1).setValue(bookmark.getNode("name").getValue());
|
||||||
if (bookmark.getNode("waypoint-type") != nil)
|
else
|
||||||
gps_wp.getNode("wp[1]/waypoint-type",1).setValue(bookmark.getNode("waypoint-type").getValue());
|
scratch.getNode("name",1).setValue("");
|
||||||
|
if (bookmark.getNode("type") != nil)
|
||||||
|
scratch.getNode("type",1).setValue(bookmark.getNode("waypoint-type").getValue());
|
||||||
|
else
|
||||||
|
scratch.getNode("type",1).setValue("");
|
||||||
|
gps_data.getNode("command").setValue("obs");
|
||||||
blocked = 0;
|
blocked = 0;
|
||||||
me.loaded = 1;
|
me.loaded = 1;
|
||||||
page = 1;
|
page = 1;
|
||||||
|
|
Loading…
Reference in a new issue