+
+ public void set_latitude(int in_lat) {
+ lat = in_lat / 10.0e7;
+ }
+
+ public void set_longitude(int in_lon) {
+ lon = in_lon / 10.0e7;
+ }
+
+ public void set_time(int hour, int minute, int second) {
+ hour = hour;
+ minute = minute;
+ second = second;
+ }
+
+ public void set_date(int year, int month, int day) {
+ year = year;
+ month = month;
+ day = day;
+ }
+
+ public void set_flags(int flags) {
+ flags = flags;
+ }
+
+ public void set_altitude(int altitude) {
+ altitude = altitude;
+ }
+
+ public void add_sat(int svid, int c_n0) {
+ if (cc_gps_sat == null) {
+ cc_gps_sat = new AltosGPS.AltosGPSSat[1];
+ } else {
+ AltosGPSSat[] new_gps_sat = new AltosGPS.AltosGPSSat[cc_gps_sat.length + 1];
+ for (int i = 0; i < cc_gps_sat.length; i++)
+ new_gps_sat[i] = cc_gps_sat[i];
+ cc_gps_sat = new_gps_sat;
+ }
+ AltosGPS.AltosGPSSat sat = new AltosGPS.AltosGPSSat();
+ sat.svid = svid;
+ sat.c_n0 = c_n0;
+ cc_gps_sat[cc_gps_sat.length - 1] = sat;
+ }
+
+ public AltosGPS() {
+ ClearGPSTime();
+ cc_gps_sat = null;
+ }