Jump to content
AVIC411.com

Car Heading in Degrees?


Recommended Posts

This has had me stumped for days and days now and is getting very frustrating. I'm hoping someone might have a bit of insight or a suggestion.

 

I want to display the car heading in degrees. I've scoured the .ui files and the software to try and find what I want, or clues to get me what I want. Here's what I have right now:

 

 

This displays an integer in a range of 0 to roughly 4100 which corresponds to the car's heading. It is obviously not degrees, but when the car turns or changes course, this integer changes. It is counter-clockwise though. Due north is 0, south is around 2000 or 2100, east is roughly 3000 and west is about 1000.

 

What I want is to get a simple readout in degress - 0 to 359 where east is 90 and west is 270 and so on. This variable, navigation.car_heading is definately displaying the car heading, it's just doing it in some wierd funky number system with which I am unfamiliar.

 

You can see in the attached image (sorry about the low quality) the heading does display 0 for north. That's what I'm trying to achieve... there must be a way to do it - the system knows which way to point the car arrow, which way to turn the compass in 3d mode... if it can rotate graphics around based on heading, it ought to be able to just display the heading text...

 

Thanks in advance!

post-21587-12872755309524_thumb.jpg

Link to post
Share on other sites
This displays an integer in a range of 0 to roughly 4100 which corresponds to the car's heading.

It's probably 0 to 4096 (2^11). Any chance that you can do math in a script? Multiplying the 0 to 4096 value by 0.087890625 will give you the 0 to 360 you want.

 

-Eric

Link to post
Share on other sites

You can do math in scripts I think.. the problem here is the heading is a real-time number and I don't think the math can be done real time... I'm playing around with the formatmodel function now, on a longshot. If formatmodel can set the display of time and date fields, maybe it can do something for integers...

 

Good call re. the 4096 - I wasn't thinking binary when I was trying to figure this out. The highest 'heading' value I've seen was 4077, when I was driving 'off road' in a large parking lot.

 

When you're on a road, it snaps the heading value from the road data, I think. Offroad though, it displays 'real' data as long as you're moving. When you stop it points you north. Which makes sense, as GPSs cannot figure out which way you're pointing, only which way you're moving.

 

Anyhow, if I don't get this heading thing solved by tomorrow I'm going to give up on it. I've worn out my google-fu trying to track down helpful info on it, and tried posting in a dedicated gps forum, but there doesn't seem to be any answers.

 

Cheers!

Link to post
Share on other sites

Hi Stephanie is there a way you can help me with the info box in lower left corner you are using I just want to add that function to my system but I have no idea how to do it, I've been looking for that in your last data.zip file but there's so many codes :shock: i hope you can help me.

Thank you

Link to post
Share on other sites

The N E S W function is a "Linear Compass". Search the navigatemenu_800_480.ui and the navigatemenu.ui files for LINEAR_COMPASS and you'll find the appropriate lines.

 

I created my own bmp files for the compass and the compass background. The bmp's that were in there didn't work right- they had east and west reversed, but the ones I created work correctly.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...