Skip to content

Commit

Permalink
merged. hope that was okay
Browse files Browse the repository at this point in the history
  • Loading branch information
schwehr committed Feb 3, 2011
2 parents 0fc6efb + fe15ce2 commit 4aaa494
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile-custom
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ clean:
#.cpp.o:
# ${CXX} -c $< ${CXXFLAGS}

test: test_libais
./test_libais

test_libais: ${OBJS} test_libais.cpp ais.h
@echo SRCS: ${SRCS}
@echo OBJS: ${OBJS}
Expand Down
1 change: 1 addition & 0 deletions ais8_366_22.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ void Ais8_366_22_Text::print() {




// Ais8_366_22_AreaShapeEnum getAreaShape(const std::bitset<AIS8_MAX_BITS> &bs, const size_t offset) {
// // Figure out which shape type or set as an error
// const int area_shape_int = ubits(bs,offset,3);
Expand Down
2 changes: 2 additions & 0 deletions test_libais.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ decoded_geojson: {"mmsi": 123456789, "repeat": 0, "msgtype": 8, "bbm": {"areas"
#endif
if (false) {
// Point
std::cout << "Point: ****\n";
Ais8_366_22 msg("81mg=5AKUP:0>H0007P=P?I0<12h000000");
if (!msg.had_error()) msg.print(); else std::cout<<"FAILED\n";
std::cout << "\n";
Expand All @@ -373,6 +374,7 @@ decoded_geojson: {"mmsi": 123456789, "repeat": 0, "msgtype": 8, "bbm": {"areas"
// !AIVDM,1,1,,A,81mg=5AKUP:0fH0007PMP?I0<1uF0m@000,3*1A
// decoded: AreaNotice: type=1 start=2010-07-06 12:00:00 duration=60 m link_id=10 sub-areas: 1
// original_geojson: {"mmsi": 123456789, "repeat": 0, "msgtype": 8, "bbm": {"areas": [{"geometry": {"type": "Polygon", "coordinates": [[-69.74852592241444, 42.050347260650405], ... , [-69.7496029998759, 42.05782539742527], [-69.74881795586683, 42.054106048943325], [-69.74852592241444, 42.050347260650405]]}, "radius": 4260, "area_shape_name": "circle", "area_shape": 0}], "bbm_type": [366, 22], "bbm_name": "area_notice", "freetext": null}}
std::cout << "\nCircle: ****\n";
Ais8_366_22 msg("81mg=5AKUP:0fH0007PMP?I0<1uF0m@000");
if (!msg.had_error()) msg.print(); else std::cout<<"FAILED\n";
std::cout << "\n";
Expand Down

0 comments on commit 4aaa494

Please sign in to comment.