Calculation of azimuth
Calculation implant following C codes
Could somebody please help me implant following C codes into the program Flowcode 4.5 for Picmicro.
It is needed for calculation of azimuth and Alt for controlling of a solar tracker, which together with a GPS (Board EBC056-00-1) and C codes calculates Azimuth and Alt every 5 minutes.
I wish to implant the C codes azimuth east of north and Alt --- altitude above horizon.
See following web-site for C codes:
http://stackoverflow.com/questions/2577 ... d-lat-long
http://www.youtube.com/watch?v=ntILNtq3Y3Y
Above shows coordinates and other data which are the basis for the calculations.
Maybe as shown on YouTube insert C codes in ”Supplementary Code”.
Output:
az — azimuth east of north
alt — altitude above horizon
As I have no knowlegde of programming with C codes I need some help, please.
Calculation of azimuth
Moderator: Benj
-
- Posts: 12
- Joined: Thu Mar 11, 2010 8:10 am
- Location: Danmark
-
- Posts: 45
- Joined: Mon Nov 07, 2011 6:36 pm
- Has thanked: 1 time
- Been thanked: 30 times
Re: Calculation of azimuth
Hi Monie
The link you gave is for R code, here is a link with an in depth description and some code http://www.nrel.gov/docs/fy08osti/34302.pdf
One problem with using a Pic for this is that Sin,Cos etc is not a built in function and therefore you will need to calculate it, here are some of the methods discussed on this site.
Gary
The link you gave is for R code, here is a link with an in depth description and some code http://www.nrel.gov/docs/fy08osti/34302.pdf
One problem with using a Pic for this is that Sin,Cos etc is not a built in function and therefore you will need to calculate it, here are some of the methods discussed on this site.
- http://www.matrixmultimedia.com/mmforum ... =31&t=7447
http://www.matrixmultimedia.com/mmforum ... =13&t=7635
http://www.matrixmultimedia.com/article.php?a=50
Gary
-
- Posts: 12
- Joined: Thu Mar 11, 2010 8:10 am
- Location: Danmark
Re: Calculation of azimuth
Hi Gary
Many thanks for your answer.
Interesting Link.
Has no knowledge of C code, it will be very educational with an example in flow code for PICmicro.
Or is there anyone here on Matrix Multimedia Forums could make a ptogram examples.
Many thanks for your answer.
Interesting Link.
Has no knowledge of C code, it will be very educational with an example in flow code for PICmicro.
Or is there anyone here on Matrix Multimedia Forums could make a ptogram examples.
Best regards,
Monie
Monie