Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / One Wire Weather Station project (open source)

Author
Message
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 11:39
That is wonderful news, you are nearly there!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 11:45 Edited at: 4th Mar 2007 11:55
also add these line you want to turn into UDTs if they can,



give the max and min tempature and max min windspeed.
added just after function call wvain

edit

the set winddirection of 22.5 where are you thinking that is pointing on start.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 11:56 Edited at: 4th Mar 2007 12:19
That's cool. I was going to ask about that. You might as well just keep them in the here UDT as maxgust and maxtemp, or something like that.

I will add them to my code. I am running the anemometer at half the wind speed, because I was messing with the average fps. It should be 360.0 degrees, and not 180.0

Well, I have to get some sleep. Post up what you end up with after all of your tweaking, and whatnot.

Cheers, that is impressive work. You've made something out of nothing at all. I'll be back later today to check it out.

I suppose that I would begin by manually pointing the thing to north, and seeing what was returned as direction. In a perfect world, that would be direction 1. It probably isn't, however. After that, move it easterly somewhat, and see which direction the variable moves. Then, you offset the direction by the value of north, including the direction. The simplest method would be to place the proper values in the function, in the direction variable it returns. What you are doing allows more flexibility, however...so, keep on that path.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 12:00
Quote: "Cheers, that is impressive work. You've made something out of nothing at all. I'll be back later today to check it out."

of which none of it would have been possible without your time and knowledge of coding.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 13:52 Edited at: 4th Mar 2007 22:03
here my midday update hope the images up load ok.

so I know where I found the map and a link to them.

http://www.celestiamotherlode.net/catalog/earth.php

hope my asking is not getting to much here's one that would be nice to get going, at

http://www.metoffice.gov.uk/satpics/latest_IR.html

I can get infrared pictures from this site, would it be possible to load the image to a box and display it?

edit

some time I get a bit of over speed like 2000+ kph not work out how its does it yet.

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 22:19 Edited at: 4th Mar 2007 22:21
You mean like my local weather man does? Sure, why not? I mean, if you are going to go, go all in, that's what I say. Infrared satellite imagery...yes, let's do that. (There are lots of possibilities with both of those links.) As it turns out, I have done stereographic projection before. I used it (rather, I learned it) to make a planisphere using astronomical data from the US government. I do this type of data searching alot, and it is good to see what you have found. Also, I use GIS data (it is called DTED...digital terrain elevation data, and the advanced terrain eats the data like candy after you do the front-end part.) I intend to recreate the planishpere in DBPro...it needs some database functionality added, but...the calculations and display are trivial for DBPro. Plansiphere creation is an excellent tool for education, bit in math and astronomy. Using DBPro and a PC adds more to learn. It would make for an excellent tutorial in DBPro, as well. There is even some cutting with scissors!

Those are both great sites.

I appreciate the opportunity to be a part of your project. It has been almost 7 years since I've had such an opportunity, and it is always nice to work with someone on these things. There are a couple of other threads that I would like to work in, but I am not ready for that. DBPro has a very chameleon-like ability to be whatever you wish it to be...that is very powerful.

I was disappointed that I did not get something ready for the RedNose Day thing...I think it is a great idea, and I have some 2D Windows games that I might have polished up...Connect4, Breakout, MasterMind, Pong, and a couple of others that I did about 5 years ago for giggles. I think that DBPro has many educational possibilities that I would like to explore.

I have a few other things that I want to hook up to DBPro. I already told you about my BASICStamp, and I also have another microcontroller that I can use which has some digital I/O, and analog, too. I also have a 4-channel EEG to monitor my brain waves...very cool to play with! Then, I have a card that I made...ISA/8-bit/8-ch A/D. That was my first PC project. I used a $25 A/D from AnalogDevices and a handful of i/f parts...it was quite exciting, but...only for me, unfortunately. (Oh, and I also shorted CH1 out, so it is a 7 channel A/D...dang!)

Well, I must be droning on...Sam wants to play some Madden'05 on the PS/2...talk to you later.

About the speed, yes...I left it wrong. When it wraps around, you need to account for that. Otherwise, you will get your face ripped off by that mach 3 wind you have there...I thought the wind was bad in southern California!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 22:32
Thought you might like to try that, as for the other stuff you mention looks like fun if you can get to work them with DBPro, If it was possible to get Lee to make command set that would help to talk to items like that make for a lot more fun.

Ok catch you later.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 22:54
Lee has been kind enough to roll that into it already with the user plug-in....one of the most impressive things I have ever seen. (Next to the rock wool, and thermoses, that is...how do they know, anyway?)
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 5th Mar 2007 18:48
I started another object; its a globe. I rotate it every second. I want to finish defining its behavior, and then it will become self-contained, like the others. (All variables will be in the UDT PLANET, and there will be function calls to skin and rotate it.)

We can do the moon the same way. I am going to write some functions to calculate those parameters. This will give us sunrise/sunset and moonrise/moonset, and some other useful numbers.

I define floats as floats, so I don't need to use '#'. That is a shortcut for cases where you do not define it as a float to begin with.

The tmin/tmax check will work like this:


...drives me nuts, too. (Then, after I calm down...there it is.)
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 6th Mar 2007 05:41 Edited at: 6th Mar 2007 15:06
OK, if this let post it, here a very crude night day shading.

the above seem to be working not able to get the min tmin to set is self to above zero or to be the same a tempfloat, and boy is windy this morning 44+mph and raining.

It nearly broke the wind anemometer, nut came lose and it went on it travels back together now phew!.

hot hot my dinner of spaghetti and meatballs is a bit spicy quick were a drink,Ahhhhhhhhh! that better.

In the artist challenge is a night sky sphere don't know if you found that one.

Snap so have I, here my atemp,


the 990.75 is based on the real world size divided by 4.

await to see what you got.

ho! this bit will do the temperature max min and now gauge.
gauges


colors



last bit


there may have been more but I forgoten what I have done extra.

cheers

edit
temperature numbers

edit 2




edit 3
this get the mintemp doing as I want.


Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Mar 2007 14:31
Another update ,this time sorted out the compass directions.



Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Mar 2007 12:15
Hi jinzai hope your week been a good one, any chance when you have the time, you could give me a clue on what may need to be changed on the windspeed counter, notice that it seem to only do it when it reaches 34000+ then the speed calculation go a bit haywire, tried a few thing but none of them have the results I hoping for.

catch you soon cheers.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 11th Mar 2007 08:34
...sorry, the cable modem got soaked by the leaky tub upstairs...trying to get caught up. Wind speed issue would be best resolved by reducing the sample period a little. Probably, there is a better tradeoff between being able to detect very light winds, and being able to detect very gusty winds. Here is a picture of my globe. I repainted it from what I got at the Celestia Motherlode link you gave me. Those maps are great, and they wrap onto a sphere pretty well.


I will incorporate your changes into what I have, but it will probably take a couple of days. The infrared images will take some more time, I want to make a player for that purpose. That is how the local meteorologists do it here...they animate them over a period of time. I want to mimic that functionality in a GUI element.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th Mar 2007 11:45 Edited at: 11th Mar 2007 15:18
That solar system look fanatic, was your modem off at the time of its swimming lesson, if not ouch! bit more green stamps.

Have change the way the wind direction indicator works now, has 16 images that show the direction in green when pointing that way. (if would like them will find away to pack them up as I believe they take up a bit of space.)

OK, how did you do that, just notice the shine on the nearest planet, been trying to work out how to do that one.

Ho! have a look in there Artist challenge if I not said so above a few title banners in there, think it may need to be called Weather Station Extream (wanted ultimate but some big boys have that one).

When you were look for planets did you find any that could be used as star consolation, in a sky sphere?

will try lowering the sample rate on the wind speed, that should help, while I was at it the memory position 44 45 46 and 47 work in a wired way when 44 gets to I think 255, 45 then echos the 1 of the first and so on, thought I was going to be able to use that to take one away from the other, let you know if it works.

So take it easy this week and keep an eye out for them there gremlins.

cheers

edit.
found this site http://www.hobbyspace.com/Radio/WeatherSatStation/intro.html
may be of some use, but not looked at it fully yet, if it not just case of and aerial and go, then may not go down that path, but worth a look.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 11th Mar 2007 12:45 Edited at: 11th Mar 2007 13:08
No, the modem went all FUBAR. The bosslord's (yes, he's my boss and landlord....) girlfriend happened to have a modem in her garage, most lucky thing about her so far.

Well, I lost my post somehow. Made a zip file, and everything, too. Things just keep getting better all the time around here.

Okay, Mercury has no texture at all, its just red/brown light. Venus has a spherical texture mapping, and so do Mars and Jupiter. I did that in TextureMaker. (I'm trying to get my money's worth out of those other programs, too.) The Earth is from "Earth's 12 Months" from that website. After painting them, they were about 25% of their original size. I still need to flood some areas. Apparently, someone spilled some rum in the Caribbean, its still a mess in the South Pacific, and Ceylon has began to rise in the Indian Ocean. To make matters worse, someone stole my globe.

The neatest trick you can't even see. I have a ghosted atmosphere that I am playing with on the Earth. I want to start moving some clouds and get the jet stream working. Here is the code for the Earth only, and also here is a large zip file to download.



btw, as it turns out...I have worked with weather fascimile data before. There was a card long ago that could be fed the WEFAX signal from a ham radio, and produce faxes. There is a nice test pattern that is transmitted periodically to allow alignment. The satellite version should be easy enough, but getting the equipment would probably take some time. I worked on a large WEFAX machine as part of the bridge equipment. It was very wide, about 24 inches, and thermal. The paper came out very damp, and a little underdeveloped. It was good when you had it tweaked right, and the signal was good.

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th Mar 2007 13:19 Edited at: 11th Mar 2007 13:23
Well I have mange to put the compass images into one picture you will have to spilt them up again or tidy them and animate them, up to you.

will be giving the above a spin soon as it down loaded.
hey! every good, like it.

Do you have blueGui in your collection as was think of using that to open a window to set things up like calibrate the wind direction and other little items.

edit
change sample rate to 30 sec just made the wind speed faster on change in the count.

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th Mar 2007 15:06 Edited at: 11th Mar 2007 19:45
ok found this web site which has a program to show the night sky stars.
http://www-jcsu.jesus.cam.ac.uk/~dcf21/software.shtml

taken what was on the page and modified it to work with a sky sphere.(why its so dran hard to find this item.)

edit

http://solar.physics.montana.edu/tslater/real-time/

take a look

edit 2
added normal bump map to your globe ouch! looks wow!

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Mar 2007 06:25
one more bit of updating, this line puts the wind chill factor into the code.



this one will be given a pointer as well so now there are 4 trying to tell the min, max, now and wind chill of temperature.

Also found that I can take the memeroy fill -



to 46 and still have a reading. work my way up the numbers untill I find one that lets it work, all though I think you said you may be working on that bit when time allows.

cheers.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 16th Mar 2007 07:11
Yes, I am still working on this, believe it or not. My dallying in the other threads is results from that. I will have something tomorrow night, I think. Now, you've got me wanting to build a WEFAX machine! Thanks, mate....and thanks again.

Normal life is bizarre these days, but that is not unusual. Really sorry about some of the things I hear about on your side of the rock, but...we are amateur weathermen here, so I'll stick to 3D meteorology and simply say all the best to you; high pressure, light winds and mild temps to all my mates in the UK, and elsewhere!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Mar 2007 07:16 Edited at: 16th Mar 2007 07:17
At least it still cool here unlike Australia, they seem to be melting down there. just re did or is done the wind chill bit should be like this.



Quote: "you've got me wanting to build a WEFAX machine!"


what be one of those?

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 16th Mar 2007 07:46 Edited at: 16th Mar 2007 07:50
They receive all kinds of weather data transmitted by stations all over the world. They have that infrared data you want, for one thing. You can receive the data on shortwave, or satellite, but its a bit of a challenge. (Go figure.) I think I will use an Internet source for starters, but I want to be able to produce png files to use in texturing maps so that I can animate the data over time. I have been studying DBPro windows a great deal recently. They are not actual windows in the traditional sense because they are DX9 rendering surfaces masquerading as normal windows. (They are good, but their behavior is rigid; the fault of DX9, not DBPro.)

That wind chill is going in as we speak. Nice add, that. btw, the temp min/max thing...is a matter of initializing the variable, and the compare is a little different than what I showed you before. This works for any min/max, and they get reset periodically, too. (Once a day, usually.)



You initialize the tmin and tmax to outside the range in the opposite direction (e.g. tmin = 200 / tmax = -40). Its stupid, but it works and is as consistent as you are in resetting it.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Mar 2007 08:02
I been trying to get some senable figures for wind chill but no joy yet.

wctF=35.74+0.6215*t-35.75*V 10m 0.16 + 0.4275 * T * V 10m 0.16

wctC=13.13+0.62*T-13.95*V 10m 0.16 + 0.486 * T * V 10m 0.16

this what I have found but when I do the C version I get to high a figure 15.0C for 4.0c and no wind, should have equal the same ? yes. also said
Quote: "the windspeed used is that on face level, about 5 feet or 1.5m above ground. This speed can be obtained (at least approximately) by multiplying that of the 33 feet (=10m) high anemometer by 2/3."


catch you later the sun rising so its time for me to get some kip.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Mar 2007 18:46 Edited at: 17th Mar 2007 19:48
Found this scale by some guy called Beaufort



plus I've made one for Fujita



edit
have now made a force max slide bar. two bits required




Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 19th Mar 2007 11:44 Edited at: 19th Mar 2007 12:45
Been adding more to it hope you add this to yours, maybe change it to work with UDT`s you have.

shows the max, min, now and chill temperatures.



and one for wind speed



Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 20th Mar 2007 09:46
I like that, it is pretty consolidated. I have put the min/max/now type float variables in the STATION UDT already, so I will simply incorporate that into your function. Also, I am going to add the variables for humidity and also some others. Plus, I think I need to use something more appropriate for the lat/long. I put the strings in there so we could dummy up stations easily.

Things continue to be quite odd and exasperating here. The second flood did not come from the tub, but rather from bosslord's GF's daughter. (Through the floor, onto the XBox360!) I can't make up better than that, mate...sorry. (Oh, XBox360 fine, it was in the box...box burned...all okay. How are things there?)

Okay, so I am trying to get the plug-in in a more useable form so I can post it up. Like I said, it has a little of this and a little of that. The last thing I want to do is create myself a nice headache with that. I have a book...a very nice book, I think. It is "Physics For Game Developers", an O'Reilly book by David M. Bourg. I implemented a class using that book in C++. I liked the results, and I even made some decent changes, but...I did not use the C++ Standard Template Library, so I limited myself somewhat. I rewrote the class to use the STL, and now I have my own physics system started. I stumbled at first, however...because I confused my BASIC and my C++. I have been stuck for about a fortnight over the simplest of misguided assumptions about pointer arithmetic! I took the trouble to define identical DBPro and C++ structures, and in C++, a pointer type. I then promptly forgot about that and tried to increment the pointer by the size of the structure. The C++ compiler politely did that for me, and I lost the rest of my mass data. I went back to the old code, and saw the error finally!

I thought the code was lost, but...after the yellow rain...I bugged out of that area of the lab, and moved to the lowlands region. I then discovered one of my emergency backup discs. (I hope it has my ZX Spectrum code on it!)

I have a day off on Wednesday (I think), and I will get the rest of the changes into the plug-in then, precipitation willing. The sockets will be very useful in obtaining data.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 20th Mar 2007 15:14 Edited at: 21st Mar 2007 06:19
Yes, that wet stuff seem to flow from A to B in the most unusual way. hopefully things will start to be high and dry soon.

Been trying to get the web to release the formula for tide information, but its not very willing keeps saying Ha we have it sir just send $XX.00 a month and you too can read the tide times.

Found part of a formula but it still needed datum from some where to make it work.(still looking.)

made a small reset function that I can use to reset the wind over speed, then seem to go ok, was as if there a fault with something else, not your code, but will see what your update does first before charging off down that road.

things here, cavity wall insation works great all nice and wram even though its a bit nippy out , car has had a new clutch put in now got back some horese I was missing.

A bit heavy on the pocket £725.00,(think about $1000+). however not bad really, have only spent £2000 in the past two years putting it back togther, have had it from new so not bad for nearly ten years of use.

I'll look out to see what you done when I get home later.

this may help on yhe lat long.


where I been trying to get the tide infromation from.

edit
This bit of code has the numbers for the Beaufort and Fujita scale added to it to work with the wind speed text shower..


Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 22nd Mar 2007 15:55
just found out that the cup cones on the speed indactor were facing the wrong way, updasted bit of code to change to the right way.



Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Mar 2007 21:30
found this analog clock code and sloted into the code. see what you think.



Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 23rd Mar 2007 21:57 Edited at: 23rd Mar 2007 22:11
...I like it alot, let's go ahead and make it an element proper. I am working on that now.

I have that physics implemented, except for a couple of calculations that I am exposing to DBPro today. (I had another day off, looks like we will set a new low for pay in 2007 this next check. )

I expect to post it today with all of the changes. It is changing somewhat...I have gotten the programmable GUI element system implemented, and also, the plug-in contains some nice functions. It is not complete by any means, but the things we are using are solid...I hope. I am also still hoping to keep one source file for it, with the plug-in optional. I will use a variable to keep the code on the correct page.

btw, here is another thing:
http://en.wikipedia.org/wiki/Ephemeris

That is what we will implement for the solar system, and also local tide calculation. Try looking at NOAA, or US Naval Observatory. I am certain we can find a way to implement the necessary table calculations for whatever it is we want to know.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 24th Mar 2007 11:17
I only had the time to play with the clock function a little. Its very good; I can see that it was worked up very thoroughly. Eventually, it will rely solely on a global UDT for data, it will not need to call the time, either. That would be very inefficient at high fps. Here is a slightly modified version that allows some elliptical clocks. I am trying to use the basic code to get many clocks. We will add an image at some point. I hope that CuCuMBeR won't mind the mods.



Sorry I did not have time to do more.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2007 11:54 Edited at: 24th Mar 2007 18:00
Nice one functions great, how's daylight saving going, weired seeing a post time-ed an hour before it get here, the UK does it time jump this weekend so the times should look correct to me again.

cheers enjoy your weekend.

edit

added some minute marks to clock and a boarder.



edit 2
found this in code snippits for getting images off the web page.
http://forum.thegamecreators.com/?m=forum_view&t=96190&b=6

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2007 13:29 Edited at: 25th Mar 2007 19:12
Updated the slide bar for wind speed now shows the force number as it slides up and down.



If you need me slow down on the updates just say, as I think you said you only had the temperature button, so things like wind speed and direction are a bit hit and miss, unless you've made some random number code for it.

Question if moving the clocks forward an hour, is day light saving, how come I can't cash it in later on when its really dark, why have I got to wait about 6 months before I can use the hour and then its only on the weekends, plus where's the saving, all I get back is 60 Min's, what no interest on extra minutes.

Your day light saving started earlier this year does than mean it finishs earlier or is it later this year.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 25th Mar 2007 22:23 Edited at: 25th Mar 2007 23:15
No, the updates are fine at this rate. Its all good stuff. I just get stuck playing with the pretty shiny stuff. The clock! OMG, I played with it for two hours last night. (The clock, Jonathan...the clock.)

Today, my time for this is spotty. Sam is here as usual, and we are watching SpongeBob. I am going to finish the clock today, and also...I still need to update the wind direction with the image. Later this evening, I should get a few hours uninterrupted.

The DST thing...is a little weird to me. That is a law here, not just a clever idea by Benjamin Franklin. I was surprised by the change, and also...it was put forth as if it were obvious that the change was taking place. (Really? I was under the impression that it was the first Sunday in April and the last Sunday in October.) Perhaps I will look at the law. (Before, I just used the Farmer's Almanac...a very good book.) Oh, I like how we made it look like we are right, and you are just....stupid? Sorry about that, I think it was either Nancy Pelosi, or Rosie O'Donnell that called everyone else stupid. I know it wasn't me or Ann Coulter. (Wait, yes...Ann did say that, but she was only quoting Rosie.)

EDIT: btw, that little sniipet of Xenocythe's will fit into the dll scheme that we have in place. I will add the dll, urlmon to the ones that are loaded. In that snippet, the dlls are only kept loaded for the duration of the calls. In the case of urlmon, that makes sense. The way I have implemented it...you can load and unload individual dlls easily using those two function calls. (jzWinDLLInit and jzWinDLLShutdown). There will be others. I will show you how to add to the list.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2007 23:14
Yeah! I like what the clock become, should bung it in code base as its now been made to work anywhere on the screen any res.

the wind pointer images took some time started with just the one that in the artist challenge thread and made 16 of them, if you like I can try packing them all together for you download, as I found putting the alpha part it hard.

One of my mates has been looking at what I have here in he said that there was to much going on at once, had the star sphere sky going, when I knock that off it was OK to him.

Wind speed counter been having fun telling me its doing mach 3 outside and this was when the count was only 450 into the counting not 100,000+.

Nancy Pelosi, or Rosie O'Donnell those two must be getting a bit worried about how most people are using the web for information, movies and other stuff instead of them and the channel their on.

catch you later on if I'm still up, or it be Tuesday morning here.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2007 23:21
this should save you a bit of time.

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 25th Mar 2007 23:22
ok, and yes, pack the assets up, and I will download and incorporate them.

Pelosi gets free airplay because of her position (Speaker of The House), and O'Donnell is...never mind.

Yes, the wind speed is screaming for a calibrate screen, isn't it? I have one solution already in place for creating that using Windows. The more complex one is that one that has DBPro paint the Window. I think I can talk DBPro into that, but...there is some negotiation that needs to be done first. I have been able to create the Window for DBPro to use, but...I need to talk to DX9 to prepare the window for rendering by DBPro. I researched it a little and it looks possible, but...I haven't seen an example of more than one window being rendered by DBPro.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 25th Mar 2007 23:31 Edited at: 26th Mar 2007 01:24
I suppose it could have a config file that load in on start so you do not have to reset the program each it of fix it as i do here in the code.

Will see how you get on.

Quote: "...I haven't seen an example of more than one window being rendered by DBPro"


Would be a great feature if Lee were to add that in, be just like the Amiga was, having two windows open and commutating.

edit
here a clock I some time groan) ago see what you think



plus you can click on parts of it and move them about.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Mar 2007 06:57 Edited at: 26th Mar 2007 09:07
Sometimes I can't help but laugh at myself. (It helps.) I, too put the roman numeral option in my clock. I used two global string arrays. This allows the clock routine to avoid some of the math when drawing the screen, and there is no call to str$, either. The UDT will contain the screen coordinates, and the sizes of the elements. I have modified some UDTs and code so that time is always available. That eliminates a separate call to get time, and another string is no longer needed, nor any string parsing. So, then the bezel doesn't exactly work...its okay.

I am struggling a bit with the mods, but...its nearly done. Would you post makevain(), wvain() and makelightsandcolor again?

Here is a mostly current version. I have not done the compass mod yet, but the rest is in place, at least. I remmed out the solar system...I was only playing. That is what I want to draw in another window...better get this going first, however. I did discover a couple of interesting DX9 functions. Makes me feel like I might actually be able to do more than one window. I do know that I can talk to DX9 from the plug-in, but...that's cheating! (...plus, its downright odd, considering I bought DBPro to avoid that conversation in the first place.) I have an even more ludicrous idea, why not use OpenGL in the other windows? (Okay, that's enough.)

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Mar 2007 13:19 Edited at: 26th Mar 2007 16:09
There is another option you could go for and that's is we move the point of view, in other words turn the camera left or right to see another part say the solar system or setup.

OK here the other parts


All in one plus I have rem ed a few now, might make changing objects a bit easire. you may find I still got a globe going just rem out what does not go or added the bits needed.

now to check out what you've done.

cheers
edit
manage to get most of the bit I have added going to your new code all seem well, stuck here so you can d/l if you want may save you some time.
edit 2
chane image number from 120 to 104 in wind direction code first

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Mar 2007 06:59
jinzai I know when I was reading about the temperature device data sheet I read something about it return a 1 when the device was ready to do the conversions, do you think you might be able to make it do it that way instead of making the program go in to sleep mode.

cheers.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 27th Mar 2007 09:33
I was wondering how long that would take...annoying, ain't it?
Even the 90 mSec sleep for mine is visually disturbing. It kills the fps, too. That is one reason I am using a running average for the speed. Well, we will try that this week. I need some of the textures you are using for your globe, and the background. Otherwise, it looks good, but...I had to put it in my code, as the d/l above was the project file. I think the direction offset thing is just a one off error in my situation. (Since it doesn't change, and all...I will get it right tomorrow, I think.)

Flood #3 was a real one (I could tell that right off, since it came from the walls and floor, and not the ceiling.), and fighting/fixing that has been taking alot of my time.

I want to create a container for these gauges we are creating. Also, I need to pull the gauges out of makevain and wvain. I will still put a call in there, but I will put the relevant code into create and draw functions. We will use the same method that Windows does, since I already know that, and it works well. If I can get that fleshed out, then the goal of programmable GUI elements will be closer to realization. You mentioned configuration files as a vehicle to facilitate this, and I agree; that is a sensible direction to take. Once I have a few of these designed, we will begin to support that.

Well, tomorrow is...already here. G'night.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Mar 2007 15:13
Quote: "Flood #3 was a real one (I could tell that right off, since it came from the walls and floor, and not the ceiling.), and fighting/fixing that has been taking a lot of my time."


So your not like me then, up on top of a big hill at about 3500+ft, has been known to flood up here but not often. If did the rest of the country is in big do do's.(#2)

Looks like you are having a big drain of the green stuff just lately, hope you can find someone to claim the damage on(even if its a big hassle).

Quote: " I need to pull the gauges out of makevain and wvain. "

funny you say that, just after I have been looking around the code to see where they have been hidden, thinking of making the make object part as separate function as well, one to make it easier to read and a quicker way of changing things.(see who get there first.) Plus using the free object function keep track of the objects.

Wind speed I think is sorted, but now I am waiting for some wind as its very light, won't take long, there's a holiday coming up, so its bound to be doing something nasty outside.

cheers.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 30th Mar 2007 19:09 Edited at: 30th Mar 2007 20:28
Have you fixed the leek yet?

When you have time to yourself again have look at this



plot a graph across the screen using random numbers, been try to work out how the weather program could store the values in a memory block so that the above code could go to that memory block and read whats there and show it on the screen.

If that looks like being along way around of doing something simple the other way I thought of was to make it switch screens.

let us know what you think when things your end have got less hectic.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 1st Apr 2007 11:12 Edited at: 1st Apr 2007 11:13
After a lot of messing about have finally got the wind chill part going, was not using the here. part on the front of tnow so the value I was getting were a bit on the cold side, here it is.



the graph bit above I nearly had going how I wanted just one bit away from getting it right then the compiler quit on me so had to reboot, haven't made it work right again yet.(Might teach me to save before compiling but maybe not).

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Apr 2007 14:36
Hi ya, how are things going?

just been having fun trying to find a simple to read dew point calculation formula, on luck as such, but found this site which uses a DS2438 device.

hers the link if want to have a look plus it has some code on how to use it.

http://www.phanderson.com/rh_liberty_basic_2.html

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Apr 2007 22:27 Edited at: 4th Apr 2007 22:33
...they're going. Sam and I are on vacation the remainder of this week.

I changed the code to use the performance counter timer as opposed to the millisecond timer. I have a routine and naturally a UDT to go with it. Right now, I am trying to update my source code files to the versions in this program. Lem'me explain...

...I have a folder in the Projects directory called "source". It is where the "jz" functions all come from...there are several files in that folder...jzHelper.dba, jzWindows.dba, jzCamera.dba, et al. I am in the process of tool-building and also I am generating thousands of lines of code to use in my other projects. Its a blast, I'm lovin' it, BUT...I need to go through it every few days, and make sure it all still works to satisfaction. Also, I like to make sure that I don't cause myself, or others grief when using the code elsewhere. For example, I consider it an error to name a function wrapper the same as the function it wraps. I would not name a function that calls WSAStartup...WSAStartup. That is asking for trouble down the road, imo. I prepend my function names with "jz" to avoid conflicts, and to let you know...that is a function that I wrote. (Makes it easier to assess the blame properly, for one thing.)

Having said that, I also added the c runtime dll....Have some fun with that! I needed a time function call to use with the NTP time sync deal that I will be adding (soon, I hope!). c has _ftime64, and also a function call, _ctime64, which gives you a string as its output. Plus, they are probably faster. That time is 64 bits, too large for DBPro to use as an unsigned value. (It is similar to the issue about returning short integers that I wrote jzMakeWordIntValue to fix.) There is not a DBPro type to use with that method, so...if you look at jzTSync(), you will see me trying to make it work anyway by using the same trick....subracting it from the largest value that the type can contain. Ugly, and weird, but...otherwise the thing goes negative, which looks bad, but can be dealt with by other means. What I have works, that is pretty much all I have to say! I had thought that the performance counter would roll over at the frequency count, which would make sense and work like nobody's business, but...it doesn't.



Also, DBPro won't do the goodly math on the double integers, mod fails. I put in an integer called elasped to use in the main loop for timed data acquisition.
I like the function...it uses no division at all because it already did the division in the initialization routine.

Okay, then...today/tonight I will install your latest, and post up a new version. btw, I will put that humidity in, too...just need an array for the data source...like the temp, counter, AtoD.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 5th Apr 2007 06:11 Edited at: 5th Apr 2007 06:41
Quote: " I am generating thousands of lines of code to use in my other projects. "


Sounds very much like you will be making your own function picker so you look through your list of function then pick the one required then paste it in the new project your are building.

Quote: "I also added the c runtime dll"

will look out for that one, on the 64 bit part, did I not see that other code basic sort of getting it, then saving out as a file to read back in as needed. or have I missed read it.


Enjoy your vacation (do you call this one spring break or is that one to come).

Luck me has Thursday to Tuesday night for a break but not good for the cash flow.

edit
Do you think some of what you have done is this project (to do with calling dll's) should have a mention in the monthly news letter.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 5th Apr 2007 23:40 Edited at: 5th Apr 2007 23:50
The c runtime dll is loaded along with the Windows dlls. Actually, I have had it loaded for some time now, I just did not use it. The way I see it, I have 4 distinct DLL 'situations' going on here. It does warrant some explanation:

The first situation is what we began with...using a third party dll from DBPro. This category of dll is intended for extension of the machine by supporting an interface to specialized hardware. Usually, such a dll is written with a c-style interface, which is fortunate for users of DBPro. (Except the short int issue, which is easily solved.) It is straightforward, and I probably have done too much with that one. (I was learning at the time.)

The next situation is access to the core of windows, which includes user32, kernel32 and gdi32. These are unique in that they are guaranteed to exist in memory at the time the program is started. The load dll, etc. is really just to get our code up to speed on where the functions are located. Recently, I advocated using user32 to someone, who stated that it caused problems. Well, all I can say to that is...it isn't user32's fault, that is for certain. user32 is easily a third of Window's core. When it runs into trouble, you are probably already done for anyway, and it is probably something that you did, or didn't do properly. That is why I keep on that soapbox about downloading the Platform SDK from MS. You will not find (at least I haven't found) better documentation for this. You look up the function you want to use, examine its requirements and also look to see which library it is in. Then, you examine the related include files to find the definitions of the parameters, etc. Next, I create an approximated UDT for the structures I need, some constants to make it more readable, and then the call itself usually needs a memblock, or pointer of some sort. It gets easier each time you do it.

The third situation is the c-runtime dll, which I lumped in with Windows because I view it as part of Windows. It is certainly part of DBPro, so it is already there, too. I hesitated to bring it up before, because I (stupidly) was afraid that the c startup code had not been called. (Which means that some things would not work, and also...it probably would crash very unexpectedly.) Well, duh to that, DBPro simply has to call the c runtime startup code...it would not work then! (It is all done like magic by the c compiler.) Using the c-runtime equivalents of some DBPro stuff is a valid optimization. For one thing, BASIC prolog and epilog code is usually more involved than the c equivalent: BASIC is more complex than c in that respect. Also, there is the use of the stack, which I will only say that c does better and also more powerfully and efficiently than BASIC. String manipulation with c is much better, etc.

The fourth situation is using a plug-in, which is very transparent, and looks like function calls to external dba files, which I abandoned on this project long ago because I was losing more code than I was writing. I think I have learned how to do this now using the default IDE...you only edit the main file, you don't even open the others at all. You save two deep: once with Save All from the menu only...once by selecting/copying all of the text, and saving using Notepad. It is complex, but...you get to win in that case because you usually have about three copies of the file and only one or two is corrupt! When I work on my plug-in, I use the VisualStudio IDE for most of the editing, and cut and paste into the DBPro IDE. That is simply because I am using it at the time, and I am more familiar with it, and it doesn't eat source code.

Anyway, the specific methodology is (imho) sound software engineering practice, which is something that game programmers tend to shy way from at first. Like most people here, I got hooked into programming by games and scientific pursuits. I got most of my education at my government's expense, so I necessarily have developed my technique from those two perspectives. I learned BASIC and assembler to do the fun stuff, but I learned Windows and C/C++ for work: I wrote commercial applications for data acquisition, comms and analysis. As part of that job, I had to develop a 386EX BIOS, DOS-like OS, and application programs. It was daunting, believe me. The BIOS was General Software (Phoenix uses them, too.) and the DOS was also from them. Marrying all of that into a prototype with a NIC was pretty involved. The device supported another device with a very unfortunate acronym...it was an "intelligent electronic device". I had this development system at the time...I can't even describe it well now. I had a monochrome monitor to which I spat out debug text, devices on two NICs, two comm ports, and also a parallel port interface. It was busy for a 16 bit system! (And it was a Gateway, like my current piece.) Anyway, that job was the most fun I've ever had with my clothes on.

I think that if someone wanted to ply the Windows API, the way I have done it here is a pretty good place to start. I see alot of code that will get a bit of info, and then unload the dll. I think that keeping them around is better. Actually, I never unload any of them until its time to go. I suppose that there exists a dll that I would use that way, that is why the functions are written to deal with any valid number of dlls at once. (You can load and unload individual dlls, or all at once.) There is room for 32 dlls in the system. Naturally, you could clone it, and get another 32 dlls, but...really...I think that would be a good time to step up to something else! I also added urlmon and netapi32, but haven't used them yet, either. netapi32 is the old LAN manager dll, not of much use outside a local network, except of course to hackers. It can be used to get time, however. There are many dlls in the system to use.

btw, here is the section that calls the c runtime functions...I am not done installing it yet.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 6th Apr 2007 01:38
I totaly agree with your statment above about going to the SDK PLATFORM SITE.

found the little something I think we all been looking (if after webcam video) for , for getting video.

the

wiaaut.dll

now to see what else there is on it.

been looking here.

http://msdn.microsoft.com/coding4fun/hardware/video/article.aspx?articleid=912546

Why's reading the above a bit like pool, the instruction are easy to follow but getting the understanding of the dynamics takes a bit longer.

third reading it start to make some sence.

Cheers jinzai.

Dark Physics makes any hot drink go cold.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 6th Apr 2007 06:14 Edited at: 6th Apr 2007 06:14
Yes, I've messed with that one, too...In Windows98. The original version was from Kodak, and it could talk to TWAIN or serial/USB cameras equally well. It also had a nice little capture dialog already made up. I lost that code, but...its not complicated at all, as you say...once you understand the dynamics. (True that!)

I have a camera already torn apart, I just need the cable. ($20 at WalMart)...mine is in a box somewhere in a radius of about 8 miles. Can't seem to locate it...but, it is worth 20 bucks to keep looking apparently. The camera I have actually focuses, but they glued the lens in place. I fixed that. The only real trouble with that particular article is that he is using a .NET version. We would not need that interface, and in fact...it would be a little more difficult to implement without resorting to a plug-in. Anyway, I have a little keychain type camera that I can use for the same thing. Here is the modified cheapo camera in action:


Login to post a reply

Server time is: 2024-05-18 13:51:28
Your offset time is: 2024-05-18 13:51:28