|
-
Apr 27th, 2009, 09:49 AM
#2
Re: Calculate sunrise / sunset
 Originally Posted by Ellis Dee
I'd like to set up functions to calculate sunrise and sunset times. I don't need huge precision; just a rough estimate (like within a half hour) would do. But then again, I certainly wouldn't complain about a solution with high precision.
Ideally you'd just send the function latitude and longitude coordinates. Something like:
Code:
Public Function Sunrise(pdblLatitude As Double, pdblLongitude As Double) As Date
End Function
Public Function Sunset(pdblLatitude As Double, pdblLongitude As Double) As Date
End Function
Google turned up a ton of possible ways to go, none of which made a lick of sense to me.
Have you considered using a webservice to achieve this goal?
I would write a .NET component to call a webservice. Then build a COM wrapper around the .NET component and call the functions exposed by the COM wrapper.
I have done something similar when my VB6 app needed to call a webservice running on SIEBEL.
Earthtools.org has a webservice that you might want to look at.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|