#pragma once
#include <QCoreApplication>
#include <QFile>
#include <QDomDocument>
#include <QDebug>
#include "SARSimulationImageL1.h"





class SatelliteGF3xmlParser {
public:
    bool loadFile(const QString& filename);

    void parsePlatform();
    void parseGPS();
    void parseImageInfo();
    void parseAdditionalData();
public:
    QDomDocument xml;
    // Platform data
    QString CenterTime;
    double Rs, satVelocity, RollAngle, PitchAngle, YawAngle, Xs, Ys, Zs, Vxs, Vys, Vzs;
    // GPS data
    QVector<SatellitePos> antposs;
 
 
    // Image info data
    double start, end;
    double nearRange, refRange, eqvFs, eqvPRF, latitude_center, longitude_center,
        latitude_topLeft, longitude_topLeft, latitude_topRight, longitude_topRight,
        latitude_bottomLeft, longitude_bottomLeft, latitude_bottomRight, longitude_bottomRight,
        widthspace, heightspace, sceneShift, HH_QualifyValue, HV_QualifyValue, VH_QualifyValue, VV_QualifyValue,
        HH_echoSaturation, HV_echoSaturation, VH_echoSaturation, VV_echoSaturation;
    int width, height;
    QString imagebit;
    // Additional data

    double HH_CalibrationConst, HV_CalibrationConst;
    double VH_CalibrationConst, VV_CalibrationConst;
    double AzFdc0, AzFdc1;
    QString sensorID, imagingMode;
    double lamda, RadarCenterFrequency;
    double TotalProcessedAzimuthBandWidth, DopplerParametersReferenceTime;
    double d0, d1, d2, d3, d4;
    double r0, r1, r2, r3, r4;
    double DEM;
    double  incidenceAngleNearRange, incidenceAngleFarRange;
};          



