Home PageFacebookRSS News Feed
PocketGPS
Web
SatNav,GPS,Navigation
Pocket GPS World - SatNavs | GPS | Speed Cameras: Forums

Pocket GPS World :: View topic - SiRF raw measurements output
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in for private messagesLog in for private messages   Log inLog in 

SiRF raw measurements output

 
Post new topic   Reply to topic    Pocket GPS World Forum Index -> Advanced GPS Lounge
View previous topic :: View next topic  
Author Message
lawrence
Occasional Visitor


Joined: 30/07/2003 20:26:56
Posts: 3
Location: United Kingdom

PostPosted: Sun Sep 14, 2003 8:04 am    Post subject: SiRF raw measurements output Reply with quote

I have a SiRF EDK (SiRFstarIIe/LP).

I am developing a software to get the raw measurements from the receiver and process them with my algorithm. However, I got problem with the SiRF binary output. The data I need are pseudorange and carrier phase raw measurements, which can be obtained in SiRf binary output message id 5 or 28. I have tried to decode them but not all of them are correct. My program can identify the SiRF binary message id 5 and 28 and decode all one byte data and some two bytes data but none of 4 or 8 bytes data. Since SiRF chipset uses ARM CPU, the output of 4 or 8 bytes data should be long integer or IEEE 754 floating point single or double precision. I would like to ask:

i) Can SiRFstarIIe/LP output both SiRF binary message id 5 and 28?

ii) Regarding for message id 5 (in case I got valid output), I have tried to work out the pseudorange accounting to the brief steps in the SiRFstarIIe/LP Evaluation kit user's guide Feb 2002, however, I don't know the right method to work out the pseudorange from the given data and I have got the source code of calcpsr. Would you please tell me how to do this computation or where could I download the source code of calcpsr?

iii) Regarding for message id 28 (in case I got valid output), I got problem of convesion of binary (hex) data to ASCII data since I don't know how to work out the pseudorange and phase measurement. Are they in IEEE 754 floating point format? But it seems not.     

On the other hand, I tried to log the message id 28 using SiRFdemo 3.36 and copied and pasted the measurements to RINEX and then processed by commercial software, however, the positioning result is far away from my known position.

Could you please tell me how to get the right measurements from SiRF binary message id 28?

I have read Marc's messages. I would like to ask how to "interpret as integer values but as floating point numbers". The way I am doing is to convert hex binary to binary and then converting it to IEEE 754 floating point. Is it a correct way to do it?

Would you please help me?


_________________
lawrence
Back to top
View user's profile Send private message
DavidW
Pocket GPS Moderator
Pocket GPS Moderator


Joined: 17/05/2003 02:26:21
Posts: 3747
Location: Bedfordshire, UK

PostPosted: Sun Sep 14, 2003 8:04 am    Post subject: SiRF raw measurements output Reply with quote

The information I have implies that Message ID 5 is not valid in SiRFstar II - and therefore is probably not valid in SiRFstar IIe/LP.



The format of the pseudorange in Message ID 28 isn't something I can work out straightforwardly. The representation is documented as big-endian, and is clearly in a FP format - though precisely which I can't help you with.





Does that move you on any?









David
Back to top
View user's profile Send private message Send e-mail
lawrence
Occasional Visitor


Joined: 30/07/2003 20:26:56
Posts: 3
Location: United Kingdom

PostPosted: Sun Sep 14, 2003 8:04 am    Post subject: SiRF raw measurements output Reply with quote

Yes, I read it in some documents. Message ID 5 is not valid. However, I can decode it and work out receiver time within 100ms (when comparing with Message ID 7 output) from bit number, chip number, millisecond number. That's why I think the data in Message 5 is valid. The time has been tested for few days at different time and even after turning on and off. The reason for why it is within 100ms because my computation may not be the right method which SiRF is using, or the two messages are not received at the same time.

Do you mean you know how to convert SiRF hex binay to FP? I can decode Garmin's binary data using IEEE floating point 754 format (after reodering) but it doesn't work in SiRF. Even in the example of Message ID 28 in SiRF's document, it seems not standard IEEE FP. I have tried to reorder the code and scaling it, they don't work. I have asked some experts in FP on the web, they think the conversion in the example isn't a standard FP.

Would you please tell me how to convert it?     


_________________
lawrence
Back to top
View user's profile Send private message
DavidW
Pocket GPS Moderator
Pocket GPS Moderator


Joined: 17/05/2003 02:26:21
Posts: 3747
Location: Bedfordshire, UK

PostPosted: Sun Sep 14, 2003 8:04 am    Post subject: SiRF raw measurements output Reply with quote

Sorry - I'm afraid I don't know what FP format SiRF are using.



As you rightly said, ARM use IEEE 754 format for floating point numbers. I have worked in ARM assembler - though not with the floating point opcodes.



I don't have any SiRF documentation on what FP format they are using - all I'm doing is reading the documentation I have, which I suspect is very similar to the documentation you have. I suspect the easiest way ahead is to approach SiRF - or keep looking. If you figure it out, I'm interested to know the answer.







David
Back to top
View user's profile Send private message Send e-mail
ckuethe
Occasional Visitor


Joined: Aug 08, 2004
Posts: 18
Location: ECEF X/Y/Z: -1514741/-3483783/5106784 m

PostPosted: Mon Aug 09, 2004 12:01 am    Post subject: Re: SiRF raw measurements output Reply with quote

DavidW wrote:
Sorry - I'm afraid I don't know what FP format SiRF are using...


I don't have any SiRF documentation on what FP format they are using - all I'm doing is reading the documentation I have, which I suspect is very similar to the documentation you have. I suspect the easiest way ahead is to approach SiRF - or keep looking. If you figure it out, I'm interested to know the answer.


Reviving an old thread, as I'm hacking some code to mess about with my Rayming TN200 which is also SS IIe based.

All the documentation I've seen indicates that message 5 is invalid or undefined or unimplemented on SS II family chips. Still, I'll check to see if my module (FW 2.3.1) will send that message.

As for the format, I'm running on an i386 openbsd where floats are 4 bytes and doubles are 8. The uBlox documentation does mention that message 28 has 2 doubles, a float and another double. It also says:

GPS.G2-X-01003-E1.pdf wrote:
The (double) fields are 8-byte doube-precision floating point values. The two 32-bit-blocks are sorted in Little Endian order, but the 4 bytes in every 32-bit block are sorted in Big Endian order. The single-precision (float) fields are always arranged in Big Endian order."


To me, that would imply that you split the number you get back from the gps, swap the halves and then interpret that as a double.

Question: who can tell me what's in messages 27, 41 and 50? They are being generated once a second. The pdf Rayming has posted, the various uBlox pdfs I've found as well as some other things that all claim to document the SiRF protocol are silent on this. SiRF told me to go take a flying leap, and Rayming has not yet responded to my request for updated documentation.
Back to top
View user's profile Send private message Visit poster's website
ckuethe
Occasional Visitor


Joined: Aug 08, 2004
Posts: 18
Location: ECEF X/Y/Z: -1514741/-3483783/5106784 m

PostPosted: Wed Aug 25, 2004 5:06 am    Post subject: Reply with quote

Do a search for the u-blox sirf firmware documentation, perhaps at linkwave.co.uk ... ;) The use of message 5 is strongly discouraged, though my TN200 (GSW2 2.3.1) does generate this message and the data does appear to be valid.
_________________
http://www.ualberta.ca/~ckuethe/gps/
Back to top
View user's profile Send private message Visit poster's website
FarmGPS
Occasional Visitor


Joined: Nov 20, 2004
Posts: 1

PostPosted: Sat Nov 20, 2004 9:20 pm    Post subject: Re: SiRF raw measurements output Reply with quote

I had the same problem recently for my farm software on Pocket PC. This is how I solved it:

I decided to use message 28 and wrote a routine that takes a pointer to the 8 bytes and rearranges them in the correct order. I tested by putting the bytes from the example in the GPS.G2-X-01003-E1.pdf document (see ckuethe's post above) through and came out with the correct floating point value. Checked out the output from my GPS receiver and the pseudo ranges were within reasonable values and incrementing consistently for each satellite.

Code:


union SiRFDouble
   {
   BYTE Bytes[8];
   DOUBLE Float;
   };

void FixSiRFDouble(void* ValuePtr)
   {
   SiRFDouble* SD=(SiRFDouble*)ValuePtr;
   BYTE Temp;

   Temp=SD->Bytes[0];
   SD->Bytes[0]=SD->Bytes[3];
   SD->Bytes[3]=Temp;

   Temp=SD->Bytes[1];
   SD->Bytes[1]=SD->Bytes[2];
   SD->Bytes[2]=Temp;

   Temp=SD->Bytes[4];
   SD->Bytes[4]=SD->Bytes[7];
   SD->Bytes[7]=Temp;

   Temp=SD->Bytes[5];
   SD->Bytes[5]=SD->Bytes[6];
   SD->Bytes[6]=Temp;
   }


There may be a simpler way of doing it but this works. Hope this helps.

FarmGPS
Back to top
View user's profile Send private message
ckuethe
Occasional Visitor


Joined: Aug 08, 2004
Posts: 18
Location: ECEF X/Y/Z: -1514741/-3483783/5106784 m

PostPosted: Thu Feb 03, 2005 9:07 pm    Post subject: Reply with quote

Don't forget about host byte order. SiRF sends 32-bit quantities MSB first, but sends 64-bit quantities with the low 32 bits first. Pfff...

On a little-endian machine you want this:
01234567 (RDROETYB)

On a big-endian machine you want this
76543210 (BYTEORDR)

The SiRFStarII sends this
32107654 (ORDRBYTE)

A better transform might be two calls to ntohl() (no op on a big endian machine) followed by a 32bit swap (3 xor operations) between the low half and high half on a big endian machine. I think the xor-driven swap would be faster than the copy-driven swap. It's still 3 operations, but these can be kept in registers:

let A ^ A = 0, A^0 = A

r0 <- x, r1 <- y

r0 <- $r0 ^ $r1 = (x^y)
r1 <- $r0 ^ $r1 = (x^y)^y = x
r0 <- $r0 ^ $r1 = (x^y)^x = y

Thus, r0 = y and r1 = x. This transform works on pretty much any size of word.

I have not yet taken that into account in my library; for now I'm assuming IA32. I will eventually get around to writing better wrappers for all the bitfield junk. *sigh* Oh, and there are a few documentation bugs in SiRF's manuals. Thank goodness for overlap between message types allowing me to internally check consistency.
_________________
http://www.ualberta.ca/~ckuethe/gps/
Back to top
View user's profile Send private message Visit poster's website







Posted: Today    Post subject: Pocket GPS Advertising

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pocket GPS World Forum Index -> Advanced GPS Lounge All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Make a Donation



CamerAlert Database

Click here for the PocketGPSWorld.com Speed Camera Database

Download Speed Camera Database
22.044 (24 Apr 24)



WORLDWIDE SPEED CAMERA SPOTTERS WANTED!

Click here to submit camera positions to the PocketGPSWorld.com Speed Camera Database


12mth Subscriber memberships awarded every week for verified new camera reports!

Submit Speed Camera Locations Now


CamerAlert Apps



iOS QR Code






Android QR Code







© Terms & Privacy


GPS Shopping