![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
Hello, my goal is to drive microsoft flight sim using an external data
source. I read the netpipes SDK and am in the process of creating the binary conversion program from my data source to the "flight video" ..fsr format. I have questions about the section regarding the "ObjectID" field in the "OBID" data section. According to the SDK: "The object ID is an ID for a class of objects. Specific instances of the object will be given a compound ID created from two keys. The object ID will be in the upper 4 bits of the word, and the lower 12 bits will be the instance ID. Because of this arrangement, the object ID in the Object Definition must be provided under the mask 0xf000. The lower 12 bits of this field MUST be 0 in this record." 3 questions arise from this. First, it's my assumption that this objectID has a direct relationship to a single plane i.e. the one you're flying. Am I correct? Second, if my first assumption is true then that means that there are only 4 bits or 16 unique IDs available. Meaning that there can only be 16 planes (15 surrounding + the one you're flying) that can be recorded/played back in the flight video. This seems small but then again, 16 planes in your field of view is a lot I guess. Again, is this a correct assumption? Third, I haven't worked with bitwise operations in a while. How do I get my identifying bits to the left-most 4 bit positions? i.e. WORD objectID = 12; would have the following bit positions: 0000000000001100 Since I need to use only the left-most 4 bit positions for my objectID, then I need to somehow move the rightmost 4 bits to the opposite side. How do I do this in c++? Thanks for any help/pointers anyone can provide. If I'm in the wrong group for this, please _kindly_ point me to the correct group. |
#2
|
|||
|
|||
![]()
I'm still waiting for the answer to the first 2 questions. I found the
answer to the third question. "var = 12" will shift the bits to the left 12 times which will move the right-most 4 bits to to the left-most 4 bits. |
#3
|
|||
|
|||
![]()
An email to Bill Leaming
might produce results. Worth a try, he's a bit of an expert on these things... Quilljar see http://client.webshots.com/album/194691959rhDQFi Do not reply personally, all such emails go into my spam filter |
#4
|
|||
|
|||
![]()
sorry, google groups removes e-mail addresses so I can't see it
![]() Any chance you can send me an email with it? |
#5
|
|||
|
|||
![]()
wrote:
sorry, google groups removes e-mail addresses so I can't see it ![]() Any chance you can send me an email with it? Have done. -- Quilljar see http://client.webshots.com/album/194691959rhDQFi Do not reply personally, all such emails go into my spam filter |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good | Excelsior | Home Built | 0 | April 22nd 05 01:11 AM |
VOR/DME Approach Question | Chip Jones | Instrument Flight Rules | 47 | August 29th 04 05:03 AM |
Special Flight Setup Question (COF) | Dudley Henriques | Simulators | 4 | October 11th 03 12:14 AM |