Closed Liangkerui closed 5 years ago
BigNumber latitude_rad = latitudepi/a; // latitude in rad
That code doesn't even compile. Is that your problem?
/tmp/arduino_modified_sketch_443397/sketch_aug17a.ino: In function 'void setup()':
sketch_aug17a:13: error: 'latitudepi' was not declared in this scope
BigNumber latitude_rad = latitudepi/a; // latitude in rad
^
If not, please post your code that you are actually using.
sorry,there is mistake happened when i copy and paste the code.The * is missing,I do not know how it happened. The following is the code i use.
BigNumber latitude="35.95568352"; BigNumber longitude="120.1484011";
void setup (){ Serial.begin(9600); BigNumber::begin (15);
BigNumber pi ("3.1415926535897"); BigNumber a ("180"); BigNumber latitude_rad = latitudepi/a; // latitude in rad BigNumber longitude_rad = longitudepi/a; // longitude in rad Serial.println(); Serial.println(); Serial.println(latitude_rad); Serial.println(longitude_rad); } void loop(){}
I know the reason,i make stupid mistake. I shall write these two line "BigNumber latitude="35.95568352"; BigNumber longitude="120.1484011"; after " BigNumber::begin (15);"
Thanks.
@nickgammon Firstly, thanks for your BigNumber library. I get some issue when i use your library,i do not know if it is because of a stupid mistake or other reason.
This is the code
include
include "BigNumber.h"
BigNumber latitude="35.95568352"; BigNumber longitude="120.1484011";
void setup (){ Serial.begin(9600); BigNumber::begin (15);
BigNumber pi ("3.1415926535897"); BigNumber a ("180"); BigNumber latitude_rad = latitudepi/a; // latitude in rad BigNumber longitude_rad = longitudepi/a; // longitude in rad Serial.println(); Serial.println(); Serial.println(latitude_rad); Serial.println(longitude_rad); }
void loop(){}