U Watch programming question..



#14

Hello all,

Wow, what a great gizmo. All assembled and functioning wonderfully.

Some questions on programming though:

I wrote a program for the watch; Great Circle Distance. The actual program works well but it loops back to the beginning and reruns continuously. The only way to stop it is to pull a battery out and the watch resets.

I cannot for the life of me (no instruction book although it is extremely intuitive) figure out how to stop the program. There is no R/S or RTN. Is there a master reset that does not involve pulling a battery out, i.e. a key press combination. Any ideas (yes I should know!)

Secondly the menu comes up with A-F keys. Are these labels or what exactly do they convey.

As a side note, how hard to put in a few conditionals for testing and an XEQ or GTO or GSB commands on the next software update?

Cheers, Geoff

PS i will be attending the next HPCC in London and will bring the watch to the meet, I would certainly like to have the GC program running with the stop function by then!

Edited: 6 June 2008, 1:52 p.m.


#15

hello,

how do you buy these watches? there is no PayPal button on the site yet that I could spot...

cyrille


#16

Cyrille,

please take a look at this thread:
uWatch kits - expression of interest

Hubert

Edited: 6 June 2008, 3:23 p.m.

#17

Quote:
hello,

how do you buy these watches? there is no PayPal button on the site yet that I could spot...

cyrille


The first batch of kits were pre-sold to people on this forum only, hence the PayPal page has not gone up on the public website, it's at a hidden web address available to those who expressed interest only.

The second batch of 25 watch PCBs are due back from the assemblers tomorrow. The public PayPal page will go up shortly after that and I'll be taking orders again.

Dave.

#18

Geoff,

There is a sort of XEQ available.
You can call a another stored keystroke sequence by using PLAY xx
(xx is a number between 00 and 59).

This way 'PLAY xx' is equivalent with 'XEQ xx'.

Conditional jumps are not available, also no GTO or RTN.

For the A to F labels I am also keen to learn more.

Have you initially cleared the EEPROM? This takes some time, but seems to be necessary to initiate the keystroke memory.

Second, have you terminated the key sequence recording at the end of your program by pressing the MODE key?

As the PLAY command is executed during key stroke recording, it may be that your device is cought in a endless recursive loop when your PLAY xx for testing was also recorded.

Hubert


Edited: 6 June 2008, 3:53 p.m.


#19

Many thanks Hubert,

I have erased the eeprom and will now attempt the programming again. I was sure I used the mode switch but will ensure I do today.

Let you know,

Geoff

#20

Quote:
Geoff,

There is a sort of XEQ available.
You can call a another stored keystroke sequence by using PLAY xx
(xx is a number between 00 and 59).

This way 'PLAY xx' is equivalent with 'XEQ xx'.

Conditional jumps are not available, also no GTO or RTN.

For the A to F labels I am also keen to learn more.

Have you initially cleared the EEPROM? This takes some time, but seems to be necessary to initiate the keystroke memory.

Second, have you terminated the key sequence recording at the end of your program by pressing the MODE key?


I really need to get a user manual for the watch up on the site, but I've been pretty busy lately. The "early adopters" have been running a bit blind, sorry about that!

You shouldn't need to erase the EEPROM first for the macro programming to work, but I'll check this out.

The A-F entry labels are for entering hex numbers for a potential up coming base-N conversion routine. So at the moment they allow you to enter HEX digits, but they do nothing.

Other stuff on the to-do list is details on making the programming cable, although it's pretty obvious from the schematic and the PICkit2 documentation.

The programming mode was never intended to be more than a simple macro key recording function, as I have no need for it personally. But that's not to stop someone coming up with their own firmware to allow this. It looks like it would be fairly messy to add conditional jumps and other programming features to the current macro recording functions, so I suspect it's "all or nothing" in this respect.
A serious programming machine also needs named programs and the ability to edit and upload/download programs.

Do people *really* need full programming capability in such a watch?

As mentioned before, I think hard coding your favourite programs into the uWatch source code is a better way to go. That's why the source code is open source and I've deliberately tried to keep it simple. And the programmer is only $35 too.

Dave.


#21

Personally I prefer to have the required functions available hardcoded, and listed in the uWatch menu. I am happy with the recording function as it is, for simplification of repetive calculations.
I can resist the temptation to use the small uWatch keybord as a entry system for software development ;-)

I got my PICkit 2 two days ago, now I am making up my mind about what development environment would suit me better. I prefer Linux, but Microchip does not support it. Currently I try to get piklab working with the Microchip Windows compiler (with help of Wine), but miss still the last mile. Some way I also have to link pk2cmd with piklab, as piklab does not support PICkit 2 firmware version 2 out of the box.

My dream device is something like a combination of HP01 time/date functions with HP42S calculator functions, without the programming features.

Hubert

#22

SUCCESS!!!!

I erased the eeprom last night and then carefully went through my keycodes, using enter where required and I now have a series of 4 programs:

Great Circle Distance (00)

NOTES:

Degrees are in decimal format:
N49.06 W123.24 in decimal format become N49.1 and W123.4
S37.56 E151.36 in decimal format become S37.9 and E151.6

South and East are input as negative numbers, hence on the watch using the above examples you would type:
49.1 enter
123.4 enter
-37.9 enter
-151.6 enter

Program use:

Enter the departure latitude in decimal degrees and enter,
Enter the departure longitude in decimal degrees and enter,
Enter the arrival latitude in decimal degrees and enter,
Enter the arrival longitude in decimal degrees

Play 00 (or whatever you assign to the program label). The output would be 6887.35204. Of course you can chuck out the decimal place response.

Great Circle Course Program (01)

Once the great circle distance program has run you then play the second program (here designated 01).

And your answer is 120.018335

Your not done yet as there are no conditionals on this computer so you then run a short program called 02 which gives the test for the sin(departure longitude – arrival longitude). If the sign is negative then the heading is 180 degrees opposite of the heading in the Great Circle Course Program. This can be determined in your head or by playing program 03. which then gives the answer 239.981649

Here are the listings

Listing for 00		listing for 01		listing for 02
STO 3 RCL 0 RCL 1
ROLL COS ENTER
STO 2 ENTER RCL 3
ROLL RCL 5 -
STO 1 SIN SIN
ROLL *
STO 0 STO 6
RCL 3 RCL 0 listing for 03
ENTER SIN 360
RCL 1 ENTER ENTER
- RCL 5 RCL 8
COS COS -
STO 4 *
RCL 0 STO 7
COS RCL 2
ENTER SIN
RCL4 ENTER
* RCL 7
STO 4 -
RCL 2 ENTER
COS RCL 6
ENTER /
RCL 4 ARC COS
* STO 8
STO 4
RCL 0
SIN
ENTER
RCL 2
SIN
*
ENTER
RCL 4
+
ARC COS
STO 5
60
*
What a hoot……….

Thanks David….

Edited: 6 June 2008, 9:12 p.m.


#23

Quote:
Play 00 (or whatever you assign to the program label). The output would be 6887.35204. Of course you can chuck out the decimal place response.

Actually, you shouldn't believe the ones column, and even the tens column may be off by +/- 1 or 2, both depending on your path length. You've assumed a spherical earth, which ain't quite right.

The earth is flattened, thanks to its rotation. The "diameter" from pole to pole is around 40 km less than the "diameter" in the plane of the equator.

If you really are concerned (i.e. at the meter level, say, for path lengths), you need to use a more complex figure for the earth than even a flattened spheroid.


#24

You are absolutely correct, I used the perfect sphere formulae. There are two independent sources for course/magnetic heading and distance in the aircraft that I work in;

1  the aircrafts systems composed of a mixture or separate IRS and GPS navigation computers.  Not to exclude the older VOR/TACAN systems.

2 the vendor supplied flight plan with way points (named or unnamed LAT and LON) with magnetic and true heading info.

Both these data sources are fix 0 displays. Who knows how they round or by what rules. In anycase the spherical formulae I used, especially on the shorter legs of 400nm or so is almost a perfect match to the distance track info the onboard systems provide and as such the watch is a perfect independent proof that the vendor info and the onboard computers do work. I do wish the watch had a FIX 0 or DSP 0 mode and that is why I made the comment that you can throw out the decimal values. By practice in the cockpit I have never seen a deviation on the short legs more then in the decimal place and never in the ones.

Back to the watch a list of desired extras would be:

CONDITIONALS
FIX 0
HMS/HR or FRC/INT

At least an FRC or INT so that I can create an HMS program. At this point to automate an equivalent HMS function in the watch you have to 'disassemble' the degrees into the degree/min/sec fractions and then treat each one individually creating the decimal /min/sec and adding them to the degree. The math can be done by subroutine as explained earlier but the input and disassembly are still manual.

ex:

49d18m56s becomes 49+(.18/.6)+(.56/.36) or 49+.3+.0156 = 49.3156

Cheers, Geoff

#25

Hi, Geoff --

I appreciate your valuable contributions to the Forum.

The HP-41 Navigation Pac has programs for distance and course, position, and course plotting, using Great Circle and Rhumb Line calculations. These were primarily intended for sailing. The results for your example of these two locations:

N 49o06'   W 123o24' 
S 37o56' E 151o36'

For a great circle:

Distance: 6888.74306 nautical miles

Initial heading: 239.95526 degrees

For a rhumb line (perfect sphere):

Distance: 6925.55733 nautical miles

Course: 221.06030 degrees

For a rhumb line (International Spheroid of eccentricity 0.08199188998):

Distance: 6941.85532 nautical miles

Course: 221.21448 degrees

-- KS


Edited: 7 June 2008, 3:00 p.m.


#26

Thanks for the comparison Karl, and the kind words.

My first programmable was the HP 25 but by the time I got through University I was using the HP 65, HP67, HP97 and finally the HP 41 series.

Wrote the programs for all without the use of the packs or modules. I now have Diegos' excellent clonix and have the Nav pack installed on it along with the CCD and PPC.

Just now introduced to the HP 71B and have restored both these to original conditions and am in the process of converting the programs to basic. I did an article on the Monroe programmable Scientist here and the program is similar to the watch, albeit in Algebraic mode.

Knowing the limitations of the program allows me to use it in the general comparative sense and it is accurate at the shorter leg length.

Now working on the altimeter correction program for altimeters and below zero Centigrade temperatures. It beats crosswords and sudoka !

Cheers, Geoff

Edited: 7 June 2008, 6:04 p.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Stupid idea of the day: 41-compatible watch bhtooefr 0 126 03-31-2013, 08:23 AM
Last Post: bhtooefr
  Simple? programming question [WP34S] Shawn Gibson 3 211 03-15-2013, 11:56 AM
Last Post: Didier Lachieze
  WP-34S Programming Question Matt Agajanian 2 163 08-04-2012, 02:04 PM
Last Post: Matt Agajanian
  HP-01 Watch John W Kercheval 6 318 05-09-2012, 07:06 AM
Last Post: Maximilian Hohmann
  WP 34S programming question Nigel J Dowrick 35 1,001 04-10-2012, 02:23 AM
Last Post: Walter B
  15C programming question Eric Zoob 7 228 03-28-2012, 03:14 PM
Last Post: C.Ret
  Digital watch wars Howard Owen 0 109 01-05-2012, 07:20 AM
Last Post: Howard Owen
  OT: Number Pad Watch Nerdier Than Calculator Watch? Egan Ford 8 348 12-20-2011, 04:27 PM
Last Post: megarat
  HP Caesium atomic watch BruceH 4 211 08-25-2011, 01:05 PM
Last Post: Ren
  HP-01 Calculator Watch Parts Info aj04062 1 128 04-28-2011, 02:33 AM
Last Post: geoff quickfall

Forum Jump: