Skip to content

Commit

Permalink
Merge pull request #350 from tier4/fix/geo_coordinate_inspector
Browse files Browse the repository at this point in the history
fix GeoCoordinate parameter accessibility from inspector
  • Loading branch information
mackierx111 authored Sep 2, 2024
2 parents 8164141 + 7f43787 commit 97af062
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions Assets/AWSIM/Scripts/GeoCoordinate/GeoCoordinate.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
using UnityEngine;

namespace AWSIM.Geographic
{
[System.Serializable]
public class GeoCoordinate
{
public double Latitude { get; }
public double Longitude { get; }
public double Altitude { get; }
[SerializeField]
private double latitude;
[SerializeField]
private double longitude;
[SerializeField]
private double altitude;

public double Latitude => latitude;
public double Longitude => longitude;
public double Altitude => altitude;

public GeoCoordinate()
{
Latitude = 0;
Longitude = 0;
Altitude = 0;
latitude = 0;
longitude = 0;
altitude = 0;
}

public GeoCoordinate(double latitude, double longitude, double altitude)
{
Latitude = latitude;
Longitude = longitude;
Altitude = altitude;
this.latitude = latitude;
this.longitude = longitude;
this.altitude = altitude;
}
}
}

0 comments on commit 97af062

Please sign in to comment.