/*
 * Copyright 2017 Ivaylo Stoyanov <me@ivkos.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.ivkos.gpsd4j.messages;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@ToString
@EqualsAndHashCode
public class Satellite
{
   @JsonProperty("PRN")
   private Integer PRN;

   private Double az, el, ss;
   private Boolean used;

   /**
    * PRN ID of the satellite. 1-63 are GNSS satellites, 64-96 are GLONASS satellites, 100-164 are SBAS satellites
    *
    * @return PRN id
    */
   public Integer getPRN()
   {
      return PRN;
   }

   /**
    * @return Azimuth, degrees from true north.
    */
   public Double getAzimuth()
   {
      return az;
   }

   /**
    * @return Elevation in degrees.
    */
   public Double getElevation()
   {
      return el;
   }

   /**
    * @return Signal strength in dB.
    */
   public Double getSignalStrength()
   {
      return ss;
   }

   /**
    * Used in current solution? (SBAS/WAAS/EGNOS satellites may be flagged used if the solution has corrections from
    * them, but not all drivers make this information available.)
    *
    * @return Used in current solution?
    */
   public Boolean isUsed()
   {
      return used;
   }
}

@@ -731,16 +731,38 @@
 shCode;%0A
+import lombok.Getter;%0A
 import l
@@ -778,16 +778,24 @@
 tring;%0A%0A
+@Getter%0A
 @ToStrin
@@ -844,113 +844,8 @@
 e%0A%7B%0A
-   @JsonProperty(%22PRN%22)%0A   private Integer PRN;%0A%0A   private Double az, el, ss;%0A   private Boolean used;%0A%0A
    /
@@ -1003,59 +1003,52 @@
 %0A   
-public Integer getPRN(
+@JsonProperty(%22PRN%22
 )%0A   
-%7B%0A      return PRN;%0A   %7D
+private Integer PRN;
 %0A%0A  
@@ -1110,30 +1110,54 @@
   */%0A   
-public
+@JsonProperty(%22az%22)%0A   private
  Double 
 getAzimu
@@ -1152,47 +1152,16 @@
 ble 
-getA
+a
 zimuth
-()%0A   %7B%0A      return az;%0A   %7D
+;
 %0A%0A  
@@ -1211,30 +1211,54 @@
   */%0A   
-public
+@JsonProperty(%22el%22)%0A   private
  Double 
 getEleva
@@ -1253,20 +1253,17 @@
 ble 
-getE
+e
 levation
 ()%0A 
@@ -1262,37 +1262,9 @@
 tion
-()%0A   %7B%0A      return el;%0A   %7D
+;
 %0A%0A  
@@ -1319,22 +1319,46 @@
 %0A   
-public
+@JsonProperty(%22ss%22)%0A   private
  Double 
 getS
@@ -1357,12 +1357,9 @@
 ble 
-getS
+s
 igna
@@ -1371,37 +1371,9 @@
 ngth
-()%0A   %7B%0A      return ss;%0A   %7D
+;
 %0A%0A  
@@ -1620,56 +1620,55 @@
 %0A   
-public Boolean isUsed(
+@JsonProperty(%22used%22
 )%0A   
-%7B%0A      retur
+private boolea
 n used;%0A
    %7D
@@ -1667,11 +1667,6 @@
 ed;%0A
-   %7D%0A
 %7D%0A

Refactor Satellite for friendlier member names