Thursday, 22 October 2009

FFTW finally working under Qt code

FFTW was not working the way I wanted actually and yesterday I became crazy about it, giving me a not so good day...

Today I am quite sure that the problem is solved.

I found some hints on the net that helped me...

http://www.fftw.org/faq/section3.html#linkfails

"Question 3.13. My program does not link (on Unix).

The libraries must be listed in the correct order (-lfftw3 -lm for FFTW 3.x) and after your program sources/objects. (The general rule is that if A uses B, then A must be listed before B in the link command.)."

http://www.qtcentre.org/forum/archive/index.php/t-337.html

I tried a simple example of FFTW and it worked out perfectly not giving any error either warning.

Since I am working on Qt projects, it was not so easy as writing gcc -lfftw3 -lm helloworld.c,
so I had to add a line in the .pri file.
Here the new line in bold:
LIBS += -L$${QWT_ROOT}/lib -l$${QWTLIB} \
/usr/local/lib/libfftw3.a

Thanks to the ones who helped me to realise about this (basic) problem.

More inspired than yesterday Fer

Wednesday, 21 October 2009

FFTW...

FFTW libraries downloaded,
now we have to let it work with basic spectrums and link it with my Qwt graphs.
Easy?
I'll try to tell you as soon as possible!

;)

Friday, 16 October 2009

Problems solved...


Problem of paths as expected.
I set up the paths from a .pri file and it worked out as in the examples.

My first graphical window in C++ with Qwt and Qt.
A simple mathematical function:

Step by step...

Qwt almost under my orders...

After trying the examples of Qwt project I got some nice ideas to implement for my OFDM transceiver simulator.

I got some concepts of canvas, pens and basic stuff for plotting basic mathematical functions which is good but...

...it is still not under my complete control...

Once compiled the project examples in the original folder everything went ok and no problems of execution (apart from setting up the Libraries path).

Making it myself and in my own folders it seems that the headers are not found so today I am researching a bit more about it. I guess it is a simple step and it will be mine!
I hope this evening I could post my first Qwt application done by myself !

Cheers and have a great weekend!

Thursday, 15 October 2009

Qwt in MacOSX

Last time since I posted, and it had nothing to do with this new post.
But here I am again.

Since I'm working on Qt C++ software development under my MacOSX 10.5 I'm having some configuration "affairs" with it, so here I write the first one.

Deployment of Qt application using Qwt for technical graphs...

Since I'd like to show some OFDM signal spectrums in my application I need to implement it with qwt.
Once I downloaded the qwt source from here, I copied it to my Developer folder and I started "qmaking".
So nice to see that all the .pro files are already created and you don't need anything but qmake for having the software ready...

so in my MacOSX terminal:

fernando-martins-macbook:bin martin$ cd /Developer/qwt-5.2.0/

fernando-martins-macbook:qwt-5.2.0 martin$ qmake -spec macx-g++

and the Makefile is created.

Inside the qwt-5.2.0/ folder there are some examples that can be easily open just following the same procedure.
But what a surprise when once they were build I could not be able to open them with this simple operation:

open bode.app

The libqwt.5.dylib was missing "somewhere" during the creation process of the app...

After installation of qwt, in my OS I could find the libraries in /usr/local/qwt-5.2.0/lib (you can check this path in qwtconfig.pri),
so it is only needed to add this folder to the DYLD_LIBRARY_PATH.

Remember: echo $DYLD_LIBRARY_PATH will show you the current value of the variable.

DYLD_LIBRARY_PATH= {The previous path}:/usr/local/qwt-5.2.0/lib (in my case)

The apps were created normally and I could run them to see how qwt works under Mac :)



Thursday, 20 August 2009

Asia 5th day. Summit of Mt Kinabalu and back to KK

It was true, the coldest part was about to arrive.
After a cold night even with blankets and heater working from 8pm, 2:30am arrived soon.
We had supper before climbing and we got ready for the summit.
Head-torches, wind-stoppers (thank you Chema for borrowing yours, it was crucial!), gloves and scarfs were all around but I wasn't so prepared for the cold.
I was wearing shorts, hat, windstopper and headtorch (totally needed). No gloves which I'd miss so much during the climbing.
We started pretty late, finding a big "traffic jam" in the first stage of wooden stairs. Here it was an easy climb but dark as hell since it was 3:15am.
After overcoming all those people our rhythm increased and we (the Australian guys Brett and Ashley and alex and me) felt better without stopping.
Once during the climb I saw myself alone since the group was split up, but I decided to continue in the granite (bare rock) following the rope that guided us. Sometimes that rope helped to climb, but since I hadn't gloves it was more a torture than help, so I decided to grab it the less times possible, trying to keep the hands warm.
Little stops of some seconds I made for having deep breaths, but I did not stop longer.
At 4:30am, aprox. I found myself alone, with no clue of anyone else above me, but I continued following the rope willing to find something new and even more exciting than being alone at 3800m high...
[Video following the rope]
Some steps further the sign of Low's peak 4095.2m high was standing in front of me illuminated with my torch and admired by me.
[Picture of the top]
[Video of the top]
I was the first in reaching the summit, and the feeling was actually great!
No one was higher than me in between the Himalaya and Papua New guinea in that moment.
Darkness, silence and freezing wind were my only company in that moment. They were a good company from 5:10am, when I reached the top, until four minutes later, When I started to feel cold and to miss people around...
Once the body stopped climbing, the heart rate decreased and the temperature of the body did so, so I started to shiver and to look for a place safe against the wind.
20 after I arrived, a group of guys also arrived suffering also from cold temperature. I tried to warm up eating an energy bar but I don't know if it worked so far...

At 5:40am Alex arrived, we took the picture of both of us on the top
[Picture of both of us on the summit]
and we decided to clomb down just after the Australian guys. The view was not good at all due to the clouds and fog. We noticed that the sunrise had already taken place but we couldn't see the sun at all...
I have to say that we were lucky because on the previous day people couldn't reach the peak because of the weather conditions...

Climbing down, time to warm up again and to take some pictures of the views that eventually the weather allowed us.
[Pics Mt Kinabalu climbing down]

Another breafast was waiting for us at 7am in Laban Rata, the place where we slept the previous night.
[Pic group of 4]
The food there was great, we paid it, but I really did not expect so much food available, so I enjoyed it as I never did!! :)
[Pic of food]

After 3 hours of climbing down in a really comfortable step, we finally reached the place where the bus from Kota Kinabalu left us the previous day, and our legs were claiming for some relax, sincerely deserved relax. We ate for the last time at 1pm and the 2 great Australian guys offered us to be driven to KK, that was a very big relief.
Thanks again guys!! Hope our lives are coming across again in the future!

The trip was 1:30hours and most of the time I was sleeping, really destroyed...
Once arrived, after some Singaporean beers in the entrance of their hotel, we said goodbye to each other, they had a flight in a few hours, and we finally took a look around the city centre, seeing the Filipino market and some jetties before arriving Kuni's house.
Tha swimming pool was the first place where we thought to go after leaving our backpacks at home. Some relaxing movements helped me to feel a bit less tired and helped also my muscles to recover sooner.
After this relaxing bath, we knew via SMS that we were having dinner at Gon's place (The CSurfer scuba diving instructor). She invited us to go and we did not hesitate!
But of course we slept 1 hour and a half before going, our bodies really needed it...
A friend of Gon called Rita picked us up , as well as the Polish guy and a new CSurfer from Finland. We stopped in a Seven Eleven to buy some beers (San Miguel brewed in Phillipines) before going to Gon's place where a stunning dinner was waiting for us. Fish, chicken, rice, dumplings, salad and cakes were the menu and our stomachs were really happy about that. After a very long day this was a total pleasure.
A nice chat stayed together with us during the whole dinner and even some vodka shots showed up in the end of the dinner.

Party in KK
It was Saturday night, so the party in KK was starting engines when we finished dinner. The place where we went was called "bed" (Best Entertainment Destination). We kept going until 2:30am (24h since we woke up in Laban Rata...) when we went home to have some sleep before the next day, when the water life in Tamah Abdul Ramah islands was waiting for us...

Wrote during trip from KK to Singapore by tigerairways.
2:00pm
3rd August 2009
On the plane.




http://en.wikipedia.org/wiki/Mount_Kinabalu

Wednesday, 19 August 2009

Asia 4th day. Climbing up Mt. Kinabalu

The day started at 5:45 when my alarm clock started sounding from the mobile phone.
Why so early? Because our Japanese friend and host told us to leave the apartment at 7:00am and we really wanted to eat properly before climbing and have some time just not to rush.

3 fried eggs with cheese and roasted bread was the main dish, but 2 small bananas and orange juice were also in the menu.
After this and upload the last part of the yesterday's blog post, we got ready and Kuni (our Japanese friend) gave us a lift to the place where the buses depart to Kinabalu park (Ranau direction).
We were 8 people going to KP and one local guy going to Ranau on the bus. Almost 2 hours was the time spent from KK to KP.
after arriving we registered ourselves and paid the entrance, guide and bus transit in between the headquarters in KP and the path's starting point.
I have to say that Kuni helped us a lot booking in advance the lodging place in Laban rata heated dorm (3500m high). And I also have to say that it is not so cheap to climb this peak.
Around RM1000 was the complete compulsory price for 2 people. (around 200€)
Thanks Kuni, without you it had been even more and who knows if we would have heated dorm! ;)

Climbing up
The first part until Laban Rata, where we were spending one night, took us 3 hours, doing it in a very good time, and also rhythm!
It was 6km distance, so 2km/h was the speed. Pretty fast for the conditions of the path.
Big steps, some stones and windy parts. A stop of 10 mins was really needed to eat some energy bars, bananas and drinking some water to keep ourselves hydrated.
We really thought it was not so hard as it was, and once arrived we realised what we'd done...
But in the end, once sitting, eating rice and drinking Sabah tea, our strength cam back again and our mood was recovered.
During the afternoon we did nothing but eating, taking some pictures outside[Picture Laban rata] while the widn was freezing, trying to dry some sweated clothes outside the hut (with the help of some stones), playing some chess [Picture chess] and meeting new people from different nationalities as Australians, Germans, Italians, Malays and even Spanish ones.

Two Aussies from Tasmania were our roommates for that night. We shared a nice chat and some experiences, as well as some advices about Malaysia and our close next steps in the trip.
I really enjoyed your company guys! Nice to meet you Brett and Ashley!

Now I write these lines from bed as usual having my head-torch switched on and about to sleep at 20:30 because at 2:30 am the trail to the summit wants us active again!

The steepest, windiest, and coldest part is waiting for us, so I'll tell you in the next post how it looked like.
Good evening-night!

Mt Kinabalu
Laban Rata
20:30
31st July 2009