Skip to content
This repository has been archived by the owner on Jan 5, 2020. It is now read-only.

File format

Y3PP3R edited this page Nov 12, 2012 · 4 revisions

.SMS files

Probably IRIDIUM satelitte network specific file format / message protocol. They are not standard PDUs. Examples in the /doc directory.

The files are best read in a hex-editor. They have a common header, a message size, and a message.

The common header / overall structure of the files is unknown, only the word IRIDIUM can be read near the start of the file. Also a byte with the length of the message is decoded.

The message has a repeating part that contains a couple of datetime, latitude, longitude, altitude, ... sentences. The last part of the sentence is not yet understood.

Example files

a) filename: Collar07854_100806210058.SMS

b) filename: Collar07854_100807060011.SMS

Common header

074952494449554d0000000000000000000000000000000000000000000000
040f33303030333430313232393738393000000000000000000000000000000000f10a

Variable header examples

a) 0806100028008c

b) 0807020038008c

In these examles, 8c is the length of the message (140, counting from 0)

Message examples

a)

  13ef 348a 0039 d0fe 000d e871 004c c92b 5ca9 2d62
  13ef 2664 0039 d108 000d e86b 004c c92d 5ca9 2d5d
  13ef 1862 0039 d101 000d e865 004c c92c 5ca9 2d58
  13ef 0a93 0039 d0fc 000d e864 004c c931 1c68 2d54
  13ee fc17 0039 d045 000d e7d4 004c c95b 7c69 2c50
  13ee ee28 0039 d0ff 000d e85f 004c c92a 7c69 2d6f
  ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff
  ff

b)

  13ef b2eb 0039 d0ed 000d e853 004c c92e 3cea 2d88
  13ef a506 0039 d0fb 000d e860 004c c929 1c6a 2d84
  13ef 96fd 0039 d0fc 000d e85e 004c c92d 5c6a 2d7f
  13ef 88e0 0039 d0f6 000d e85a 004c c92b 5c6a 2d7b
  13ef 7ad8 0039 d0fa 000d e85a 004c c932 7c6a 2d77
  ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff
  ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff
  ff

Decoding a message sentence

David Stibbe found out first two groups are the date, in seconds from 01-01-2012 00:00 GMT: eg. 13ef348a = 334443658. 334443658 seconds = 10 years, 8 months, 6 days, 23:00:58. This matches the date in the title of the first sms: Collar07854_ 100806 210058 . It even matches the timestamp minus 2 hrs in the title.

Second two groups are latitude, then two for longitude and two for altitude, as integers. Last two groups are unknown.

Algorithm to translate the coordinates, as found by Roy van Rijn:

public static double[] xyz2LLH(double x, double y, double z)
{
    double[] llh = new double[3];
    double da = 0.0; // datum parameter
    double df = 0.0; // datum parameter
    double a = 6378137 - da;
    double f = 1 / 298.2572235630 - df;
    double b = (1 - f) * a;
    double e2 = 2 * f - f * f;
    double E2 = (a * a - b * b) / (b * b);
    double p = Math.sqrt(x * x + y * y);
    llh[0] = Math.atan2(y, x);
    double theta = Math.atan((z * a) / (p * b));
    llh[1] = Math.atan((z + E2 * b * Math.pow(Math.sin(theta), 3)) / (p - e2 * a * Math.pow(Math.cos(theta), 3)));
    double N = a / Math.sqrt(1 - e2 * Math.sin(llh[1]) * Math.sin(llh[1]));
    llh[2] = p / Math.cos(llh[1]) - N;
    llh[0] = Math.toDegrees(llh[0]);
    llh[1] = Math.toDegrees(llh[1]);
    return llh;
}