package org.helioviewer.viewmodel.metadata;

public class HelioviewerPositionedMetaData extends HelioviewerMetaData implements PositionedMetaData {
    private double heeqX;
    private double heeqY;
    private double heeqZ;
    private boolean heeqAvailable = false;

    private double heeX;
    private double heeY;
    private double heeZ;
    private boolean heeAvailable = false;

    private double crlt;
    private double crln;
    private double dobs;
    private boolean carringtonAvailable = false;

    private double stonyhurstLongitude;
    private double stonyhurstLatitude;
    private boolean stonyhurstAvailable = false;

    public HelioviewerPositionedMetaData(MetaDataContainer mdc) {
        super(mdc);

        this.heeqX = mdc.tryGetDouble("HEQX_OBS");
        this.heeqY = mdc.tryGetDouble("HEQY_OBS");
        this.heeqZ = mdc.tryGetDouble("HEQZ_OBS");
        this.heeqAvailable = this.heeqX != 0.0 || this.heeqY != 0.0 || this.heeqZ != 0.0;

        this.heeX = mdc.tryGetDouble("HEEX_OBS");
        this.heeY = mdc.tryGetDouble("HEEY_OBS");
        this.heeZ = mdc.tryGetDouble("HEEZ_OBS");
        this.heeAvailable = this.heeX != 0.0 || this.heeY != 0.0 || this.heeZ != 0.0;

        this.crlt = mdc.tryGetDouble("CRLT_OBS");
        this.crln = mdc.tryGetDouble("CRLN_OBS");
        this.dobs = mdc.tryGetDouble("DSUN_OBS");
        this.carringtonAvailable = this.crlt != 0.0 || this.crln != 0.0;

        this.stonyhurstLatitude = mdc.tryGetDouble("HGLT_OBS");
        this.stonyhurstLongitude = mdc.tryGetDouble("HGLN_OBS");
        this.stonyhurstAvailable = this.stonyhurstLatitude != 0.0 || this.stonyhurstLongitude != 0.0;
    }

    public double getHEEX() {
        return heeX;
    }

    public double getHEEY() {
        return heeqY;
    }

    public double getHEEZ() {
        return heeZ;
    }

    public boolean isHEEProvided() {
        return heeAvailable;
    }

    public double getHEEQX() {
        return this.heeqX;
    }

    public double getHEEQY() {
        return this.heeqY;
    }

    public double getHEEQZ() {
        return this.heeqZ;
    }

    public boolean isHEEQProvided() {
        return this.heeqAvailable;
    }

    public double getCrln() {
        return crln;
    }

    public double getCrlt() {
        return crlt;
    }

    public double getDobs() {
        return dobs;
    }

    public boolean isCarringtonProvided() {
        return carringtonAvailable;
    }

    public boolean isStonyhurstProvided() {
        return stonyhurstAvailable;
    }

    public double getStonyhurstLatitude() {
        return stonyhurstLatitude;
    }

    public double getStonyhurstLongitude() {
        return stonyhurstLongitude;
    }
}
@@ -721,16 +721,225 @@
 r(mdc);%0A
+        updatePosition();%0A    %7D%0A%0A    @Override%0A    protected boolean updatePixelParameters() %7B%0A        updatePosition();%0A        return super.updatePixelParameters();%0A    %7D%0A%0A    private void updatePosition() %7B
 %0A       
@@ -949,26 +949,40 @@
 is.heeqX = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1014,26 +1014,40 @@
 is.heeqY = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1079,26 +1079,40 @@
 is.heeqZ = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1234,26 +1234,40 @@
 his.heeX = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1298,26 +1298,40 @@
 his.heeY = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1362,26 +1362,40 @@
 his.heeZ = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1513,26 +1513,40 @@
 his.crlt = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1577,26 +1577,40 @@
 his.crln = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1641,26 +1641,40 @@
 his.dobs = m
-dc
+etaDataContainer
 .tryGetDoubl
@@ -1789,34 +1789,48 @@
 urstLatitude = m
-dc
+etaDataContainer
 .tryGetDouble(%22H
@@ -1876,18 +1876,32 @@
 tude = m
-dc
+etaDataContainer
 .tryGetD
@@ -2268,32 +2268,46 @@
 ailable;%0A    %7D%0A%0A
+    @Override%0A
     public doubl
@@ -2347,32 +2347,46 @@
 s.heeqX;%0A    %7D%0A%0A
+    @Override%0A
     public doubl
@@ -2426,32 +2426,46 @@
 s.heeqY;%0A    %7D%0A%0A
+    @Override%0A
     public doubl
@@ -2505,32 +2505,46 @@
 s.heeqZ;%0A    %7D%0A%0A
+    @Override%0A
     public boole

update extra parameters on every frame change