Calculation of azimuth

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
MonieJacobsen
Posts: 12
Joined: Thu Mar 11, 2010 8:10 am
Location: Danmark

Calculation of azimuth

Post by MonieJacobsen »

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
Kordinater.jpg
Kordinater.jpg (62.22 KiB) Viewed 3263 times
Above shows coordinates and other data which are the basis for the calculations.
Maybe as shown on YouTube insert C codes in ”Supplementary Code”.
Project.jpg
Project.jpg (43.61 KiB) Viewed 3263 times
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.
Best regards,
Monie

Gary Freegard
Posts: 45
Joined: Mon Nov 07, 2011 6:36 pm
Has thanked: 1 time
Been thanked: 30 times

Re: Calculation of azimuth

Post by Gary Freegard »

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. Goodluck

Gary

MonieJacobsen
Posts: 12
Joined: Thu Mar 11, 2010 8:10 am
Location: Danmark

Re: Calculation of azimuth

Post by MonieJacobsen »

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.
Best regards,
Monie

Post Reply