- 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;
|
||||
next = gps_data.getNode("route/Waypoint[" ~ waypointindex ~ "]/",1);
|
||||
if (next != nil) {
|
||||
gps_wp.getNode("wp/longitude-deg",1).setValue(gps_wp.getNode("wp[1]/longitude-deg",1).getValue());
|
||||
gps_wp.getNode("wp/latitude-deg",1).setValue(gps_wp.getNode("wp[1]/latitude-deg",1).getValue());
|
||||
gps_wp.getNode("wp/altitude-ft",1).setValue(gps_wp.getNode("wp[1]/altitude-ft",1).getValue());
|
||||
gps_wp.getNode("wp/ID",1).setValue(gps_wp.getNode("wp[1]/ID",1).getValue());
|
||||
|
||||
gps_wp.getNode("wp[1]/longitude-deg",1).setValue(next.getNode("longitude-deg",1).getValue());
|
||||
gps_wp.getNode("wp[1]/latitude-deg",1).setValue(next.getNode("latitude-deg",1).getValue());
|
||||
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());
|
||||
|
||||
var scratch = gps_data.getNode("scratch");
|
||||
scratch.getNode("longitude-deg",1).setValue(next.getNode("longitude-deg",1).getValue());
|
||||
scratch.getNode("latitude-deg",1).setValue(next.getNode("latitude-deg",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());
|
||||
scratch.getNode("ident",1).setValue(next.getNode("ID",1).getValue());
|
||||
gps_data.getNode("command").setValue("obs");
|
||||
}
|
||||
else {
|
||||
page = 0; #screenTaskSelect
|
||||
|
|
|
@ -19,18 +19,8 @@ var screenTaskSelect = {
|
|||
}));
|
||||
foreach (var c; gps_data.getNode("route").getChildren("Waypoint"))
|
||||
screenWaypointsList.n += 1;
|
||||
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");
|
||||
|
||||
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;
|
||||
waypointindex = -1;
|
||||
screenNavigationMain.nextWaypoint();
|
||||
me.loaded = 1;
|
||||
},
|
||||
enter : func {
|
||||
|
|
|
@ -18,20 +18,21 @@ var screenTurnpointSelect = {
|
|||
},
|
||||
start : func {
|
||||
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~"]/");
|
||||
gps_wp.getNode("wp[1]/latitude-deg",1).setValue(bookmark.getNode("latitude-deg").getValue());
|
||||
gps_wp.getNode("wp[1]/longitude-deg",1).setValue(bookmark.getNode("longitude-deg").getValue());
|
||||
gps_wp.getNode("wp[1]/altitude-ft",1).setValue(bookmark.getNode("altitude-ft").getValue());
|
||||
gps_wp.getNode("wp[1]/ID").setValue(bookmark.getNode("ID").getValue());
|
||||
var scratch = gps_data.getNode("scratch");
|
||||
scratch.getNode("latitude-deg",1).setValue(bookmark.getNode("latitude-deg").getValue());
|
||||
scratch.getNode("longitude-deg",1).setValue(bookmark.getNode("longitude-deg").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)
|
||||
gps_wp.getNode("wp[1]/name",1).setValue(bookmark.getNode("name").getValue());
|
||||
if (bookmark.getNode("waypoint-type") != nil)
|
||||
gps_wp.getNode("wp[1]/waypoint-type",1).setValue(bookmark.getNode("waypoint-type").getValue());
|
||||
scratch.getNode("name",1).setValue(bookmark.getNode("name").getValue());
|
||||
else
|
||||
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;
|
||||
me.loaded = 1;
|
||||
page = 1;
|
||||
|
|
Loading…
Reference in a new issue