2012-01-16 22:01:29 +00:00
/*!
* \ file gnss_satellite . cc
* \ brief Implementation of the Gnss_Satellite class
* \ author Carles Fernandez - Prades , 2012. cfernandez ( at ) cttc . es
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*
2018-05-13 20:49:11 +00:00
* Copyright ( C ) 2010 - 2018 ( see AUTHORS file for a list of contributors )
2012-01-16 22:01:29 +00:00
*
* GNSS - SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS - SDR .
*
* GNSS - SDR is free software : you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
2014-09-14 17:08:32 +00:00
* ( at your option ) any later version .
2012-01-16 22:01:29 +00:00
*
* GNSS - SDR is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2018-05-13 20:49:11 +00:00
* along with GNSS - SDR . If not , see < https : //www.gnu.org/licenses/>.
2012-01-16 22:01:29 +00:00
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
2012-01-19 07:35:49 +00:00
2012-01-16 22:01:29 +00:00
# include "gnss_satellite.h"
# include <glog/logging.h>
Gnss_Satellite : : Gnss_Satellite ( )
{
Gnss_Satellite : : reset ( ) ;
}
2018-08-13 23:13:07 +00:00
Gnss_Satellite : : Gnss_Satellite ( const std : : string & system_ , uint32_t PRN_ )
2012-01-16 22:01:29 +00:00
{
Gnss_Satellite : : reset ( ) ;
Gnss_Satellite : : set_system ( system_ ) ;
Gnss_Satellite : : set_PRN ( PRN_ ) ;
Gnss_Satellite : : set_block ( system_ , PRN_ ) ;
}
2018-12-02 13:32:22 +00:00
Gnss_Satellite : : ~ Gnss_Satellite ( ) = default ;
2012-01-16 22:01:29 +00:00
void Gnss_Satellite : : reset ( )
{
2017-06-01 23:58:59 +00:00
system_set = { " GPS " , " Glonass " , " SBAS " , " Galileo " , " Beidou " } ;
2012-01-27 18:01:17 +00:00
satelliteSystem [ " GPS " ] = " G " ;
2017-06-01 23:58:59 +00:00
satelliteSystem [ " Glonass " ] = " R " ;
2012-01-27 18:01:17 +00:00
satelliteSystem [ " SBAS " ] = " S " ;
satelliteSystem [ " Galileo " ] = " E " ;
2014-09-14 17:08:32 +00:00
satelliteSystem [ " Beidou " ] = " C " ;
2012-01-16 22:01:29 +00:00
PRN = 0 ;
system = std : : string ( " " ) ;
block = std : : string ( " " ) ;
2012-01-19 07:35:49 +00:00
rf_link = 0 ;
2012-01-16 22:01:29 +00:00
}
2018-03-03 01:03:39 +00:00
std : : ostream & operator < < ( std : : ostream & out , const Gnss_Satellite & sat ) // output
2012-01-19 07:35:49 +00:00
{
2018-12-02 13:32:22 +00:00
std : : string tag ;
std : : string tag2 ;
if ( sat . get_system ( ) = = " Galileo " ) tag = " E " ;
2018-03-03 01:03:39 +00:00
if ( sat . get_PRN ( ) < 10 ) tag2 = " 0 " ;
2016-05-02 13:11:43 +00:00
out < < sat . get_system ( ) < < " PRN " < < tag < < tag2 < < sat . get_PRN ( ) < < " (Block " < < sat . get_block ( ) < < " ) " ;
2012-01-19 07:35:49 +00:00
return out ;
}
2018-03-03 01:03:39 +00:00
bool operator = = ( const Gnss_Satellite & sat1 , const Gnss_Satellite & sat2 )
2012-01-19 07:35:49 +00:00
{
bool equal = false ;
2018-12-02 13:32:22 +00:00
if ( sat1 . get_system ( ) = = sat2 . get_system ( ) )
2012-01-19 07:35:49 +00:00
{
2018-12-02 13:32:22 +00:00
if ( sat1 . get_PRN ( ) = = sat2 . get_PRN ( ) )
2012-01-19 07:35:49 +00:00
{
equal = true ;
}
}
return equal ;
}
2012-01-16 22:01:29 +00:00
2012-01-20 23:28:11 +00:00
/*
Gnss_Satellite & Gnss_Satellite : : operator = ( const Gnss_Satellite & rhs ) {
// Only do assignment if RHS is a different object from this.
if ( this ! = & rhs ) {
// Deallocate, allocate new space, copy values...
const std : : string system_ = rhs . get_system ( ) ;
2018-08-13 23:13:07 +00:00
const uint32_t PRN_ = rhs . get_PRN ( ) ;
2012-01-20 23:28:11 +00:00
const std : : string block_ = rhs . get_block ( ) ;
2018-08-13 23:13:07 +00:00
// const int32_t rf_link_ = 0;
2012-01-20 23:28:11 +00:00
this - > set_system ( system_ ) ;
this - > set_PRN ( PRN_ ) ;
this - > set_block ( system_ , PRN_ ) ;
//this.rf_link = rf_link_;
}
return * this ;
} */
2012-01-16 22:01:29 +00:00
2014-09-14 17:08:32 +00:00
void Gnss_Satellite : : set_system ( const std : : string & system_ )
2012-01-16 22:01:29 +00:00
{
2017-06-01 23:58:59 +00:00
// Set the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Compass"}
2018-12-03 15:25:11 +00:00
auto it = system_set . find ( system_ ) ;
2012-01-16 22:01:29 +00:00
2018-03-03 01:03:39 +00:00
if ( it ! = system_set . cend ( ) )
2012-01-16 22:01:29 +00:00
{
system = system_ ;
}
else
{
2017-06-01 23:58:59 +00:00
DLOG ( INFO ) < < " System " < < system_ < < " is not defined {GPS, Glonass, SBAS, Galileo, Beidou}. Initialization? " ;
2018-03-03 01:03:39 +00:00
system = std : : string ( " " ) ;
2012-01-16 22:01:29 +00:00
}
}
2018-08-13 23:13:07 +00:00
void Gnss_Satellite : : update_PRN ( uint32_t PRN_ )
2017-10-19 19:22:55 +00:00
{
2018-12-02 13:32:22 +00:00
if ( system ! = " Glonass " )
2018-02-25 21:49:06 +00:00
{
DLOG ( INFO ) < < " Trying to update PRN for not GLONASS system " ;
PRN = 0 ;
}
2017-10-19 19:22:55 +00:00
else
2018-02-25 21:49:06 +00:00
{
if ( PRN_ < 1 or PRN_ > 24 )
{
DLOG ( INFO ) < < " This PRN is not defined " ;
// Adjusting for PRN 26, now used in
PRN = PRN_ ;
}
else
{
PRN = PRN_ ;
}
}
2017-10-19 19:22:55 +00:00
}
2012-01-16 22:01:29 +00:00
2018-08-13 23:13:07 +00:00
void Gnss_Satellite : : set_PRN ( uint32_t PRN_ )
2012-01-16 22:01:29 +00:00
{
// Set satellite's PRN
2018-12-02 13:32:22 +00:00
if ( system . empty ( ) )
2012-01-16 22:01:29 +00:00
{
2012-01-20 23:28:11 +00:00
DLOG ( INFO ) < < " Trying to define PRN while system is not defined " ;
2012-01-16 22:01:29 +00:00
PRN = 0 ;
}
2018-12-02 13:32:22 +00:00
if ( system = = " GPS " )
2012-01-16 22:01:29 +00:00
{
2013-10-25 16:07:24 +00:00
if ( PRN_ < 1 or PRN_ > 32 )
2012-01-16 22:01:29 +00:00
{
2012-01-20 23:28:11 +00:00
DLOG ( INFO ) < < " This PRN is not defined " ;
2012-01-16 22:01:29 +00:00
PRN = 0 ;
}
else
{
PRN = PRN_ ;
}
}
2018-12-02 13:32:22 +00:00
else if ( system = = " Glonass " )
2018-02-25 21:49:06 +00:00
{
if ( PRN_ < 1 or PRN_ > 24 )
{
DLOG ( INFO ) < < " This PRN is not defined " ;
PRN = 0 ;
}
else
{
PRN = PRN_ ;
}
}
2018-12-02 13:32:22 +00:00
else if ( system = = " SBAS " )
2012-01-16 22:01:29 +00:00
{
2018-08-21 14:41:07 +00:00
if ( PRN_ = = 120 )
2018-03-03 01:03:39 +00:00
{
PRN = PRN_ ;
2018-08-21 14:41:07 +00:00
} // EGNOS Test Platform.Inmarsat 3-F2 (Atlantic Ocean Region-East)
else if ( PRN_ = = 123 )
2018-03-03 01:03:39 +00:00
{
PRN = PRN_ ;
2018-08-21 14:41:07 +00:00
} // EGNOS Operational Platform. Astra 5B
else if ( PRN_ = = 131 )
2018-03-03 01:03:39 +00:00
{
PRN = PRN_ ;
2018-08-21 14:41:07 +00:00
} // WAAS Eutelsat 117 West B
else if ( PRN_ = = 135 )
2018-03-03 01:03:39 +00:00
{
PRN = PRN_ ;
2018-08-21 14:41:07 +00:00
} // WAAS Galaxy 15
else if ( PRN_ = = 136 )
2018-03-03 01:03:39 +00:00
{
PRN = PRN_ ;
2018-08-21 14:41:07 +00:00
} // EGNOS Operational Platform. SES-5 (a.k.a. Sirius 5 or Astra 4B)
else if ( PRN_ = = 138 )
{
PRN = PRN_ ;
} // WAAS Anik F1R
2012-01-16 22:01:29 +00:00
else
{
2012-01-20 23:28:11 +00:00
DLOG ( INFO ) < < " This PRN is not defined " ;
2012-01-16 22:01:29 +00:00
PRN = 0 ;
}
}
2018-12-02 13:32:22 +00:00
else if ( system = = " Galileo " )
2013-10-25 16:07:24 +00:00
{
2018-02-25 21:49:06 +00:00
if ( PRN_ < 1 or PRN_ > 36 )
{
DLOG ( INFO ) < < " This PRN is not defined " ;
PRN = 0 ;
}
else
{
PRN = PRN_ ;
}
2013-10-25 16:07:24 +00:00
}
2018-12-18 21:55:36 +00:00
else if ( system = = " Beidou " )
2018-07-06 12:42:13 +00:00
{
2018-12-18 21:55:36 +00:00
if ( PRN_ < 1 or PRN_ > 37 )
2018-07-06 12:42:13 +00:00
{
DLOG ( INFO ) < < " This PRN is not defined " ;
PRN = 0 ;
}
else
{
PRN = PRN_ ;
}
}
2012-01-16 22:01:29 +00:00
else
{
2012-01-20 23:28:11 +00:00
DLOG ( INFO ) < < " System " < < system < < " is not defined " ;
2012-01-16 22:01:29 +00:00
PRN = 0 ;
}
}
2018-08-13 23:13:07 +00:00
int32_t Gnss_Satellite : : get_rf_link ( ) const
2018-01-21 19:36:42 +00:00
{
// Get satellite's rf link. Identifies the GLONASS Frequency Channel
2018-08-13 23:13:07 +00:00
int32_t rf_link_ ;
2018-01-21 19:36:42 +00:00
rf_link_ = rf_link ;
return rf_link_ ;
}
2012-01-16 22:01:29 +00:00
2018-08-13 23:13:07 +00:00
uint32_t Gnss_Satellite : : get_PRN ( ) const
2012-01-16 22:01:29 +00:00
{
// Get satellite's PRN
2018-08-13 23:13:07 +00:00
uint32_t PRN_ ;
2012-01-16 22:01:29 +00:00
PRN_ = PRN ;
return PRN_ ;
}
2012-01-19 07:35:49 +00:00
std : : string Gnss_Satellite : : get_system ( ) const
2012-01-16 22:01:29 +00:00
{
2017-06-01 23:58:59 +00:00
// Get the satellite system {"GPS", "Glonass", "SBAS", "Galileo", "Beidou"}
2012-01-16 22:01:29 +00:00
std : : string system_ ;
system_ = system ;
return system_ ;
}
2018-02-25 21:49:06 +00:00
2012-01-27 18:01:17 +00:00
std : : string Gnss_Satellite : : get_system_short ( ) const
{
2012-01-31 00:03:08 +00:00
// Get the satellite system {"G", "R", "S", "E", "C"}
2012-01-27 18:01:17 +00:00
return satelliteSystem . at ( system ) ;
}
2012-01-16 22:01:29 +00:00
2012-01-19 07:35:49 +00:00
std : : string Gnss_Satellite : : get_block ( ) const
2012-01-16 22:01:29 +00:00
{
// Get the satellite block
std : : string block_ ;
block_ = block ;
return block_ ;
}
2018-08-13 23:13:07 +00:00
std : : string Gnss_Satellite : : what_block ( const std : : string & system_ , uint32_t PRN_ )
2012-01-16 22:01:29 +00:00
{
2015-05-25 17:43:29 +00:00
std : : string block_ = " Unknown " ;
2018-12-02 13:32:22 +00:00
if ( system_ = = " GPS " )
2012-01-16 22:01:29 +00:00
{
2018-02-25 21:49:06 +00:00
// info from https://www.navcen.uscg.gov/?Do=constellationStatus
2018-03-03 01:03:39 +00:00
switch ( PRN_ )
{
case 1 :
block_ = std : : string ( " IIF " ) ; // Plane D
break ;
case 2 :
block_ = std : : string ( " IIR " ) ; // Plane D
break ;
case 3 :
block_ = std : : string ( " IIF " ) ; // Plane E
break ;
case 4 :
block_ = std : : string ( " Unknown " ) ;
break ;
case 5 :
block_ = std : : string ( " IIR-M " ) ; // Plane E
break ;
case 6 :
block_ = std : : string ( " IIF " ) ; // Plane D
break ;
case 7 :
block_ = std : : string ( " IIR-M " ) ; // Plane A
break ;
case 8 :
block_ = std : : string ( " IIF " ) ; // Plane C
break ;
case 9 :
block_ = std : : string ( " IIF " ) ; // Plane F
break ;
case 10 :
block_ = std : : string ( " IIF " ) ; // Plane E
break ;
case 11 :
block_ = std : : string ( " IIR " ) ; // Plane D
break ;
case 12 :
block_ = std : : string ( " IIR-M " ) ; // Plane B
break ;
case 13 :
block_ = std : : string ( " IIR " ) ; // Plane F
break ;
case 14 :
block_ = std : : string ( " IIR " ) ; // Plane F
break ;
case 15 :
block_ = std : : string ( " IIR-M " ) ; // Plane F
break ;
case 16 :
block_ = std : : string ( " IIR " ) ; // Plane B
break ;
case 17 :
block_ = std : : string ( " IIR-M " ) ; // Plane C
break ;
case 18 :
block_ = std : : string ( " IIR " ) ; // Plane E
break ;
case 19 :
block_ = std : : string ( " IIR " ) ; // Plane D
break ;
case 20 :
block_ = std : : string ( " IIR " ) ; // Plane B
break ;
case 21 :
block_ = std : : string ( " IIR " ) ; // Plane D
break ;
case 22 :
block_ = std : : string ( " IIR " ) ; // Plane E
break ;
case 23 :
block_ = std : : string ( " IIR " ) ; // Plane F
break ;
case 24 :
block_ = std : : string ( " IIF " ) ; // Plane A
break ;
case 25 :
block_ = std : : string ( " IIF " ) ; // Plane B
break ;
case 26 :
block_ = std : : string ( " IIF " ) ; // Plane B
break ;
case 27 :
block_ = std : : string ( " IIF " ) ; // Plane C
break ;
case 28 :
block_ = std : : string ( " IIR " ) ; // Plane B
break ;
case 29 :
block_ = std : : string ( " IIR-M " ) ; // Plane C
break ;
case 30 :
block_ = std : : string ( " IIF " ) ; // Plane A
break ;
case 31 :
block_ = std : : string ( " IIR-M " ) ; // Plane A
break ;
case 32 :
block_ = std : : string ( " IIF " ) ; // Plane F
break ;
default :
block_ = std : : string ( " Unknown " ) ;
}
2012-01-16 22:01:29 +00:00
}
2018-12-02 13:32:22 +00:00
if ( system_ = = " Glonass " )
2012-01-16 22:01:29 +00:00
{
2018-01-19 08:46:44 +00:00
// Info from http://www.sdcm.ru/smglo/grupglo?version=eng&site=extern
2012-01-19 07:35:49 +00:00
// See also http://www.glonass-center.ru/en/GLONASS/
2018-03-03 01:03:39 +00:00
switch ( PRN_ )
{
case 1 :
block_ = std : : string ( " 1 " ) ; // Plane 1
rf_link = 1 ;
break ;
case 2 :
block_ = std : : string ( " -4 " ) ; // Plane 1
rf_link = - 4 ;
break ;
case 3 :
block_ = std : : string ( " 5 " ) ; // Plane 1
rf_link = 5 ;
break ;
case 4 :
block_ = std : : string ( " 6 " ) ; // Plane 1
rf_link = 6 ;
break ;
case 5 :
block_ = std : : string ( " 1 " ) ; // Plane 1
rf_link = 1 ;
break ;
case 6 :
block_ = std : : string ( " -4 " ) ; // Plane 1
rf_link = - 4 ;
break ;
case 7 :
block_ = std : : string ( " 5 " ) ; // Plane 1
rf_link = 5 ;
break ;
case 8 :
block_ = std : : string ( " 6 " ) ; // Plane 1
rf_link = 6 ;
break ;
case 9 :
block_ = std : : string ( " -2 " ) ; // Plane 2
rf_link = - 2 ;
break ;
case 10 :
block_ = std : : string ( " -7 " ) ; // Plane 2
rf_link = - 7 ;
break ;
case 11 :
block_ = std : : string ( " 0 " ) ; // Plane 2
rf_link = 0 ;
break ;
case 12 :
block_ = std : : string ( " -1 " ) ; // Plane 2
rf_link = - 1 ;
break ;
case 13 :
block_ = std : : string ( " -2 " ) ; // Plane 2
rf_link = - 2 ;
break ;
case 14 :
block_ = std : : string ( " -7 " ) ; // Plane 2
rf_link = - 7 ;
break ;
case 15 :
block_ = std : : string ( " 0 " ) ; // Plane 2
rf_link = 0 ;
break ;
case 16 :
block_ = std : : string ( " -1 " ) ; // Plane 2
rf_link = - 1 ;
break ;
case 17 :
block_ = std : : string ( " 4 " ) ; // Plane 3
rf_link = 4 ;
break ;
case 18 :
block_ = std : : string ( " -3 " ) ; // Plane 3
rf_link = - 3 ;
break ;
case 19 :
block_ = std : : string ( " 3 " ) ; // Plane 3
rf_link = 3 ;
break ;
case 20 :
block_ = std : : string ( " 2 " ) ; // Plane 3
rf_link = 2 ;
break ;
case 21 :
block_ = std : : string ( " 4 " ) ; // Plane 3
rf_link = 4 ;
break ;
case 22 :
block_ = std : : string ( " -3 " ) ; // Plane 3
rf_link = - 3 ;
break ;
case 23 :
block_ = std : : string ( " 3 " ) ; // Plane 3
rf_link = 3 ;
break ;
case 24 :
block_ = std : : string ( " 2 " ) ; // Plane 3
rf_link = 2 ;
break ;
default :
block_ = std : : string ( " Unknown " ) ;
}
2012-01-16 22:01:29 +00:00
}
2018-12-02 13:32:22 +00:00
if ( system_ = = " SBAS " )
2015-05-25 17:43:29 +00:00
{
2018-03-03 01:03:39 +00:00
switch ( PRN_ )
{
2018-08-21 14:41:07 +00:00
case 120 :
block_ = std : : string ( " EGNOS Test Platform " ) ; // Inmarsat 3-F2 (Atlantic Ocean Region-East)
2018-03-03 01:03:39 +00:00
break ;
2018-08-21 14:41:07 +00:00
case 123 :
block_ = std : : string ( " EGNOS " ) ; // EGNOS Operational Platform. Astra 5B
2018-03-03 01:03:39 +00:00
break ;
2018-08-21 14:41:07 +00:00
case 131 :
block_ = std : : string ( " WAAS " ) ; // WAAS Eutelsat 117 West B
break ;
case 135 :
block_ = std : : string ( " WAAS " ) ; // WAAS Galaxy 15
2018-03-03 01:03:39 +00:00
break ;
2018-08-21 14:41:07 +00:00
case 136 :
block_ = std : : string ( " EGNOS " ) ; // EGNOS Operational Platform. SES-5 (a.k.a. Sirius 5 or Astra 4B)
2018-03-03 01:03:39 +00:00
break ;
2018-08-21 14:41:07 +00:00
case 138 :
block_ = std : : string ( " WAAS " ) ; // WAAS Anik F1R
2018-03-03 01:03:39 +00:00
break ;
default :
block_ = std : : string ( " Unknown " ) ;
}
2015-05-25 17:43:29 +00:00
}
2018-12-02 13:32:22 +00:00
if ( system_ = = " Galileo " )
2012-01-16 22:01:29 +00:00
{
2018-01-19 08:46:44 +00:00
// Check http://en.wikipedia.org/wiki/List_of_Galileo_satellites and https://www.gsc-europa.eu/system-status/Constellation-Information
2018-03-03 01:03:39 +00:00
switch ( PRN_ )
{
case 1 :
block_ = std : : string ( " FOC-FM10 " ) ; // Galileo Full Operational Capability (FOC) satellite FM10 / GSAT-0210, launched on May 24, 2016.
break ;
case 2 :
block_ = std : : string ( " FOC-FM11 " ) ; // Galileo Full Operational Capability (FOC) satellite FM11 / GSAT-0211, launched on May 24, 2016.
break ;
case 3 :
block_ = std : : string ( " FOC-FM12 " ) ; // Galileo Full Operational Capability (FOC) satellite FM12 / GSAT-0212, launched on November 17, 2016.
break ;
case 4 :
block_ = std : : string ( " FOC-FM13 " ) ; // Galileo Full Operational Capability (FOC) satellite FM13 / GSAT-0213, launched on November 17, 2016.
break ;
case 5 :
block_ = std : : string ( " FOC-FM14 " ) ; // Galileo Full Operational Capability (FOC) satellite FM14 / GSAT-0214, launched on November 17, 2016.
break ;
case 7 :
block_ = std : : string ( " FOC-FM7 " ) ; // Galileo Full Operational Capability (FOC) satellite FM7 / GSAT-0207, launched on November 17, 2016.
break ;
case 8 :
block_ = std : : string ( " FOC-FM8 " ) ; // Galileo Full Operational Capability (FOC) satellite FM8 / GSAT0208, launched on December 17, 2015.
break ;
case 9 :
block_ = std : : string ( " FOC-FM9 " ) ; // Galileo Full Operational Capability (FOC) satellite FM9 / GSAT0209, launched on December 17, 2015.
break ;
case 11 :
block_ = std : : string ( " IOV-PFM " ) ; // PFM, the ProtoFlight Model / GSAT0101, launched from French Guiana at 10:30 GMT on October 21, 2011.
break ;
case 12 :
block_ = std : : string ( " IOV-FM2 " ) ; // Galileo In-Orbit Validation (IOV) satellite FM2 (Flight Model 2) also known as GSAT0102, from French Guiana at 10:30 GMT on October 21, 2011.
break ;
2018-07-27 15:06:57 +00:00
case 13 :
block_ = std : : string ( " FOC-FM20 " ) ; // Galileo Full Operational Capability (FOC) satellite FM20 / GSAT0220, launched on Jul. 25, 2018. UNDER COMMISSIONING.
break ;
2018-03-03 01:03:39 +00:00
case 14 :
block_ = std : : string ( " FOC-FM2* " ) ; // Galileo Full Operational Capability (FOC) satellite FM2 / GSAT0202, launched into incorrect orbit on August 22, 2014. Moved to usable orbit in March, 2015. UNDER TESTING.
break ;
2018-07-27 15:06:57 +00:00
case 15 :
block_ = std : : string ( " FOC-FM21 " ) ; // Galileo Full Operational Capability (FOC) satellite FM21 / GSAT0221, launched on Jul. 25, 2018. UNDER COMMISSIONING.
break ;
2018-03-03 01:03:39 +00:00
case 18 :
block_ = std : : string ( " FOC-FM1* " ) ; // Galileo Full Operational Capability (FOC) satellite FM1 / GSAT0201, launched into incorrect orbit on August 22, 2014. Moved to usable orbit in December, 2014. UNDER TESTING.
break ;
case 19 :
block_ = std : : string ( " IOV-FM3 " ) ; // Galileo In-Orbit Validation (IOV) satellite FM3 (Flight Model 3) / GSAT0103, launched on October 12, 2012.
break ;
case 20 :
block_ = std : : string ( " IOV-FM4** " ) ; // Galileo In-Orbit Validation (IOV) satellite FM4 (Flight Model 4) / GSAT0104, launched on October 12, 2012. Payload power problem beginning May 27, 2014 led to permanent loss of E5 and E6 transmissions, E1 transmission restored. UNAVAILABLE FROM 2014-05-27 UNTIL FURTHER NOTICE
break ;
case 21 :
2018-03-25 17:47:28 +00:00
block_ = std : : string ( " FOC-FM15 " ) ; // Galileo Full Operational Capability (FOC) satellite FM15 / GSAT0215, launched on Dec. 12, 2017. UNDER COMMISSIONING.
2018-03-03 01:03:39 +00:00
break ;
case 22 :
block_ = std : : string ( " FOC-FM4** " ) ; // Galileo Full Operational Capability (FOC) satellite FM4 / GSAT0204, launched on March 27, 2015. REMOVED FROM ACTIVE SERVICE ON 2017-12-08 UNTIL FURTHER NOTICE FOR CONSTELLATION MANAGEMENT PURPOSES.
break ;
case 24 :
block_ = std : : string ( " FOC-FM5 " ) ; // Galileo Full Operational Capability (FOC) satellite FM5 / GSAT0205, launched on Sept. 11, 2015.
break ;
case 25 :
2018-03-25 17:47:28 +00:00
block_ = std : : string ( " FOC-FM16 " ) ; // Galileo Full Operational Capability (FOC) satellite FM16 / GSAT0216, launched on Dec. 12, 2017. UNDER COMMISSIONING.
2018-03-03 01:03:39 +00:00
break ;
case 26 :
block_ = std : : string ( " FOC-FM3 " ) ; // Galileo Full Operational Capability (FOC) satellite FM3 / GSAT0203, launched on March 27, 2015.
break ;
case 27 :
2018-03-25 17:47:28 +00:00
block_ = std : : string ( " FOC-FM17 " ) ; // Galileo Full Operational Capability (FOC) satellite FM17 / GSAT0217, launched on Dec. 12, 2017. UNDER COMMISSIONING.
2018-03-03 01:03:39 +00:00
break ;
case 30 :
block_ = std : : string ( " FOC-FM6 " ) ; // Galileo Full Operational Capability (FOC) satellite FM6 / GSAT0206, launched on Sept. 11, 2015.
break ;
case 31 :
2018-03-25 17:47:28 +00:00
block_ = std : : string ( " FOC-FM18 " ) ; // Galileo Full Operational Capability (FOC) satellite FM18 / GSAT0218, launched on Dec. 12, 2017. UNDER COMMISSIONING.
2018-03-03 01:03:39 +00:00
break ;
2018-07-27 15:06:57 +00:00
case 33 :
block_ = std : : string ( " FOC-FM22 " ) ; // Galileo Full Operational Capability (FOC) satellite FM22 / GSAT0222, launched on Jul. 25, 2018. UNDER COMMISSIONING.
break ;
case 36 :
block_ = std : : string ( " FOC-FM19 " ) ; // Galileo Full Operational Capability (FOC) satellite FM19 / GSAT0219, launched on Jul. 25, 2018. UNDER COMMISSIONING.
break ;
2018-03-03 01:03:39 +00:00
default :
block_ = std : : string ( " Unknown(Simulated) " ) ;
}
2012-01-16 22:01:29 +00:00
}
2019-01-28 01:29:43 +00:00
if ( system_ = = " Beidou " )
2018-07-10 21:30:15 +00:00
{
// Check https://en.wikipedia.org/wiki/List_of_BeiDou_satellites
2019-01-28 01:29:43 +00:00
switch ( PRN_ )
{
case 19 :
block_ = std : : string ( " BEIDOU-3 M1 " ) ; //!<Slot B-7; launched 2017/11/05
break ;
case 20 :
block_ = std : : string ( " BEIDOU-3 M2 " ) ; //!<Slot B-5; launched 2017/11/05
break ;
case 21 :
block_ = std : : string ( " BEIDOU 3M5 " ) ; //!<Slot B-?; launched 2018/02/12
break ;
case 22 :
block_ = std : : string ( " BEIDOU 3M6 " ) ; //!<Slot B-6; launched 2018/02/12
break ;
case 23 :
block_ = std : : string ( " BEIDOU 3M9 " ) ; //!<Slot C-7; launched 2018/07/29
break ;
case 24 :
block_ = std : : string ( " BEIDOU 3M10 " ) ; //!<Slot C-1; launched 2018/07/29
break ;
case 25 :
block_ = std : : string ( " BEIDOU 3M12 " ) ; //!<Slot C-8; launched 2018/08/24
break ;
case 26 :
block_ = std : : string ( " BEIDOU 3M11 " ) ; //!<Slot C-2; launched 2018/08/24
break ;
case 27 :
block_ = std : : string ( " BEIDOU 3M3 " ) ; //!<Slot A-?; launched 2018/01/11
break ;
case 28 :
block_ = std : : string ( " BEIDOU 3M4 " ) ; //!<Slot A-?; launched 2018/01/11
break ;
case 29 :
block_ = std : : string ( " BEIDOU 3M7 " ) ; //!<Slot A-?; launched 2018/03/29
break ;
case 30 :
block_ = std : : string ( " BEIDOU 3M8 " ) ; //!<Slot A-?; launched 2018/03/29
break ;
case 32 :
block_ = std : : string ( " BEIDOU 3M13 " ) ; //!<Slot B-1?; launched 2018/09/19
break ;
case 33 :
block_ = std : : string ( " BEIDOU 3M14 " ) ; //!<Slot B-3; launched 2018/09/19
break ;
default :
block_ = std : : string ( " Unknown(Simulated) " ) ;
2018-07-10 21:30:15 +00:00
}
}
2015-05-25 17:43:29 +00:00
return block_ ;
}
2018-08-13 23:13:07 +00:00
void Gnss_Satellite : : set_block ( const std : : string & system_ , uint32_t PRN_ )
2015-05-25 17:43:29 +00:00
{
block = what_block ( system_ , PRN_ ) ;
2012-01-16 22:01:29 +00:00
}