I have done this in C many years back. However, you need to use double precision floating point numbers to get accurate results. PicBasic code? I doubt it as Picbasic does not support this data type.
I have done this in C many years back. However, you need to use double precision floating point numbers to get accurate results. PicBasic code? I doubt it as Picbasic does not support this data type.
Yes, this is what I found out too.
Is there any chip that would do this math for me I could embed in my circuit, at least as a plan B?
Roger
I don't know how to calculate it but do you really have to? I mean, do you have to calculate it on the PIC, at runtime? It's not like your wall clock is changing location on a day to day basis, is it?
You could calculate it (or simply look it up) on your PC, store the results in your PBP program and look it up at runtime. If calculating it is "heavy" then a pre-calculated table is probably smaller in size and definetly faster.
Henrik,
Right, no need for runtime data.
Any idea where a kind of data table would be to be found?
Roger
I think it is best to be calculated in a Excel file and then the results stored in an External EEPROM?
Ioannis
You can store lot of data in program memory. And get it with read code.
Let me Google that for you....Henrik,
Right, no need for runtime data.
Any idea where a kind of data table would be to be found?
https://www.timeanddate.com/sun/swed...h=10&year=2024
It defaulted to Gothenburg for me so obviously you'll need to change that.
Bookmarks