subject

The Problem The city of New York provides a monthly detailed listing of taxi rides within the five boroughs. Your assignment is to read in an extract of the destinations, which are provided in latitude and longitude. Each destination should be plotted as a point on a gray scale bit map.
Since many trips will be to the same destination, the output could be in heat map format, where each pixel is coded brighter if it is visited many times, and set to zero (black) if it is not a destination. However, for this lab assignment, only set the pixel to black or white.
Write a program based on exercise 1 to read in the file of destinations and plot them on a bit map. The dimensions should be 1024 by 1024 pixels. The background color should be black. The center point of the plot area should be latitude 40.765482, longitude -73.980006. (This the corner of 7th Avenue and West 57th Street, i. e. Carnegie Hall.) The southern boundary should be roughly 40.700455 and the northern boundary should be roughly 40.830509. The eastern and western boundaries will be proportionate to these.
The processing steps are basically (in C++):
Create a character array, 1024 by 1024 entries.
Open the input file.
Read in data. You will have to decide how much. Each longitude and latitude point will comprise two float values.
Validate that the longitude and latitude are within the bounds of the bit map. This step must be done in x87 assembly (use in inline assembly i. e. __asm {//insert code here})
Convert the longitude and latitude to a position within the bit map. This step must be done in x87 assembly.
Set that position to 255. This step must be done in x87 assembly.
At the end of the input, write out the bit map headers, color map, and the bit map array itself.
End the program.
Notes
Your input will be a binary file (https://www. dropbox. com/s/dhe2s9dd3cnysu9/L2Data10K. dat?dl=0)
You can read in more than two floats at a time from the input file.
The bit map will use a Mercator projection, so no adjustment of the longitude value will be needed.
To convert latitude to a bit position, subtract the bottom boundary from it, then divide by the latitude range of the bit map (top minus bottom), then multiply it by the vertical dimension of the bit map in pixels. So, for:
40.748418 (latitude of the Empire State Building)
a. subtract the bottom boundary: 40.748418 - 40.700455 = 0.047963
b. divide by the latitude range of the bit map: 0.047963 / (40.830509 - 40.700455) = 0.047963 / 0.130054 = 0.3687929...
c. multiply that quotient by the vertical dimension in pixels: 0.3687929 * 1024 = 377.64 = 378.
Follow a similar process for the longitude. Remember that west longitudes are expressed as negative numbers, with the absolute value of the number growing larger the further west the point, up to a maximum of 180.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
You know the right answer?
The Problem The city of New York provides a monthly detailed listing of taxi rides within the five...
Questions
Questions on the website: 13722367