The Following User Says Thank You to For This Useful Post: | ||
|
2012-07-12
, 12:07
|
Posts: 1,320 |
Thanked: 915 times |
Joined on Feb 2010
|
#122
|
Thanks for this perspicuous Fix, I like guys verifying behavior of modifications.
Now, the button to switch traffic on/off be refreshed properly ...
Also, I have reread all the thread, but not be able to find how to add the "auto" tick option, there is only the 2 original options "day" & "night" tick options.
If someone have the modification, feel free to put it here ...
A++
When you click on the toggle item for the traffic mode in the main settings screen, you can see that the label changes to "Hide traffic" for a fraction of a second before the screen is closed - But when the settings screen is opened again, the label is still set to "Show traffic". So I found out this small UI improvement:
In assistanceModeSettingsPage.qml, line 207 (inside the block "onBeforeShow:"), you can add the following line:
buttonModel.updateTraffic();
This will show the label "Hide traffic" and the corresponding icon if traffic has been activated.
Here is what i understood:
views\settings\mapModeSettingsPage.qml
uncomment the lines between 38 - 47
models\MapSettingsModel.qml
uncomment the lines between 88 - 91 and 129 - 163
views\assistancePage.qml
uncomment the lines between 100 - 105
sections of code that should have the /*, */ syntax removed.
So I took a look at http://en.wikipedia.org/wiki/Sunrise_equation and http://users.electromagnetic.net/bu/...unrise-set.php
The drive-qml approximation for the declination is legit, it is equation 3 from http://solardat.uoregon.edu/SolarRadiationBasics.html
What seems to be missing is probably a better approximation of the sun transit, i.e. the true sun noon.
Otherwise, just some signs were apparently wrong in the sunrise/sunset calculation, with that fixed, it works well enough for me.
This is the patch: http://paste.debian.net/download/178685
Or inline:
Code:--- /usr/lib/drive-qml/models/MapSettingsModel.qml.orig +++ /usr/lib/drive-qml/models/MapSettingsModel.qml @@ -135,8 +135,8 @@ var lat_rad = pos.latitude * (Math.PI/180); var declination = (23.4*Math.PI)/180 * Math.sin(2*Math.PI * (284+dayOfTheYear)/365); var omega = Math.acos(-Math.tan(declination) * Math.tan(lat_rad)); - var sunset = 12 - (1/15) * omega * (180/Math.PI) - pos.longitude/15 + today.getTimezoneOffset()/60; - var sunrise = 24 - sunset; //(1/15) * omega * (180/Math.PI) - pos.longitude/15 + today.getTimezoneOffset()/60; + var sunset = 12 + (1/15) * omega * (180/Math.PI) - pos.longitude/15 - today.getTimezoneOffset()/60; + var sunrise = 12 - (1/15) * omega * (180/Math.PI) - pos.longitude/15 - today.getTimezoneOffset()/60; console.log("Sunset:" + sunset); console.log("Sunrise:" + sunrise);
The Following 3 Users Say Thank You to godofwar424 For This Useful Post: | ||
|
2012-07-13
, 05:44
|
Posts: 173 |
Thanked: 83 times |
Joined on Dec 2011
|
#123
|
The Following User Says Thank You to nokiac For This Useful Post: | ||
|
2012-07-13
, 07:23
|
Posts: 141 |
Thanked: 417 times |
Joined on Jun 2012
@ Malaysia
|
#124
|
|
2012-07-13
, 09:15
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#125
|
|
2012-07-13
, 10:14
|
Posts: 88 |
Thanked: 38 times |
Joined on Feb 2012
|
#126
|
|
2012-07-13
, 10:37
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#127
|
|
2012-07-13
, 13:45
|
Posts: 59 |
Thanked: 36 times |
Joined on Nov 2009
|
#129
|
I wonder why they (Maps app developer teams) comment out the useful features before publish publicly.
|
2012-07-13
, 20:47
|
Posts: 458 |
Thanked: 783 times |
Joined on Jan 2010
@ France
|
#130
|
clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' (devel-su) ..." ; else echo "Ok, you are 'root' ..." ; if dpkg -l patch 2>/dev/null | grep -q ii ; then echo "Patch utility is already installed, you can continue with the procedure ..." ; else echo "Patch utility is not present, installing now ..." ; wget http://harmattan-dev.nokia.com/pool/harmattan/free/p/patch/patch_2.6-2+maemo7+0m6_armel.deb -O /root/patch_2.6-2+maemo7+0m6_armel.deb && dpkg -i /root/patch_2.6-2+maemo7+0m6_armel.deb && sync && echo "Done, you can continue with the procedure ..." ; fi ; fi
clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' (devel-su) ..." ; else rm /root/*.diff 2>/dev/null ; wget http://bigbob.fun.free.fr/N9/Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3.diff -O /root/Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3.diff && apt-get install -y --reinstall nokia-drive-qml maps && sync && patch -p0 -i /root/Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3.diff && sync ; fi
clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' (devel-su) ..." ; else rm /root/*.diff 2>/dev/null ; wget http://bigbob.fun.free.fr/N9/Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3+ETA-UNSTABLE.diff -O /root/Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3+ETA-UNSTABLE.diff && apt-get install -y --reinstall nokia-drive-qml maps && sync && patch -p0 -i /root/Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3+ETA-UNSTABLE.diff && sync ; fi
clear && ID=$(id -un) ; if [ ${ID} != "root" ] ; then echo "You are not 'root', please use this command line as 'root' (devel-su) ..." ; else rm /root/*.diff 2>/dev/null ; apt-get install -y --reinstall nokia-drive-qml maps && sync ; fi
The Following 49 Users Say Thank You to colin.stephane For This Useful Post: | ||
ajalkane, cddiede, ck2nb, freaksamael, fredson, ginggs, godofwar424, imaginaryenemy, Iosian, Iryus, jecargo22, jhwan, jimthefly, Jordi, Kallela, kb61, Kejml, Kozzi, Kroll, kskoda, mike_shenoda, minimos, miri, Mitrandir, Morpog, nailwood, olcell, P@t, Paul Ortyl, peterleinchen, praveenchand, rainisto, rooster13, sanmob, Schturman, somedude, sony123, SteveYoungs, taviman, thedead1440, topet2k12001, traysh, turbovomit, WhitP, Win7Mac, zehjotkah, zoolkhan |
http://talk.maemo.org/showpost.php?p...1&postcount=27