001/* 002 * This file is part of McIDAS-V 003 * 004 * Copyright 2007-2025 005 * Space Science and Engineering Center (SSEC) 006 * University of Wisconsin - Madison 007 * 1225 W. Dayton Street, Madison, WI 53706, USA 008 * https://www.ssec.wisc.edu/mcidas/ 009 * 010 * All Rights Reserved 011 * 012 * McIDAS-V is built on Unidata's IDV and SSEC's VisAD libraries, and 013 * some McIDAS-V source code is based on IDV and VisAD source code. 014 * 015 * McIDAS-V is free software; you can redistribute it and/or modify 016 * it under the terms of the GNU Lesser Public License as published by 017 * the Free Software Foundation; either version 3 of the License, or 018 * (at your option) any later version. 019 * 020 * McIDAS-V is distributed in the hope that it will be useful, 021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 023 * GNU Lesser Public License for more details. 024 * 025 * You should have received a copy of the GNU Lesser Public License 026 * along with this program. If not, see https://www.gnu.org/licenses/. 027 */ 028 029package edu.wisc.ssec.mcidasv.data; 030 031import java.awt.Color; 032import java.awt.Font; 033 034import visad.georef.EarthLocationTuple; 035 036/** 037 * 038 * Container for everything needed to maintain state and draw a satellite "ground station". 039 * For our purposes we draw the range ring and label the center point. Stuff like Fonts 040 * and Colors are determined by the instantiated VisAD objects (CurveDrawer and TextDisplayable). 041 * @author tommyj 042 * 043 */ 044 045public class GroundStation 046{ 047 public static final int DEFAULT_ANTENNA_ANGLE = 5; 048 049 private String name; 050 private EarthLocationTuple elt; 051 private int antennaAngle; 052 private Color color = Color.MAGENTA; 053 private double altitude; 054 private Font font; 055 private int lineWidth; 056 private int lineStyle; 057 private boolean globeDisplay; 058 059 public GroundStation() { 060 // for bundles 061 } 062 063 public GroundStation(String name, EarthLocationTuple location) { 064 this(name, location, DEFAULT_ANTENNA_ANGLE); 065 } 066 067 /** 068 * Constructor with additional antenna angle parameter. 069 */ 070 071 public GroundStation(String name, EarthLocationTuple location, int angle) { 072 this.name = name; 073 this.elt = location; 074 this.antennaAngle = angle; 075 } 076 077 /** 078 * Constructor with additional antenna angle and altitude parameters. 079 */ 080 081 public GroundStation(String name, EarthLocationTuple location, int angle, double altitude) { 082 this.name = name; 083 this.elt = location; 084 this.antennaAngle = angle; 085 this.altitude = altitude; 086 } 087 088 /** 089 * @return the label 090 */ 091 public String getName() { 092 return name; 093 } 094 095 /** 096 * @return the EarthLocationTuple 097 */ 098 public EarthLocationTuple getElt() { 099 return elt; 100 } 101 102 /** 103 * @param name the label to set 104 */ 105 public void setName(String name) { 106 this.name = name; 107 } 108 109 /** 110 * @param elt the EarthLocationTuple to set 111 */ 112 public void setElt(EarthLocationTuple elt) { 113 this.elt = elt; 114 } 115 116 /** 117 * @return the antenna angle 118 */ 119 public int getAntennaAngle() { 120 return antennaAngle; 121 } 122 123 /** 124 * @param antennaAngle the antenna angle to set 125 */ 126 public void setAntennaAngle(int antennaAngle) { 127 this.antennaAngle = antennaAngle; 128 } 129 130 public Color getColor() { 131 return color; 132 } 133 134 public void setColor(Color newColor) { 135 color = newColor; 136 } 137 138 public double getAltitude() { 139 return altitude; 140 } 141 142 public void setAltitude(double newAltitude) { 143 altitude = newAltitude; 144 } 145 146 public void setFont(Font newFont) { 147 font = newFont; 148 } 149 150 public Font getFont() { 151 return font; 152 } 153 154 public void setGlobeDisplay(boolean newValue) { 155 globeDisplay = newValue; 156 } 157 158 public boolean getGlobeDisplay() { 159 return globeDisplay; 160 } 161 162 public void setLineStyle(int newStyle) { 163 lineStyle = newStyle; 164 } 165 166 public int getLineStyle() { 167 return lineStyle; 168 } 169 170 public void setLineWidth(int newWidth) { 171 lineWidth = newWidth; 172 } 173 174 public int getLineWidth() { 175 return lineWidth; 176 } 177 178 /** 179 * Override to only show name since used in combo boxes 180 * @see java.lang.Object#toString() 181 * 182 */ 183 @Override 184 public String toString() { 185 return name; 186 } 187 188}