Rev 264 | Rev 266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 264 | Rev 265 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | return -1; |
53 | return -1; |
Line 54... | Line 54... | ||
54 | 54 | ||
Line -... | Line 55... | ||
- | 55 | } |
|
- | 56 | ||
- | 57 | ||
- | 58 | public int Alt() // in dm |
|
- | 59 | { |
|
- | 60 | int alt=0; |
|
- | 61 | if (ufo_prober.is_mk()) |
|
- | 62 | alt=debug_data.analog[5]/3; |
|
- | 63 | else |
|
- | 64 | if (ufo_prober.is_navi()) |
|
- | 65 | alt=gps_position.Altimeter/3; |
|
- | 66 | if ( alt<0) alt=0; // mk |
|
- | 67 | if ( alt>20000) alt=0; // navi |
|
- | 68 | ||
- | 69 | return alt; |
|
- | 70 | ||
- | 71 | } |
|
- | 72 | ||
- | 73 | public String Alt_formated() // in dm |
|
55 | } |
74 | { |
56 | 75 | return "" + Alt()/10 + "m"; |
|
57 | 76 | } |
|
58 | public int AngleRoll() |
77 | public int AngleRoll() |
59 | { |
78 | { |
60 | if (ufo_prober.is_mk()) |
79 | if (ufo_prober.is_mk()) |
61 | return angle_roll; |
80 | return angle_roll; |
62 | else if (ufo_prober.is_navi()) |
81 | else if (ufo_prober.is_navi()) |
Line 63... | Line 82... | ||
63 | 82 | ||
Line 738... | Line 757... | ||
738 | case 'D': // debug Data |
757 | case 'D': // debug Data |
739 | log("got debug data"); |
758 | log("got debug data"); |
740 | stats.debug_data_count++; |
759 | stats.debug_data_count++; |
741 | debug_data.set_by_mk_data(Decode64(data,3,len-3),version); |
760 | debug_data.set_by_mk_data(Decode64(data,3,len-3),version); |
Line -... | Line 761... | ||
- | 761 | ||
- | 762 | if (ufo_prober.is_mk()) |
|
742 | 763 | stats.process_mkflags(debug_data.motor_val(0)); // TODO remove dirty hack |
|
743 | if (debug_buff_targets!=null) |
764 | if (debug_buff_targets!=null) |
744 | { |
765 | { |
745 | for (int sp=0;sp<debug_buff_targets.length;sp++) |
766 | for (int sp=0;sp<debug_buff_targets.length;sp++) |
746 | debug_buff[debug_buff_off][sp]=chg_debug_max(debug_data.analog[debug_buff_targets[sp]]); |
767 | debug_buff[debug_buff_off][sp]=chg_debug_max(debug_data.analog[debug_buff_targets[sp]]); |
Line 819... | Line 840... | ||
819 | stats.navi_data_count++; |
840 | stats.navi_data_count++; |
820 | log("got navi data(" + len +"):"); |
841 | log("got navi data(" + len +"):"); |
Line 821... | Line 842... | ||
821 | 842 | ||
Line -... | Line 843... | ||
- | 843 | gps_position.set_by_mk_data(Decode64(data,3,len-3),version); |
|
- | 844 | ||
822 | gps_position.set_by_mk_data(Decode64(data,3,len-3),version); |
845 | stats.process_mkflags(gps_position.MKFlags); |
823 | 846 | stats.process_compas(gps_position.CompasHeading); |
|
Line 824... | Line 847... | ||
824 | log("long:" + gps_position.Longitude); |
847 | log("long:" + gps_position.Longitude); |
Line 836... | Line 859... | ||
836 | 859 | ||
Line 837... | Line 860... | ||
837 | } |
860 | } |
Line -... | Line 861... | ||
- | 861 | ||
- | 862 | } |
|
838 | 863 | ||
Line 839... | Line 864... | ||
839 | } |
864 | |
840 | 865 | ||
841 | public boolean force_disconnect=true; |
866 | public boolean force_disconnect=true; |