Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-11-01 Thread James Turner

On 1 Nov 2009, at 00:38, Sébastien MARQUE wrote:

 Turnpoint is managed using OBS mode, the route is still managed by  
 zkv500's Nasal, only obs mode is available 
 (seehttp://wiki.flightgear.org/index.php/GPS_internals 
 ). It should be leg mode but I can't get it to work as I expect to.

I'm busy this daytime, but have some time this evening or next week -  
please detail what you're seeing, and we can hopefully get leg mode  
(and everything else!) working as you need. I'd rather take some time  
to do things 'correctly', than have you waste time working around  
problems in my API.

Regards,
James


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-31 Thread Sébastien MARQUE
ok, it was to be sure you follow the movement ;) here are the patch for 
route management. sorry for the inconvenience, I've been a bit hurry to 
release the first patch.


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.


thanks in advance for commit the patch (made using fg-commit)

best regards
seb

Victhor Foster a écrit :
The turnpoint screen works again, but it won't start the selected  
waypoint, instead it uses the departure airport.


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!

http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

? zkv500.diff
Index: MainScreens.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Instruments-3d/zkv500/MainScreens.nas,v
retrieving revision 1.7
diff -u -p -r1.7 MainScreens.nas
--- MainScreens.nas	30 Oct 2009 18:39:12 -	1.7
+++ MainScreens.nas	1 Nov 2009 00:25:32 -
@@ -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
Index: TaskScreens.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Instruments-3d/zkv500/TaskScreens.nas,v
retrieving revision 1.3
diff -u -p -r1.3 TaskScreens.nas
--- TaskScreens.nas	14 Jul 2008 14:40:22 -	1.3
+++ TaskScreens.nas	1 Nov 2009 00:25:32 -
@@ -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 {
Index: TurnpointScreens.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Instruments-3d/zkv500/TurnpointScreens.nas,v
retrieving revision 1.5
diff -u -p -r1.5 TurnpointScreens.nas
--- TurnpointScreens.nas	30 Oct 2009 18:39:12 -	1.5
+++ TurnpointScreens.nas	1 Nov 2009 00:25:32 -
@@ -18,20 +18,21 @@ 

Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-30 Thread Sébastien MARQUE

Hi,

sorry for being absent these last days. the zkv500 is now repaired (see 
attached patch) at least for turnpoint mode. I'm quite sure there will 
have problem some problems with route management, I haven't tested yet, 
but I'll do this week-end.


I've also fixed the screen refresh frequency, which is now more regular.

if someone can commit this patch, I'll be thankfull.

best regards
seb
Index: Aircraft/Instruments-3d/zkv500/MainScreens.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Instruments-3d/zkv500/MainScreens.nas,v
retrieving revision 1.6
diff -r1.6 MainScreens.nas
220c220
 	crs_deviation = gps_wp.getNode(leg-course-deviation-deg).getValue();
---
 	crs_deviation = me.waypoint.getNode(course-deviation-deg).getValue();
239,240c239,240
 	gps_wp.getNode(leg-course-deviation-deg).getValue(), 
 	gps_wp.getNode(leg-course-error-nm).getValue() * dist_conv[0][dist_unit],
---
 	me.waypoint.getNode(course-deviation-deg).getValue(), 
 	me.waypoint.getNode(course-error-nm).getValue() * dist_conv[0][dist_unit],
Index: Aircraft/Instruments-3d/zkv500/TurnpointScreens.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Instruments-3d/zkv500/TurnpointScreens.nas,v
retrieving revision 1.4
diff -r1.4 TurnpointScreens.nas
32c32
 	gps_wp.getNode(wp[1]/name).setValue(bookmark.getNode(name).getValue());
---
 	gps_wp.getNode(wp[1]/name,1).setValue(bookmark.getNode(name).getValue());
34c34
 	gps_wp.getNode(wp[1]/waypoint-type).setValue(bookmark.getNode(waypoint-type).getValue());
---
 	gps_wp.getNode(wp[1]/waypoint-type,1).setValue(bookmark.getNode(waypoint-type).getValue());
Index: Aircraft/Instruments-3d/zkv500/ZKV500.nas
===
RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/Instruments-3d/zkv500/ZKV500.nas,v
retrieving revision 1.8
diff -r1.8 ZKV500.nas
5a6
 var refresh_timer = 0; #avoid multiple settimers
140c141,142
 var refresh_display = func() { #refresh displayed lines, settimer if necessary
---
 var refresh_display = func(forced = 1) { #refresh displayed lines, settimer if necessary
 if (!forced) refresh_timer -= 1;
142c144,147
 if (isOn and 0  displayed_screen  5 ) settimer(func { refresh_display(); }, freq, 1);
---
 if (isOn and 0  displayed_screen and displayed_screen  5 and !refresh_timer) {
 	refresh_timer += 1;
 	settimer(func { refresh_display(0); }, freq, 1);
 }
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-30 Thread Curtis Olson
Committed, thanks!

2009/10/30 Sébastien MARQUE

 Hi,

 sorry for being absent these last days. the zkv500 is now repaired (see
 attached patch) at least for turnpoint mode. I'm quite sure there will have
 problem some problems with route management, I haven't tested yet, but I'll
 do this week-end.

 I've also fixed the screen refresh frequency, which is now more regular.

 if someone can commit this patch, I'll be thankfull.

 best regards
 seb


 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel




-- 
Curtis Olson: http://baron.flightgear.org/~curt/
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-30 Thread Victhor Foster
The turnpoint screen works again, but it won't start the selected  
waypoint, instead it uses the departure airport.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-22 Thread Sébastien MARQUE
Hi,

Thank you for reporting, I haven't had a look into the zkv500 for a long 
time but I'm going to look what is going wrong, sorry for inconvenience.

best regards
seb

Victhor Foster a écrit :
 I'm pretty sure that this bug happened to me before. If the GPS is set  
 to OBS mode, changing the course as to make the CDI needle center  
 causes the autopilot to follow north, while leaving it at the default  
 setting (north) causes the AP to follow the correct course. Is it  
 supposed to happen? It works normally while on leg mode.
 BTW, what is DTO mode for? I see it on the GPS dialog, but I don't  
 know how that mode works.
 
 Also, I would like to tell the developer of the ZKV500 GPS instrument  
 (listed in the manual as Sébastien MARQUE) that it isn't working as  
 it should anymore. Perhaps it was the GPS code update, or the user :)  
 I have a few bookmarks on the turnpoint screen, but pressing the  
 start or the enter button does nothing.
 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel
 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-22 Thread James Turner

On 22 Oct 2009, at 02:05, Victhor Foster wrote:

 I'm pretty sure that this bug happened to me before. If the GPS is set
 to OBS mode, changing the course as to make the CDI needle center
 causes the autopilot to follow north, while leaving it at the default
 setting (north) causes the AP to follow the correct course. Is it
 supposed to happen? It works normally while on leg mode.

That sounds strange, and possibly aircraft-specific, or possibly my  
fault.

Can you provide some exact steps to reproduce this?

Eg
- select navaid 'foo' in the GPS
- enter OBS mode
- select OBS radial XXX
- ... and so on

The interaction between the GPS OBS radial and nav[0]/radials/selected- 
deg is probably the issue here, I am still ensuring thise code does  
the 'expected' thing in each case.

 BTW, what is DTO mode for? I see it on the GPS dialog, but I don't
 know how that mode works.

Direct-To. See the wiki page on the GPS for information:

http://wiki.flightgear.org/index.php/GPS

(and of course let me know if the docs aren't clear!)

Regards,
James


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-22 Thread James Turner

On 22 Oct 2009, at 07:57, Sébastien MARQUE wrote:


 Thank you for reporting, I haven't had a look into the zkv500 for a  
 long
 time but I'm going to look what is going wrong, sorry for  
 inconvenience.

It's quite likely this is my fault. Which aircraft feature the zkv500,  
so I can test things out myself, and check the code for any trouble- 
spots?

Regards,
James


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-22 Thread Sébastien MARQUE
Indeed, that is not your fault, I just have to follow your changes ;)

grep'ing in Aircraft gives me 3 aircraft with the zkv500 installed in: 
Grob-G115, DHC3 and Lionceau

the zkv500 looks at the property 
/instrumentation/gps/wp/leg-course-deviation-deg, which seems to not 
exist anymore. I'm reading doc to find the correct prop to handle.

quite off-topic: the zkv1000 will very appreciate your actual changes on 
gps system. it is a replica of garmin primus 1000 for general 
aviation). It was intented to be released some monthes ago, but 
obviously it is quite delayed for rewriting, maybe for Xmas ? :) I have 
first to ask permission to garmin to get the right to use and diffuse 
the instrument texture, which is currently shamelessly copied from 
pilot's manual...

some (old) screenshots of the beast:
http://seb.marque.free.fr/fichiers/flightgear/snapshots/2009-06-25_1630/

and from today (many many regressions from 2009-06 :/):
http://seb.marque.free.fr/fichiers/flightgear/snapshots/2009-10-22_1457/

best regards
seb

James Turner a écrit :
 On 22 Oct 2009, at 07:57, Sébastien MARQUE wrote:
 
 Thank you for reporting, I haven't had a look into the zkv500 for a  
 long
 time but I'm going to look what is going wrong, sorry for  
 inconvenience.
 
 It's quite likely this is my fault. Which aircraft feature the zkv500,  
 so I can test things out myself, and check the code for any trouble- 
 spots?
 
 Regards,
 James
 
 
 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel
 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-22 Thread James Turner

On 22 Oct 2009, at 14:40, Sébastien MARQUE wrote:

 the zkv500 looks at the property
 /instrumentation/gps/wp/leg-course-deviation-deg, which seems to not
 exist anymore. I'm reading doc to find the correct prop to handle.

Ah ok.

leg-course-deviation-deg is one of those strange properties that feels  
conceptually wrong to me, but it could easily be added back as a alias  
for gps/course-deviation-deg or gps/wp/wp[1]/course-deviation-deg;  
they all mean the same thing!

Also worth considering that many GPS devices would really use linear  
(nm) course deviation i.e crosstrack-error-nm, instead of angular  
deviation. This gives better performance with long legs, and also when  
close to a waypoint.

Regards,
James


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] ZKV500 GPS instrument; (New?) GPS code bug

2009-10-22 Thread James Turner

On 22 Oct 2009, at 14:40, Sébastien MARQUE wrote:

 quite off-topic: the zkv1000 will very appreciate your actual  
 changes on
 gps system. it is a replica of garmin primus 1000 for general
 aviation).

Okay - that's exactly the kind of device I hope the new code can  
support. I've read the G1000 pilot's manual, and I *think* that nearly  
all the functions can be provided by the current GPS code (and once I  
work on 2D graphics, hopefully the nav display too). It would be great  
if you can look over the current GPS features and indicate any pieces  
you think might be missing - additional commands, additional search  
features, extra data, or anything really.

(Airways, SIDs, STARs and approaches are being working on right now!)

James




--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel