Selection of Arduino Board for NREL code

Dear all,
I am looking for board which support NREL algorithm.
It require double presion floating point. Can some one suggest me the board which do below calculation.i have attached output file for comparison

spa.rar (9.75 KB)

nrel-out.bmp (684 KB)

It require double presion floating point

"Requires" ?
Really?

The Due has 64 bit floating-point.

AWOL:

It require double presion floating point

"Requires" ?
Really?

The Due has 64 bit floating-point.

It has being specified NREL doc . Can you share me the link for product you suggest

Can you share me the link for product you suggest

Certainly

Moderator edit: small correction to the link

AWOL:

Can you share me the link for product you suggest

Certainly

Moderator edit: small correction to the link

IS it any way to check the Code with sumulator . Since cost is expensive. I wanna make ensure code will work

It's standard C.
What do you expect not to work?

AWOL:
It's standard C.
What do you expect not to work?

I tested on avr controller / pic controller through simulator . it will execute but deg of difference is +/- 2deg .but its accuracy is +/-0.003 degree. So i wanna make sure it work as output shown in window.

The Due supports 64 bit IEE754 floating-point, albeit in software.

AWOL:
The Due supports 64 bit IEE754 floating-point, albeit in software.

IS there any lower version available in 32 bit , supporting Double precision

You can't have double precision in 32 bits.
You could convert the algorithm to large integer operation.
It'll be slow, but the sun isn't noted for moving quickly.

AWOL:
You can't have double precision in 32 bits.
You could convert the algorithm to large integer operation.
It'll be slow, but the sun isn't noted for moving quickly.

I have done same using Arduino UNO but accuracy +/- 1 degree. I wanted to Try on arduino Board So main accuracy close to NREL has.

http://in.element14.com/digilent/chipkit-uno32/pic32mx320-chipkit-uno32-dev-board/dp/1893211?Ntt=chipkit+uno32

Here i am adding liberary to achieve accuracy during run time.

I wanted to Try on arduino Board

See reply #1 and #3.
If the original algorithm uses IEEE-754 64 bit floating point, then you will replicate the same results on a Due.

Just for a giggle, I took the code, and substituted every "double" (64 bit) with "float" (32 bit) in both spa.c and spa.h, and compiled the two versions on a Linux workstation.

32 bit float:
Julian Day:    2456339.000000
L:             1.469717e+02 degrees
B:             -1.612802e-04 degrees
R:             0.987860 AU
H:             355.542694 degrees
Delta Psi:     4.113111e-03 degrees
Delta Epsilon: -1.525425e-03 degrees
Epsilon:       23.436060 degrees
Zenith:        63.870865 degrees
Azimuth:       175.153564 degrees
Incidence:     34.056976 degrees
Sunrise:       07:16:15 Local Time
Sunset:        17:19:03 Local Time

Original (64 bit double):
Julian Day:    2456339.000000
L:             1.469725e+02 degrees
B:             -1.612652e-04 degrees
R:             0.987860 AU
H:             355.649141 degrees
Delta Psi:     4.113086e-03 degrees
Delta Epsilon: -1.525411e-03 degrees
Epsilon:       23.436059 degrees
Zenith:        63.865035 degrees
Azimuth:       175.269093 degrees
Incidence:     34.059574 degrees
Sunrise:       07:16:23 Local Time
Sunset:        17:19:11 Local Time

I don't see any error even approaching your quoted +/- one degree.

AWOL:
Just for a giggle, I took the code, and substituted every "double" (64 bit) with "float" (32 bit) in both spa.c and spa.h, and compiled the two versions on a Linux workstation.

32 bit float:

Julian Day:    2456339.000000
L:             1.469717e+02 degrees
B:             -1.612802e-04 degrees
R:             0.987860 AU
H:             355.542694 degrees
Delta Psi:     4.113111e-03 degrees
Delta Epsilon: -1.525425e-03 degrees
Epsilon:       23.436060 degrees
Zenith:        63.870865 degrees
Azimuth:       175.153564 degrees
Incidence:     34.056976 degrees
Sunrise:       07:16:15 Local Time
Sunset:        17:19:03 Local Time

Original (64 bit double):
Julian Day:    2456339.000000
L:             1.469725e+02 degrees
B:             -1.612652e-04 degrees
R:             0.987860 AU
H:             355.649141 degrees
Delta Psi:     4.113086e-03 degrees
Delta Epsilon: -1.525411e-03 degrees
Epsilon:       23.436059 degrees
Zenith:        63.865035 degrees
Azimuth:       175.269093 degrees
Incidence:     34.059574 degrees
Sunrise:       07:16:23 Local Time
Sunset:        17:19:11 Local Time




I don't see any error even approaching your quoted +/- one degree.

SO that means i can run same code on mega 2560 model by changing double to float.

You don't even need to change double to float.
On eight bit AVR Arduinos, double and float are equivalent; 32 bit IEE-754.

AWOL:

I wanted to Try on arduino Board

See reply #1 and #3.
If the original algorithm uses IEEE-754 64 bit floating point, then you will replicate the same results on a Due.

I try to upload this program but didn't worked. I changed all printf statement by Serial.printf . I wanted to know whether u uploaded to arduino UNO board

AWOL:
You don't even need to change double to float.
On eight bit AVR Arduinos, double and float are equivalent; 32 bit IEE-754.

Have u uploaded to Arduino UNO board. I have tried by changing printf statement to Serial.printf statement . One of the UNO board crashed boot loader . can you me how to test on UNO actual board

I have tried by changing printf statement to Serial.printf statement

There is no "Serial.printf" unless you've modified the library.

The tables are too big to fit in an Uno's RAM, so you'd have to put them into PROGMEM.

AMPS-N:
Have u uploaded to Arduino UNO board. I have tried by changing printf statement to Serial.printf statement . One of the UNO board crashed boot loader . can you me how to test on UNO actual board

Indeed? What error message did you get, that indicated the bootloader had crashed?

AWOL:
It'll be slow, but the sun isn't noted for moving quickly.

Well, we move around it don't we? Or not? I get confused.