![]() |
Forum Index : Microcontroller and PC projects : Updated Boat Computer
![]() ![]() |
|||||
Author | Message | ||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 949 |
Hi Paul, are looking for this version? 2016-05-10_061615_Boat_Computer_BASIC_Program.zip Frank |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Did you do the mods to the getX() and getY() functions that I described a few posts above. Jim VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
Thanks Frank Jim, No I didn't change that, I got a bit lost with davematt and Peter's code I wasn't sure they were referring to Geoff's code. Why did the original code work, I didn't think Geoff changed anything besides the number of POI's and a little hiccup with the font. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Paul, I made the following changes to the V2 version of the Boat Computer program: I think these changes will fix the issues you are having. Jim VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
OK Jim I will do the mods. to the code. I am still a bit lost as to why the original code worked and why Geoff did not pick up the problem when he tested the code. But all is well I will see how it goes. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Ah, I can see what went wrong. My fault entirely. In V2 of the Boat Computer I wanted to improve the look of the pointer so I stole some code from a digital/analogue clock project that will appear in the June issue of Silicon Chip. This code assumed that the pointer's position was given in minutes (ie, 60 in a circle) not degrees (ie, 360). Brilliant job Jim in spotting that. Thanks. I will post V3 containing your fix ASAP. I did some testing but obviously not enough to expose this problem. This just goes to show that ANY change to a program has a good chance of introducing a bug. For example, with MMBasic the bugs are nearly always related to new features and rarely the long standing code. There is an old joke that goes something like this... Manager to programmer: "What are you doing?" Programmer: "I'm bugging" Manager: "What do you mean?" Programmer: "Well, tomorrow I will be debugging this program so today I must be bugging it" Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
OK, I have posted an updated version of the Boat Computer (ver 3) which contains the fixes discovered by Jim. You can download the files from: http://geoffg.net/BoatComputer2.html#Downloads and eventually they will also be available on the Silicon Chip website. If you have modified Ver 2 according to Jim's changes you can continue to use it but it would be worthwhile to also change the following lines: x1 = GetX(ldeg - 15, 4)
y1 = GetY(ldeg - 15, 4) x2 = GetX(ldeg + 15, 4) y2 = GetY(ldeg + 15, 4) to x1 = GetX(ldeg - 90, 4)
y1 = GetY(ldeg - 90, 4) x2 = GetX(ldeg + 90, 4) y2 = GetY(ldeg + 90, 4) as that helps create a nicer looking pointer. Ver 3 contains this change also. Geoff Geoff Graham - http://geoffg.net |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
Thanks For that Geoff and Jim Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
Took the Boat Computer out for a shakedown cruise (fishing trip) today. I had only entered four marks but it performed extremely well. The owner of the boat preferred it to his $800 unit although his is also a depth sounder. We navigated to the marks using the Boat Computer, then positioned the boat using the depth sounder. He preferred it due to ease of use and the easy to read screen. We also caught some fish. Thanks Geoff it works extremely well. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Excellent news. Thanks Paul, good to know that it is performing well in the real world. Geoff Graham - http://geoffg.net |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
Something I failed to mention is that the set button won't work for POI 4 and 5, 10 and 11 and other POIs in the same position on the screen. I am using a 2.8" screen and am thinking it maybe a fault with the screen. Paul. Edit... Another problem TassyJim wrote I am going on a road trip to a spot some 300Km away so I thought I would try the Boat Computer to navigate. I entered 3 POIs, I checked one on Google Earth and it is 275KM but the Boat Computer shows it as over 3000Km and the same error for the other two. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
No damn it, it is another bug. The two top SET buttons do not work. I will look into it now and get back to you. EDIT: OK, found the bug. Below is V4 which fixes it, I will also update my website. 2016-05-14_000731_BoatComputerV4.zip Geoff Geoff Graham - http://geoffg.net |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
If it is not a secret fishing spot, can you give me the co-ordinates of the POI's and your 'current' position? Jim VK7JH MMedit |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Paul, I set the demo location to Balgal Beach and the first POI (Harbour) to Cairns Airport. The mite gave a distance of 238km and my map gives 246km Some of the difference is due to my inaccurate clicking on the maps and some due to the formula used in the boat computer. The only way I can see to get the big distances you observed is if you have North instead of South etc. Geoff, Boat computer V3 seems to be happy with V5.2beta firmware. - Still don't have a GPS connected. Jim VK7JH MMedit |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1993 |
@ TassyJim I am at Balgal Beach and my POIs were in the Cairns area I entered the coordinates and I have rechecked they are correct. I am leaving in the morning so won't be able to recheck until next week. You are in Tassie so can you enter coordinated for say Melbourne and see what the result is. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |