Search Archive

Bug - Speed Limit when displaying KM/H (Calling Canadians!)

By spadabear · Apr 11, 2009in Hacks/Mods💬 40 posts👁️ 3,458 views
Page 1 of 2
Posted Apr 11, 2009 · 23:35 UTC#1

I am running the AVIC in Canada. I have my preferences set to Kilometers/Meters. When I drive on roads that the AVIC has speed limit information, it seems to be reading it as Miles per Hour, but then converting it over to Kilometers per Hour. For Example, if I am on a Highway with a posted speed limit of 100 KM/H the unit shows me the posted speed limit as 160 KM/H. I am running cmh928's Mod. If anyone can point me in the right direction as to where I should start looking at the software it would be greatly appreciated.

 

Is anyone else on this board that is in Canada and experiencing the same problem? It would be helpful to get info on this.

Posted Apr 11, 2009 · 23:42 UTC#2

You need to set your system preferences to meters/Kilometers as well. Under regional settings.

Posted Apr 12, 2009 · 00:03 UTC#3
You need to set your system preferences to meters/Kilometers as well. Under regional settings.

 

My regional settings are set to Kilometers/Meters. It appears to me that what ever the AVIC uses to apply the conversions isn't being applied to the speedlimit warning

Posted Apr 12, 2009 · 01:52 UTC#4

Or it might be the map data only has the MPH value. IDT commented that Canadian map data is screwed up when it comes to speeds..

Posted Apr 12, 2009 · 08:33 UTC#5
Or it might be the map data only has the MPH value. IDT commented that Canadian map data is screwed up when it comes to speeds..

 

yes, canadian maps are screwed up, in my area it's very seldom that the speed limit sign appears and when it appears it s always wrong, for example trans canda highway 1 always show a speed limit of 97 and 117

Posted Apr 12, 2009 · 16:42 UTC#6
Or it might be the map data only has the MPH value. IDT commented that Canadian map data is screwed up when it comes to speeds..

 

yes, canadian maps are screwed up, in my area it's very seldom that the speed limit sign appears and when it appears it s always wrong, for example trans canda highway 1 always show a speed limit of 97 and 117

 

Sorry, but I'm way behind on this stuff. I've only had my unit for 2 months now and the amount of info on this forum is staggering.

 

I believe the map data is accurate. The problem seems to be that the AVIC recognizes it as MPH on the Canada maps then does a conversion to KM/H. 1 miles = 1.609344 kilometers. On a highway with a posted limit of 100 KM/H the AVIC displays it as 161, rounded up from 160.9344.

 

I'm wondering if there is a way to fix this in the code. Coding is something I have yet to take on. Any help as to where to start would be greatly appreciated.

Posted Apr 12, 2009 · 17:32 UTC#7

i guess your right, i checked and had a simulation and found out that even if the units kmh it cnverts it to miles, i'll try to look into this,

Posted Apr 12, 2009 · 17:55 UTC#8
i guess your right, i checked and had a simulation and found out that even if the units kmh it cnverts it to miles, i'll try to look into this,

 

Thanks IDT. I wish I could be of a greater help, but I really have no idea how the information is called from the map. I'm sure if the system recognizes which map it is calling info from there must be a way to stop the conversion.

Posted Apr 12, 2009 · 18:04 UTC#9
i guess your right, i checked and had a simulation and found out that even if the units kmh it cnverts it to miles, i'll try to look into this,

 

Thanks IDT. I wish I could be of a greater help, but I really have no idea how the information is called from the map. I'm sure if the system recognizes which map it is calling info from there must be a way to stop the conversion.

 

yes, but i don't think that it would be that easy, the way i see it is that speed limits has a fixed value, when in the unit settings mph is selected it displays those values as is, and when kph is selected it converts it kph, i think the best way to go with this is by scripting something to display those values as is,

Posted Apr 15, 2009 · 03:11 UTC#10

so far nothing yet, i have tried doing some scrips with the help of Borism and still nothing, help from anyone with an advanced knowledge of scripting would be very much appreciated,

 

this is where i am at right now,

 

declared a variable in model_variables.ui

 

.navigation.waypoints.findpath_on_modify 1

vMapNorthUpOnAutoZoom.boolmodel "smartzoom.overview"

vNorthUpAutoZoomValue.valuemodel "smartzoom.overview_zoomlevel.value"

vNorthUpAutoZoomDistance.valuemodel "smartzoom.overview_distance.value"

nBuildingDistance.valuemodel "map.3d_buildings_distance"

nTerrainDetail.valuemodel "map.3d_dem_detail"

nDynamicVolumeType.valuemodel "sound.dynamic_volume_type"

sGeoCodingStatus.textmodel_wstr "other.geocoding.status"

sGeoCodingStatus.onchange "sc_GeoCodingFinished"

.poi.inherit_visibility vPoiSubgroups

speedlimitcustvar.valuemodel "navigation.current_speed_limit.value"

speedlimitcustvar.onchange sc_CustomSpeedDisplay

 

and creeated a script that looks something like this and placed it in in navigatemap.ui

 

runif %navigation.current_speed_limit.value<16 speedlimitcustvar.set 10

else_runif %navigation.current_speed_limit.value<24 speedlimitcustvar.set 15

 

and replaced the textmodel in navigatemap_800_480.ui calling for navigation.current_speed_limit.value

 

 

and after all that still nothing, can't even get pass up the system loading screen, any ideas anyone

Posted Apr 15, 2009 · 12:01 UTC#11
so far nothing yet, i have tried doing some scrips with the help of Borism and still nothing, help from anyone with an advanced knowledge of scripting would be very much appreciated,

 

this is where i am at right now,

 

declared a variable in model_variables.ui

 

.navigation.waypoints.findpath_on_modify 1

vMapNorthUpOnAutoZoom.boolmodel "smartzoom.overview"

vNorthUpAutoZoomValue.valuemodel "smartzoom.overview_zoomlevel.value"

vNorthUpAutoZoomDistance.valuemodel "smartzoom.overview_distance.value"

nBuildingDistance.valuemodel "map.3d_buildings_distance"

nTerrainDetail.valuemodel "map.3d_dem_detail"

nDynamicVolumeType.valuemodel "sound.dynamic_volume_type"

sGeoCodingStatus.textmodel_wstr "other.geocoding.status"

sGeoCodingStatus.onchange "sc_GeoCodingFinished"

.poi.inherit_visibility vPoiSubgroups

speedlimitcustvar.valuemodel "navigation.current_speed_limit.value"

speedlimitcustvar.onchange sc_CustomSpeedDisplay

 

and creeated a script that looks something like this and placed it in in navigatemap.ui

 

runif %navigation.current_speed_limit.value<16 speedlimitcustvar.set 10

else_runif %navigation.current_speed_limit.value<24 speedlimitcustvar.set 15

 

and replaced the textmodel in navigatemap_800_480.ui calling for navigation.current_speed_limit.value

 

 

and after all that still nothing, can't even get pass up the system loading screen, any ideas anyone

 

If I come across a problem where the unit won't start after a change I always break it down into little pieces and see what part causes the unit to not start. In your case I would probably do something like.

 

1. Declare the variable and script

2. Add the valuemodel and onchange part

3. Add the text display in navigatemap_800_480.ui

 

After each step I would install the changes and see at what stage the unit stopped starting and that would at least give you somewhere to focus.

 

Looking at your code a couple of things I notice that may or may not be causing problems.

 

1. speedlimitcustvar.onchange sc_CustomSpeedDisplay - I think the sc_CustomSpeedDisplay should be between "".

2. I also think in your script there should be spaces between the variable, < and the value and the set between ' ' and you may want to try the 10 between "" like

runif %navigation.current_speed_limit.value < 16 'speedlimitcustvar.set "10"'

 

I don't know if these are what is causing your problems but it's the way I have seen these things done in the past and I know from experience that stupid things that you would think are insignificant can cause the unit to hang on startup.

 

The only other thing is I've never noticed a variable be defined with a valuemodel and onchange clause and then the variable be changed in the script so it maybe worth declaring another variable purely for the display value.

 

As usual I could be talking complete rubbish as I don't claim to be an expert on the black art of this! lol

Posted Apr 15, 2009 · 15:14 UTC#12

tried what GTIMATT's suggestion and it booted when i declared the variable and valuemodel and onchange and it booted fine, when i added the script it won't get the past the start up message, any ideas

Posted Apr 15, 2009 · 15:50 UTC#13
tried what GTIMATT's suggestion and it booted when i declared the variable and valuemodel and onchange and it booted fine, when i added the script it won't get the past the start up message, any ideas

 

Ouch. I think I see the problem.

 

speedlimitcustomvar is declared as having a valuemodel (the speed limit). Therefore, its value is set automagically by iGO. You can't do a .SET on it.

 

Declare a new variable () , and set its value in the script.

Posted Apr 15, 2009 · 16:00 UTC#14
tried what GTIMATT's suggestion and it booted when i declared the variable and valuemodel and onchange and it booted fine, when i added the script it won't get the past the start up message, any ideas

 

Ouch. I think I see the problem.

 

speedlimitcustomvar is declared as having a valuemodel (the speed limit). Therefore, its value is set automagically by iGO. You can't do a .SET on it.

 

Declare a new variable () , and set its value in the script.

 

so i'll declare that in model_variables.ui?

and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set?

Posted Apr 15, 2009 · 16:03 UTC#15
so i'll declare that in model_variables.ui?

and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set?

 

Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter...

Posted Apr 15, 2009 · 16:19 UTC#16
so i'll declare that in model_variables.ui?

and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set?

 

Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter...

 

added this variable to navigatemap,ui

and then changed this

 

runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"'

 

end result, still the same

 

should i replace the code from above to this?

 

runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"'

Posted Apr 15, 2009 · 16:34 UTC#17
so i'll declare that in model_variables.ui?

and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set?

 

Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter...

 

added this variable to navigatemap,ui

and then changed this

 

runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"'

 

end result, still the same

 

should i replace the code from above to this?

 

runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"'

 

I wouldn't the first line looks fine, I have code running that's formatted that way.

Posted Apr 15, 2009 · 16:36 UTC#18
added this variable to navigatemap,ui

and then changed this

 

runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"'

 

end result, still the same

 

should i replace the code from above to this?

 

runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"'

 

Strange... May bew remove the '%'? I'll try a few things in the meanwhile...

Posted Apr 15, 2009 · 17:05 UTC#19
Strange... May bew remove the '%'? I'll try a few things in the meanwhile...

 

OK, fixed! :)

 

Here's the deal:

 

in model_variables:


vSpeedLimit.valuemodel "navigation.current_speed_limit.value"
vSpeedLimit.onchange "sc_SpeedLimit"

 

In navigatemap.ui in :

 

And in the st_NavigateMap somewhere add a script with something like this:


 

Obviously adjust speeds and what you want to show...

 

And finally in navigatemap_800_480.ui find the text element that shows the speed and do something like


 

Never mind fonts and all -- I was testing this on an HP IPAQ emulator for the PC, and it does work there.

Posted Apr 15, 2009 · 23:12 UTC#20
Strange... May bew remove the '%'? I'll try a few things in the meanwhile...

 

OK, fixed! :)

 

Here's the deal:

 

in model_variables:


vSpeedLimit.valuemodel "navigation.current_speed_limit.value"
vSpeedLimit.onchange "sc_SpeedLimit"

 

In navigatemap.ui in :

 

And in the st_NavigateMap somewhere add a script with something like this:


 

Obviously adjust speeds and what you want to show...

 

And finally in navigatemap_800_480.ui find the text element that shows the speed and do something like


 

Never mind fonts and all -- I was testing this on an HP IPAQ emulator for the PC, and it does work there.

 

one last thing, why is it that there's two text elements in the code above?

Posted Apr 15, 2009 · 23:21 UTC#21
one last thing, why is it that there's two text elements in the code above?

 

Bad cut and paste :) There's a text element that shows units there...

Posted Apr 15, 2009 · 23:29 UTC#22
one last thing, why is it that there's two text elements in the code above?

 

Bad cut and paste :) There's a text element that shows units there...

 

ok then, evermind the 2nd text element as i don't want it to show up anyways

Posted Apr 16, 2009 · 02:33 UTC#23

got everything set up but still not able to get it to display the the new assigned value,

Posted Apr 16, 2009 · 03:32 UTC#24
got everything set up but still not able to get it to display the the new assigned value,

 

Strange... Can you put something in the onchange script that you would immediately notice?

Posted Apr 16, 2009 · 05:59 UTC#25
got everything set up but still not able to get it to display the the new assigned value,

 

Strange... Can you put something in the onchange script that you would immediately notice?

 

something like?

Page 1 of 2