⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msg_data_impfconfiguration.cpp

📁 HRIT读取,用于在LINUX下显示高束数据图像
💻 CPP
📖 第 1 页 / 共 2 页
字号:
//-----------------------------------------------------------------------------////  File        : MSG_data_IMPFConfiguration.cpp//  Description : MSG HRIT-LRIT format interface//  Project     : Meteosatlib//  Author      : Graziano Giuliani//  References  : MSG/SPE/057 LRIT-HRIT Mission Specific Implementation,//                V. 4.1 9 Mar 2001////  This program 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 2 of the License, or//  (at your option) any later version.////  This program 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//  along with this program; if not, write to the Free Software//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA////-----------------------------------------------------------------------------#include <fstream>#include <cstring>#include <iomanip>#include <MSG_data_IMPFConfiguration.h>std::string MSG_SU_Instance(t_enum_MSG_SU_instance inst){  std::string v;  switch (inst)  {    case MSG_SU_SW_INSTANCE_M_C:      v = "SW Instance M&C";      break;    case MSG_SU_ACCEPT_DATA_SEVIRI:      v = "Accept Data Seviri";      break;    case MSG_SU_ACCEPT_DATA_HKTM:      v = "Accept Data HKTM";      break;    case MSG_SU_ACCEPT_DATA_GERB:      v = "Accept Data GERB";      break;    case MSG_SU_ACCEPT_DATA_FTP_SERVER:      v = "Accept Data FTP Server";      break;    case MSG_SU_RCAL_GCAL:      v = "Rcal/Gcal";      break;    case MSG_SU_RQA:      v = "RQA";      break;    case MSG_SU_GQA:      v = "GQA";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_VIS06:      v = "Requantize/Resample Visible Channel 0.6";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_VIS08:      v = "Requantize/Resample Visible Channel 0.8";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR16:      v = "Requantize/Resample Infrared Channel 1.6";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR38:      v = "Requantize/Resample Infrared Channel 3.8";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_WV62:      v = "Requantize/Resample Water Vapour Channel 6.2";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_WV73:      v = "Requantize/Resample Water Vapour Channel 7.3";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR87:      v = "Requantize/Resample Infrared Channel 8.7";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR97:      v = "Requantize/Resample Infrared Channel 9.7";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR108:      v = "Requantize/Resample Infrared Channel 10.8";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR120:      v = "Requantize/Resample Infrared Channel 12.0";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_IR134:      v = "Requantize/Resample Infrared Channel 13.4";      break;    case MSG_SU_REQUANTIZE_RESAMPLE_HRV:      v = "Requantize/Resample HRV Channel";      break;    case MSG_SU_PRODUCE_QUICKLOOK_DATA:      v = "Produce Quicklook Data";      break;    case MSG_SU_SEND_DATA_SEVIRI_LPT0:      v = "Send Seviri Data LPT0";      break;    case MSG_SU_SEND_DATA_SEVIRI_LPT5:      v = "Send Seviri Data LPT5";      break;    case MSG_SU_SEND_DATA_HKTM:      v = "Send Data HKTM";      break;    case MSG_SU_SEND_DATA_RAW_GERB:      v = "Send Data Raw GERB";      break;    case MSG_SU_SEND_DATA_VALIDATED_GERB:      v = "Send Data Validated GERB";      break;    case MSG_SU_SEND_DATA_GENERATED_FD:      v = "Send Data Generated FD";      break;    case MSG_SU_SEND_FTP_CLIENT_PUT:      v = "Send Data FTP Client PUT";      break;    case MSG_SU_OBJECT_STORE_SERVER:      v = "Object Store Server";      break;    default:      v = "Unknown";      break;  }  return v;}std::string MSG_SU_ID(uint_4 SUId){  std::string v;  if (SUId == 0) v = "No particular SU";  else if (SUId >= 10000 && SUId < 20000) v = "BRGS";  else if (SUId >= 20000 && SUId < 30000) v = "CF";  else if (SUId >= 30000 && SUId < 40000) v = "DADF";  else if (SUId >= 40000 && SUId < 50000) v = "IMPF";  else if (SUId >= 50000 && SUId < 60000) v = "MARF";  else if (SUId >= 60000 && SUId < 70000) v = "MPEF";  else if (SUId >= 70000 && SUId < 80000) v = "PGS";  else if (SUId >= 80000 && SUId < 90000) v = "SSF";  else if (SUId >= 90000 && SUId < 100000) v = "SIU";  else if (SUId >= 100000 && SUId < 101000) v = "LEOP_CC";  else v = "Unknown";  return v;}std::string MSG_SUMode(t_enum_MSG_SUMode mod){  std::string v;  switch (mod)  {    case MSG_SU_MODE_OFF:      v = "Off";      break;    case MSG_SU_MODE_ON_NON_PROCESSING:      v = "Non Processing";      break;    case MSG_SU_MODE_ON_REAL_TIME_PROCESSING:      v = "On - Real Time Processing";      break;    case MSG_SU_MODE_ON_ANALYSIS_MODE:      v = "On - Analysis Mode";      break;    default:      v = "Unknown";      break;  }  return v;}std::string MSG_SUState(t_enum_MSG_SUState sta){  std::string v;  switch (sta)  {    case MSG_SU_STATE_ERROR:      v = "Error";      break;    case MSG_SU_STATE_NOMINAL:      v = "Nominal";      break;    case MSG_SU_STATE_DEGRADED:      v = "Degraded";      break;    default:      v = "Unknown";      break;  }  return v;}size_t MSG_GPConfigItemVersion::read_from( unsigned const char_1 *buff ){  Issue = get_ui2(buff);  Revision = get_ui2(buff+2);  return 4;}std::ostream& operator<< ( std::ostream& os, MSG_GPConfigItemVersion &v ){  os << "Issue               : " << v.Issue << std::endl     << "Revision            : " << v.Revision << std::endl;  return os;}size_t MSG_MirrorParameters::read_from( unsigned const char_1 *buff ){  MaxFeedbackVoltage = get_r8(buff);  MinFeedbackVoltage = get_r8(buff+8);  MirrorSlipEstimate = get_r8(buff+16);  return 24;}std::ostream& operator<< ( std::ostream& os, MSG_MirrorParameters &p ){  os << "Max Feedback Voltage: " << p.MaxFeedbackVoltage << std::endl     << "Min Feedback Voltage: " << p.MinFeedbackVoltage << std::endl     << "Mirror Slip Estimate: " << p.MirrorSlipEstimate << std::endl;  return os;}size_t MSG_HKTMParameters::read_from( unsigned const char_1 *buff){  (void) TimeS0Packet.read_from(buff);  (void) TimeS1Packet.read_from(buff+6);  (void) TimeS2Packet.read_from(buff+12);  (void) TimeS3Packet.read_from(buff+18);  (void) TimeS4Packet.read_from(buff+24);  (void) TimeS5Packet.read_from(buff+30);  (void) TimeS6Packet.read_from(buff+36);  (void) TimeS7Packet.read_from(buff+42);  (void) TimeS8Packet.read_from(buff+48);  (void) TimeS9Packet.read_from(buff+54);  (void) TimeSYPacket.read_from(buff+60);  (void) TimePSPacket.read_from(buff+66);  return 3480; // ?? 498}std::ostream& operator<< ( std::ostream& os, MSG_HKTMParameters &p ){  os << "Time S0 Packet      : " << p.TimeS0Packet.get_timestring( )<< std::endl     << "Time S1 Packet      : " << p.TimeS1Packet.get_timestring( )<< std::endl     << "Time S2 Packet      : " << p.TimeS2Packet.get_timestring( )<< std::endl     << "Time S3 Packet      : " << p.TimeS3Packet.get_timestring( )<< std::endl     << "Time S4 Packet      : " << p.TimeS4Packet.get_timestring( )<< std::endl     << "Time S5 Packet      : " << p.TimeS5Packet.get_timestring( )<< std::endl     << "Time S6 Packet      : " << p.TimeS6Packet.get_timestring( )<< std::endl     << "Time S7 Packet      : " << p.TimeS7Packet.get_timestring( )<< std::endl     << "Time S8 Packet      : " << p.TimeS8Packet.get_timestring( )<< std::endl     << "Time S9 Packet      : " << p.TimeS9Packet.get_timestring( )<< std::endl     << "Time SY Packet      : " << p.TimeSYPacket.get_timestring( )<< std::endl     << "Time PS Packet      : " << p.TimePSPacket.get_timestring( )     << std::endl;  return os;}size_t MSG_SUConfiguration::read_from( unsigned const char_1 *buff ){  size_t position = 0;  position += SWVersion.read_from(buff+position);  for (int i = 0; i < 10; i ++)    position += InfoBaseVersion[i].read_from(buff+position);  return position;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -