Sun Monitor

alfcen

Well-Known Member
Licensed User
Longtime User
Hi everybody,
My latest Basic4PPC astronomy project is software that monitors the daily positions and motions of our home star, the Sun.

If you are astronomy biased please have a look at:

http://www.alfcen.com/pocket/taiyo.html

(The installer is too large for the forum server)

I am always amazed by the speed at which Basic4PPC applications can be put together!

The application is shareware, but free for forum members.

Cheers
Robert
 

Rioven

Active Member
Licensed User
Longtime User
Hi alfcen,
Looks very nice!:sign0098:
I've got interested...
I am using sun path for designing building facade, canopy, and other sun shading devices.

Regards,
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Hi Robert...
Althoug not an astronomy enthusiast, I like to watch the stars and know a bit or two about everything....
Your app LOOKS great, but the screenshot in the website is a bit small...
Can you post a larger image in the forum?
btw, how did you get those great looking gouges? are they dll based or code based controls?
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi Cableguy
Here you are...

The gauges are bitmaps created with Paint Shop 5 :)

Cheers
Robert
 

Attachments

  • taiyo.jpg
    taiyo.jpg
    48.1 KB · Views: 383

Cableguy

Expert
Licensed User
Longtime User
Hi Cableguy
Here you are...

The gauges are bitmaps created with Paint Shop 5 :)

Cheers
Robert

So they don't really work do they?..toobad, they look awsome!!!
 

alfcen

Well-Known Member
Licensed User
Longtime User
Without code the bitmaps are of course dummies, but with some code, mostly drawing on a form, they work quite vividly and do not require much memory. Besides, bitmaps load faster than other graphic formats while repainting the screen, in whole or part, is as easy as drawing the image again.

I noticed that transparent forelayers cause flickering at data refresh, so I stayed with the static form. Transparency can be achieved by using a superimposed image button without any image and its transparent property set to true. Doing so, the bitmap adds a Click event.

Sure it would be nicer to have gauges in the form of a control, but customization might be difficult then.

Cheers
 

Cableguy

Expert
Licensed User
Longtime User
I have been looking into gauge alike controls dll's...
not much to customize....
minimum value
max value
redline start value (if any)
refresh
and the default props
width, height, etc..


It's the drawing that still puzzles me as I'm not a c# developer in any sort...
 

agraham

Expert
Licensed User
Longtime User
That's a very nice looking app. Is that screenshot from a VGA device? If so how do you get B4PPC to work at that resolution?

EDIT :- Ah sorry. I've looked closer and it seems to be a pixel doubled screenshot of a standard device. Still looks very good though - shows what can be done with a bit of design flair (which I totally lack) on a small device!
 
Last edited:

alfcen

Well-Known Member
Licensed User
Longtime User
Gentlemen,

Just a small 3D bitmap or some shades of color. I have been putting together web sites for years.

I totally lack of in-depth knowledge of the frameworks, nor do I own ability of constructing DLLs with #Develop. On top of this, I have a talent to introduce new bugs as my senile, rusty brain attempts to add functionality.

Most of my apps are enhanced by dzt's and Filippo's irreplaceable DLLs.

In short, I am truly happy to have you at my side :)
 

derez

Expert
Licensed User
Longtime User
Gauges

Hi
Until there are controls in the shape of gauges, I used poligons (Erel's suggestion) as demonstrated here:

.....
triangle(track,40)
Form5.FPolygon(alX,0,alY,0,4,Rgb(TRK.R,TRK.G,TRK.B),f)
Form5.FPolygon(alX,0,alY,0,4,cBlack)
....
Sub Triangle(angle,k)
angle = angle * cPI / 180
s = Sin(angle)
c = Cos(angle)
alX.Item(0) = center_x + k * s
alY.Item(0) = center_y - k * c
alX.Item(1) = center_x + 6 * c + 7 *s
alY.Item(1) = center_y - 7 * c + 6 * s
alX.Item(2) = center_x + 10 * s
alY.Item(2) = center_y - 10 * c
alX.Item(3) = center_x - 6 * c + 7 * s
alY.Item(3) = center_y - 7 * c - 6 * s
End Sub
.....

and it is drawn on the background of an image of a map, so an image of the instrument is the same.
 

alfcen

Well-Known Member
Licensed User
Longtime User
Very nice, David,

Your method allows scaling, thick lines, etc. A true alternative.

A control would require a vector graphic as background image rather than a bitmap to allow virtually limitless scaling of the control's dimensions.
 

agraham

Expert
Licensed User
Longtime User
Being inspired by seeing alfcens' gauges I've been playing with pictures and polygons to make analogue gauges. To make it easier I've taken derez' code above, added a bit to it and parameterized it to make playing with different pointer shapes easier. Someone might be interested so I've posted it below. You can make a surprising number of different pointer styles by playing with different parameters!
 

Attachments

  • Clock.jpg
    Clock.jpg
    3.7 KB · Views: 310
  • Pointer.sbp
    2.3 KB · Views: 339
Top