Main Content

galalmanacread

Read data from Galileo XML almanac file

Since R2023b

    Description

    example

    data = galalmanacread(filename) reads data from the Galileo XML almanac file specified by filename, and returns the parameters of each associated satellite as a timetable.

    In Almanac format, the week number is aligned with the Galileo system time (GST). The GST start epoch is 13 seconds before 00:00 UTC on Sunday 22nd August 1999 (midnight between 21st and 22nd August).

    data = galalmanacread(filename,IssueDate=date) specifies the date of issue of the almanac file.

    Examples

    collapse all

    Read navigation data from a Galileo almanac file and use the navigation data to:

    • Get satellite positions, velocities, and IDs at a given timestamp.

    • Compute satellite visibility and look angles for a given receiver position by using the extracted satellite positions.

    First, read GPS navigation message data from a Galileo almanac file.

    filename = "galAlmanac_2019-08-06.xml";
    data = galalmanacread(filename)
    data=22×16 timetable
                Time            SVID    aSqRoot        ecc          deltai       omega0      omegaDot         w           m0            af0            af1        iod       t0a       wna     statusE5a    statusE5b    statusE1B
        ____________________    ____    ________    __________    __________    ________    ___________    ________    _________    ___________    ___________    ___    _________    ____    _________    _________    _________
    
        06-Aug-2019 08:39:42      1     0.011719    0.00022888     0.0030518    -0.11984    -1.8626e-09    -0.81259    -0.053925    -0.00066185     -7.276e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      2     0.017578    0.00010681     0.0030518    -0.11984    -1.8626e-09    -0.50497      0.63766     7.2479e-05              0     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      3     0.042969    0.00036621    -0.0076904    -0.78656    -1.7462e-09     -0.1449      0.94464    -0.00019646     -3.638e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      4     0.039062    0.00027466    -0.0076904    -0.78653    -1.7462e-09    -0.40698    -0.041412    -0.00033951     -7.276e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      5     0.042969    0.00021362    -0.0076904    -0.78656    -1.7462e-09    -0.33777     -0.61145    -0.00045967      3.638e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      7     0.042969    0.00041199    -0.0076904    -0.78656    -1.7462e-09      -0.285      0.58496    -0.00024033     -7.276e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      8     0.039062    0.00036621    -0.0057983      -0.789    -1.7462e-09    -0.19412      0.74414      0.0063114     -7.276e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42      9     0.039062    0.00045776    -0.0057983      -0.789    -1.7462e-09    -0.21506      -0.4855      0.0063572    -1.0914e-11     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     11     0.017578    0.00038147     0.0021973     0.54333    -1.7462e-09     0.28098      -0.3125      0.0056324    -1.0914e-11     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     12     0.015625     0.0002594     0.0021973     0.54333    -1.7462e-09     0.10056      0.12363      0.0062618     -1.819e-11     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     13     0.021484    1.5259e-05     0.0032349     0.54181    -1.7462e-09     0.23178      0.73837     0.00039101              0     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:29:42     15     0.017578    3.0518e-05     0.0032349     0.54178    -1.7462e-09    -0.60843     -0.19565     0.00090027              0     3     2.034e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     19     0.027344    0.00024414    -0.0058594    -0.78732    -1.7462e-09    -0.47565      0.30069    -3.8147e-06              0     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     21     0.021484    0.00022888     0.0029297    -0.12067    -1.8626e-09    -0.91656      0.30164    -0.00054741     -3.638e-12     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     24     0.011719    0.00024414     0.0022583    -0.11884    -1.8626e-09     0.27414      0.35886      0.0059395     -1.819e-11     4      2.04e+05    1041        0            0            0    
        06-Aug-2019 08:39:42     25     0.027344    0.00032043     0.0029297     -0.1207    -1.8626e-09     -0.7215     -0.89252      0.0017204    -1.0914e-11     4      2.04e+05    1041        0            0            0    
          ⋮
    
    

    Specify the timestamp for which to find the satellite positions, velocities, and IDs.

    t = datetime(2021,06,24,01,59,44)
    t = datetime
       24-Jun-2021 01:59:44
    
    

    Get the satellite positions, velocities, and IDs at the specified timestamp by using the gnssconstellation function.

    [satPos,satVel,satID] = gnssconstellation(t,data,GNSSFileType="galalmanac");

    Specify a receiver position in geodetic coordinates (latitude, longitude, altitude) to compute the satellite look angles and visibility.

    recPos = [42.3013162 -71.3782972 0];

    Specify the elevation mask angle for the receiver.

    maskAngle = 5;

    Compute the look angles and visibilities of satellite positions for the given receiver position. The vis output indicates which satellites are visible. Get the total using nnz.

    [az,el,vis] = lookangles(recPos,satPos,maskAngle);
    fprintf('%d satellites visible at %s.\n',nnz(vis),t)
    10 satellites visible at 24-Jun-2021 01:59:44.
    

    Plot the visible satellite positions with the elevation mask.

    figure
    skyplot(az(vis),el(vis),satID(vis),MaskElevation=maskAngle)

    Input Arguments

    collapse all

    Galileo XML almanac filename, specified as a string scalar or character vector. The filename can include an absolute path, relative path, or no path, but must include the file extension .xml.

    Example: "galAlmanac_2023-02-17.xml"

    Example: "mydir/galAlmanac_2023-02-17.xml"

    Example: "C:/mydir/galAlmanac_2023-02-17.xml"

    Data Types: char | string

    Almanac file issue date, specified as a datetime. This value enables the computation of the actual week number.

    Example: IssueDate=datetime("yesterday")

    Data Types: datetime

    Output Arguments

    collapse all

    Parameters of each satellite, returned as a timetable with a row for each record and a column for each parameter in that record. For more information on the Galileo almanac parameters definitions, see the almanac parameters table on the European GNSS Service Center site.

    ParameterData TypeDescription
    Timedatetime

    UTC Time, calculated using actual week number and t0a.

    SVIDdouble

    Satellite vehicle ID.

    aSqRootdouble

    Difference with respect to the square root of the nominal semimajor axis (29,600,000 m), in meters1/2.

    eccdouble

    Eccentricity of the orbit.

    deltaidouble

    Inclination angle offset from the nominal orbital inclination of 56 degrees, in semicircles.

    omega0double

    Longitude of the ascending node of the orbital plane at the weekly epoch, in semicircles.

    omegaDot double

    Rate of change in the measurement of the angle of right ascension, in semicircles per second.

    wdouble

    Argument of perigee, in semicircles.

    m0double

    Satellite mean anomaly at reference time, in semicircles.

    af0double

    Satellite clock correction bias (truncated), in seconds.

    af1double

    Satellite clock correction linear (truncated), in seconds per second.

    ioddouble

    Almanac Issue of Data.

    t0adouble

    Almanac reference time, in seconds.

    wnadouble

    Galileo week number, continuous, not mod(4).

    statusE5adouble

    Satellite E5a signal health status.

    statusE5bdouble

    Satellite E5b signal health status.

    statusE1Bdouble

    Satellite E1-B/C signal health status.

    References

    [1] European GNSS Service Centre (GSC). "Galileo Open Service Signal-In-Space Interface Control Document." Accessed March 13, 2023. https://www.gsc-europa.eu/sites/default/files/sites/all/files/Galileo_OS_SIS_ICD_v2.1.pdf.

    [2] European GNSS Service Centre (GSC). "Galileo Almanac." Accessed March 13, 2023. https://www.gsc-europa.eu/gsc-products/almanac.

    Version History

    Introduced in R2023b